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

Function TSPluginInit

plugins/experimental/txn_box/plugin/src/txn_box.cc:202–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202void
203TSPluginInit(int argc, char const *argv[])
204{
205 for (int idx = 0; idx < argc; ++idx) {
206 G._args.emplace_back(argv[idx]);
207 }
208 std::string err_str;
209 if (!G._preload_errata.is_ok()) {
210 swoc::bwprint(err_str, "{}: startup issues.\n{}", Config::PLUGIN_NAME, G._preload_errata);
211 G._preload_errata.clear();
212 TSError("%s", err_str.c_str());
213 }
214 auto errata{TxnBoxInit()};
215 if (!errata.is_ok()) {
216 swoc::bwprint(err_str, "{}: initialization failure.\n{}", Config::PLUGIN_NAME, errata);
217 TSError("%s", err_str.c_str());
218 }
219 TSLifecycleHookAdd(TS_LIFECYCLE_MSG_HOOK, TSContCreate(&CB_TxnBoxMsg, nullptr));
220 TSLifecycleHookAdd(TS_LIFECYCLE_SHUTDOWN_HOOK, TSContCreate(&CB_TxnBoxShutdown, nullptr));
221#if TS_VERSION_MAJOR >= 9
222 TSPluginDSOReloadEnable(false);
223#endif
224};
225/* ------------------------------------------------------------------------ */

Callers

nothing calls this directly

Calls 9

TxnBoxInitFunction · 0.85
TSLifecycleHookAddFunction · 0.85
TSContCreateFunction · 0.85
TSPluginDSOReloadEnableFunction · 0.85
emplace_backMethod · 0.80
TSErrorFunction · 0.50
is_okMethod · 0.45
clearMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected