Called by ATS as our initialization point
| 168 | |
| 169 | // Called by ATS as our initialization point |
| 170 | void |
| 171 | TSPluginInit(int /* argc ATS_UNUSED */, const char ** /* argv ATS_UNUSED */) |
| 172 | { |
| 173 | TSPluginRegistrationInfo info; |
| 174 | info.plugin_name = const_cast<char *>("SSL secret load test"); |
| 175 | info.vendor_name = const_cast<char *>("apache"); |
| 176 | info.support_email = const_cast<char *>("shinrich@apache.org"); |
| 177 | if (TSPluginRegister(&info) != TS_SUCCESS) { |
| 178 | TSError("[%s] Plugin registration failed", PN); |
| 179 | } |
| 180 | |
| 181 | TSCont cb = TSContCreate(&CB_Load_Secret, nullptr); |
| 182 | TSLifecycleHookAdd(TS_LIFECYCLE_SSL_SECRET_HOOK, cb); |
| 183 | |
| 184 | // Scheduled a call back to trigger every 3 seconds to look for changes to the files |
| 185 | TSCont cb_update = TSContCreate(&CB_Update_Secret, TSMutexCreate()); |
| 186 | TSContScheduleOnPool(cb_update, 3000, TS_THREAD_POOL_TASK); |
| 187 | |
| 188 | return; |
| 189 | } |
nothing calls this directly
no test coverage detected