This repository was archived by the owner on Dec 10, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
thriftpy/contrib/tracking Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ def _negotiation(self):
69
69
self ._oprot .write_message_begin (track_method , TMessageType .CALL ,
70
70
self ._seqid )
71
71
args = track_thrift .UpgradeArgs ()
72
+ self .tracker .init_handshake_info (args )
72
73
args .write (self ._oprot )
73
74
self ._oprot .write_message_end ()
74
75
self ._oprot .trans .flush ()
@@ -148,6 +149,7 @@ def _try_upgrade(self, iprot):
148
149
149
150
args = track_thrift .UpgradeArgs ()
150
151
args .read (iprot )
152
+ self .tracker .handle_handshake_info (args )
151
153
result = track_thrift .UpgradeReply ()
152
154
result .oneway = False
153
155
Original file line number Diff line number Diff line change @@ -101,6 +101,12 @@ def get_request_id(self):
101
101
return ctx .header .request_id
102
102
return str (uuid .uuid4 ())
103
103
104
+ def init_handshake_info (self , handshake_obj ):
105
+ pass
106
+
107
+ def handle_handshake_info (self , handshake_obj ):
108
+ pass
109
+
104
110
105
111
class ConsoleTracker (TrackerBase ):
106
112
def record (self , header , exception ):
Original file line number Diff line number Diff line change @@ -11,4 +11,6 @@ struct RequestHeader {
11
11
* This is the struct that a successful upgrade will reply with.
12
12
*/
13
13
struct UpgradeReply {}
14
- struct UpgradeArgs {}
14
+ struct UpgradeArgs {
15
+ 1: string app_id
16
+ }
You can’t perform that action at this time.
0 commit comments