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

Function TSPluginInit

plugins/generator/generator.cc:812–834  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

810}
811
812void
813TSPluginInit(int /* argc */, const char * /* argv */[])
814{
815 TSPluginRegistrationInfo info;
816
817 info.plugin_name = (char *)PLUGIN;
818 info.vendor_name = (char *)"Apache Software Foundation";
819 info.support_email = (char *)"dev@trafficserver.apache.org";
820
821 if (TSPluginRegister(&info) != TS_SUCCESS) {
822 VERROR("plugin registration failed\n");
823 }
824
825 GeneratorInitialize();
826
827 // We want to check early on if the request is cacheable or not, and if it's not cacheable,
828 // we benefit signifciantly from turning off the cache completely.
829 TSHttpHookAdd(TS_HTTP_READ_REQUEST_HDR_HOOK, TxnHook);
830
831 // Wait until after the cache lookup to decide whether to
832 // intercept a request. For cache hits we will never intercept.
833 TSHttpHookAdd(TS_HTTP_CACHE_LOOKUP_COMPLETE_HOOK, TxnHook);
834}
835
836TSReturnCode
837TSRemapInit(TSRemapInterface * /* api_info */, char * /* errbuf */, int /* errbuf_size */)

Callers

nothing calls this directly

Calls 3

TSPluginRegisterFunction · 0.85
GeneratorInitializeFunction · 0.85
TSHttpHookAddFunction · 0.85

Tested by

no test coverage detected