MCPcopy Create free account
hub / github.com/apache/trafficserver / TSPluginInit

Function TSPluginInit

tests/tools/plugins/ssl_secret_load_test.cc:170–189  ·  view source on GitHub ↗

Called by ATS as our initialization point

Source from the content-addressed store, hash-verified

168
169// Called by ATS as our initialization point
170void
171TSPluginInit(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}

Callers

nothing calls this directly

Calls 6

TSPluginRegisterFunction · 0.85
TSContCreateFunction · 0.85
TSLifecycleHookAddFunction · 0.85
TSMutexCreateFunction · 0.85
TSContScheduleOnPoolFunction · 0.85
TSErrorFunction · 0.50

Tested by

no test coverage detected