| 541 | } |
| 542 | |
| 543 | void |
| 544 | TSPluginInit(int /* argc */, const char * /* argv */[]) |
| 545 | { |
| 546 | TSPluginRegistrationInfo info; |
| 547 | |
| 548 | info.plugin_name = PLUGIN_NAME; |
| 549 | info.vendor_name = "Apache Software Foundation"; |
| 550 | info.support_email = "dev@trafficserver.apache.org"; |
| 551 | |
| 552 | if (TSPluginRegister(&info) != TS_SUCCESS) { |
| 553 | VERROR("plugin registration failed\n"); |
| 554 | } |
| 555 | |
| 556 | // XXX accept hostname and port arguments |
| 557 | |
| 558 | TxnHook = InterceptContCreate(InterceptTxnHook, nullptr, nullptr); |
| 559 | InterceptHook = InterceptContCreate(InterceptInterceptHook, nullptr, nullptr); |
| 560 | |
| 561 | // Wait until after the cache lookup to decide whether to |
| 562 | // intercept a request. For cache hits, we will never intercept. |
| 563 | TSHttpHookAdd(TS_HTTP_CACHE_LOOKUP_COMPLETE_HOOK, TxnHook); |
| 564 | } |
nothing calls this directly
no test coverage detected