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

Function ts_lua_inject_remap_api

plugins/lua/ts_lua_remap.cc:49–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47static void ts_lua_inject_remap_variables(lua_State *L);
48
49void
50ts_lua_inject_remap_api(lua_State *L)
51{
52 ts_lua_inject_remap_variables(L);
53
54 lua_newtable(L);
55
56 lua_pushcfunction(L, ts_lua_remap_get_from_url_host);
57 lua_setfield(L, -2, "get_from_url_host");
58
59 lua_pushcfunction(L, ts_lua_remap_get_from_url_port);
60 lua_setfield(L, -2, "get_from_url_port");
61
62 lua_pushcfunction(L, ts_lua_remap_get_from_url_scheme);
63 lua_setfield(L, -2, "get_from_url_scheme");
64
65 lua_pushcfunction(L, ts_lua_remap_get_from_uri);
66 lua_setfield(L, -2, "get_from_uri");
67
68 lua_pushcfunction(L, ts_lua_remap_get_from_url);
69 lua_setfield(L, -2, "get_from_url");
70
71 lua_pushcfunction(L, ts_lua_remap_get_to_url_host);
72 lua_setfield(L, -2, "get_to_url_host");
73
74 lua_pushcfunction(L, ts_lua_remap_get_to_url_port);
75 lua_setfield(L, -2, "get_to_url_port");
76
77 lua_pushcfunction(L, ts_lua_remap_get_to_url_scheme);
78 lua_setfield(L, -2, "get_to_url_scheme");
79
80 lua_pushcfunction(L, ts_lua_remap_get_to_uri);
81 lua_setfield(L, -2, "get_to_uri");
82
83 lua_pushcfunction(L, ts_lua_remap_get_to_url);
84 lua_setfield(L, -2, "get_to_url");
85
86 lua_setfield(L, -2, "remap");
87}
88
89static void
90ts_lua_inject_remap_variables(lua_State *L)

Callers 1

ts_lua_inject_ts_apiFunction · 0.85

Calls 1

Tested by

no test coverage detected