1--  Licensed to the Apache Software Foundation (ASF) under one
2--  or more contributor license agreements.  See the NOTICE file
3--  distributed with this work for additional information
4--  regarding copyright ownership.  The ASF licenses this file
5--  to you under the Apache License, Version 2.0 (the
6--  "License"); you may not use this file except in compliance
7--  with the License.  You may obtain a copy of the License at
8--
9--  http://www.apache.org/licenses/LICENSE-2.0
10--
11--  Unless required by applicable law or agreed to in writing, software
12--  distributed under the License is distributed on an "AS IS" BASIS,
13--  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14--  See the License for the specific language governing permissions and
15--  limitations under the License.
16
17function do_global_txn_start()
18    ts.debug('global_txn_start')
19
20    ts.hook(TS_LUA_HOOK_READ_REQUEST_HDR, read_request)
21    ts.hook(TS_LUA_HOOK_SEND_REQUEST_HDR, send_request)
22    ts.hook(TS_LUA_HOOK_SEND_RESPONSE_HDR, send_response)
23    ts.hook(TS_LUA_HOOK_READ_RESPONSE_HDR, read_response)
24    ts.hook(TS_LUA_HOOK_CACHE_LOOKUP_COMPLETE, cache_lookup)
25    ts.hook(TS_LUA_HOOK_PRE_REMAP, pre_remap)
26    ts.hook(TS_LUA_HOOK_POST_REMAP, post_remap)
27    ts.hook(TS_LUA_HOOK_SELECT_ALT, select_alt)
28    ts.hook(TS_LUA_HOOK_OS_DNS, os_dns)
29    ts.hook(TS_LUA_HOOK_READ_CACHE_HDR, read_cache)
30    ts.hook(TS_LUA_HOOK_TXN_CLOSE, txn_close)
31
32    return 0
33end
34
35function read_request()
36    ts.debug('read_request')
37
38    return 0
39end
40
41function send_request()
42    ts.debug('send_request')
43
44    return 0
45end
46
47function read_response()
48    ts.debug('read_response')
49
50    return 0
51end
52
53function send_response()
54    ts.debug('send_response')
55
56    return 0
57end
58
59function post_remap()
60    ts.debug('post_remap')
61
62    return 0
63end
64
65function pre_remap()
66    ts.debug('pre_remap')
67
68    return 0
69end
70
71function os_dns()
72    ts.debug('os_dns')
73
74    return 0
75end
76
77function cache_lookup()
78    ts.debug('cache_lookup_complete')
79
80    return 0
81end
82
83function select_alt()
84    ts.debug('select_alt')
85
86    return 0
87end
88
89function read_cache()
90    ts.debug('read_cache')
91
92    return 0
93end
94
95function txn_close()
96    ts.debug('txn_close')
97
98    return 0
99end
100
101