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

Function TSPluginInit

example/plugins/c-api/txn_data_sink/txn_data_sink.cc:244–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242} // anonymous namespace
243
244void
245TSPluginInit(int /* argc ATS_UNUSED */, const char ** /* argv ATS_UNUSED */)
246{
247 TSPluginRegistrationInfo info;
248
249 info.plugin_name = PLUGIN_NAME;
250 info.vendor_name = "Apache Software Foundation";
251 info.support_email = "dev@trafficserver.apache.org";
252
253 if (TSPluginRegister(&info) != TS_SUCCESS) {
254 TSError("[%s] Plugin registration failed.", PLUGIN_NAME);
255 return;
256 }
257
258 TSHttpHookAdd(TS_HTTP_READ_REQUEST_HDR_HOOK, TSContCreate(main_hook, nullptr));
259 return;
260}

Callers

nothing calls this directly

Calls 4

TSPluginRegisterFunction · 0.85
TSHttpHookAddFunction · 0.85
TSContCreateFunction · 0.85
TSErrorFunction · 0.50

Tested by

no test coverage detected