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

Function ts_lua_client_entry

plugins/lua/ts_lua_transform.cc:24–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22static int ts_lua_transform_handler(TSCont contp, ts_lua_http_transform_ctx *transform_ctx, TSEvent event, int n);
23
24int
25ts_lua_client_entry(TSCont contp, TSEvent ev, void *edata)
26{
27 int n, event;
28 TSVIO input_vio;
29 ts_lua_http_transform_ctx *transform_ctx;
30
31 event = (int)ev;
32 transform_ctx = (ts_lua_http_transform_ctx *)TSContDataGet(contp);
33
34 n = 0;
35
36 switch (event) {
37 case TS_EVENT_ERROR:
38 input_vio = TSVConnWriteVIOGet(contp);
39 TSContCall(TSVIOContGet(input_vio), TS_EVENT_ERROR, input_vio);
40 break;
41
42 case TS_EVENT_VCONN_WRITE_COMPLETE:
43 Dbg(dbg_ctl, "[%s] received TS_EVENT_VCONN_WRITE_COMPLETE", __FUNCTION__);
44 break;
45
46 case TS_LUA_EVENT_COROUTINE_CONT:
47 n = (intptr_t)edata;
48 /* FALL THROUGH */
49 case TS_EVENT_VCONN_WRITE_READY:
50 default:
51 ts_lua_client_handler(contp, transform_ctx, TSEvent(event), n);
52 break;
53 }
54
55 return 0;
56}
57
58static int
59ts_lua_client_handler(TSCont contp, ts_lua_http_transform_ctx *transform_ctx, TSEvent event, int n)

Callers

nothing calls this directly

Calls 5

TSContDataGetFunction · 0.85
TSVConnWriteVIOGetFunction · 0.85
TSContCallFunction · 0.85
TSVIOContGetFunction · 0.85
ts_lua_client_handlerFunction · 0.85

Tested by

no test coverage detected