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

Function TSPluginInit

example/plugins/c-api/passthru/passthru.cc:322–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320}
321
322void
323TSPluginInit(int /* argc */, const char * /* argv */[])
324{
325 TSPluginRegistrationInfo info = {PLUGIN_NAME, "Apache Software Foundation", "dev@trafficserver.apache.org"};
326
327 TSReturnCode status;
328
329 TSMgmtStringCreate(TS_RECORDTYPE_CONFIG, "config.plugin.passthru.server_ports", const_cast<char *>(""),
330 TS_RECORDUPDATE_RESTART_TS, TS_RECORDCHECK_NULL, nullptr /* check_regex */, TS_RECORDACCESS_NULL);
331
332 // Start listening on the configured port.
333 status = PassthruListen();
334 TSReleaseAssert(status == TS_SUCCESS);
335
336 // Now that succeeded, we can register.
337 status = TSPluginRegister(&info);
338 TSReleaseAssert(status == TS_SUCCESS);
339}
340
341// vim: set sw=2 ts=2 sts=2 et:

Callers

nothing calls this directly

Calls 3

TSMgmtStringCreateFunction · 0.85
PassthruListenFunction · 0.85
TSPluginRegisterFunction · 0.85

Tested by

no test coverage detected