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

Function handleGlobalPluginEvents

src/tscpp/api/GlobalPlugin.cc:48–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46namespace
47{
48static int
49handleGlobalPluginEvents(TSCont cont, TSEvent event, void *edata)
50{
51 GlobalPluginState *state = static_cast<GlobalPluginState *>(TSContDataGet(cont));
52
53 if (event == TS_EVENT_HTTP_SELECT_ALT) {
54 TSHttpAltInfo alt = static_cast<TSHttpAltInfo>(edata);
55 utils::internal::invokePluginForEvent(state->global_plugin_, alt, event);
56 return 0;
57 }
58
59 TSHttpTxn txn = static_cast<TSHttpTxn>(edata);
60 if (state->ignore_internal_transactions_ && TSHttpTxnIsInternal(txn)) {
61 LOG_DEBUG("Ignoring event %d on internal transaction %p for global plugin %p", event, txn, state->global_plugin_);
62 TSHttpTxnReenable(txn, TS_EVENT_HTTP_CONTINUE);
63 } else {
64 LOG_DEBUG("Invoking global plugin %p for event %d on transaction %p", state->global_plugin_, event, txn);
65 utils::internal::invokePluginForEvent(state->global_plugin_, txn, event);
66 }
67 return 0;
68}
69
70} /* anonymous namespace */
71

Callers

nothing calls this directly

Calls 4

TSContDataGetFunction · 0.85
invokePluginForEventFunction · 0.85
TSHttpTxnIsInternalFunction · 0.85
TSHttpTxnReenableFunction · 0.85

Tested by

no test coverage detected