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

Function TSPluginInit

tests/tools/plugins/test_log_interface.cc:75–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void
76TSPluginInit(int /* argc ATS_UNUSED */, const char ** /* argv ATS_UNUSED */)
77{
78 TSPluginRegistrationInfo info;
79
80 info.plugin_name = const_cast<char *>(plugin_name);
81 info.support_email = const_cast<char *>("dev@trafficserver.apache.org");
82 info.vendor_name = const_cast<char *>("Verizon Media");
83
84 if (TSPluginRegister(&info) != TS_SUCCESS) {
85 TSError("[%s] plugin registration failed\n", plugin_name);
86 return;
87 }
88
89 TSAssert(TS_SUCCESS == TSTextLogObjectCreate(plugin_name, TS_LOG_MODE_ADD_TIMESTAMP, &pluginlog));
90 TSHttpHookAdd(TS_HTTP_READ_REQUEST_HDR_HOOK, TSContCreate(global_handler, nullptr));
91}

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected