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

Function setupTransactionManagement

src/tscpp/api/utils_internal.cc:115–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115void
116setupTransactionManagement()
117{
118 // Reserve a transaction slot
119 TSAssert(TS_SUCCESS == TSUserArgIndexReserve(TS_USER_ARGS_TXN, "atscppapi", "ATS CPP API", &TRANSACTION_STORAGE_INDEX));
120 // We must always have a cleanup handler available
121 TSMutex mutex = nullptr;
122 TSCont cont = TSContCreate(handleTransactionEvents, mutex);
123 TSHttpHookAdd(TS_HTTP_POST_REMAP_HOOK, cont);
124 TSHttpHookAdd(TS_HTTP_SEND_REQUEST_HDR_HOOK, cont);
125 TSHttpHookAdd(TS_HTTP_READ_RESPONSE_HDR_HOOK, cont);
126 TSHttpHookAdd(TS_HTTP_SEND_RESPONSE_HDR_HOOK, cont);
127 TSHttpHookAdd(TS_HTTP_READ_CACHE_HDR_HOOK, cont);
128 TSHttpHookAdd(TS_HTTP_TXN_CLOSE_HOOK, cont);
129}
130
131void inline invokePluginForEvent(Plugin *plugin, TSHttpTxn ats_txn_handle, TSEvent event)
132{

Callers

nothing calls this directly

Calls 3

TSUserArgIndexReserveFunction · 0.85
TSContCreateFunction · 0.85
TSHttpHookAddFunction · 0.85

Tested by

no test coverage detected