File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,11 @@ function _M.new()
123123 cmd_handler = {},
124124 }, mt )
125125
126+ -- add default ping handler
127+ obj :on (" cmd_ping" , function (params )
128+ return { pong_resp = params }
129+ end )
130+
126131 return obj
127132end
128133
Original file line number Diff line number Diff line change @@ -73,8 +73,8 @@ message CmdKafkaFetch {
7373message PubSubReq {
7474 int64 sequence = 1 ;
7575 oneof req {
76- CmdEmpty cmd_empty = 31 ;
77- CmdPing cmd_ping = 32 ;
76+ CmdEmpty cmd_empty = 31 ;
77+ CmdPing cmd_ping = 32 ;
7878 CmdKafkaFetch cmd_kafka_fetch = 33 ;
7979 CmdKafkaListOffset cmd_kafka_list_offset = 34 ;
8080 };
@@ -135,9 +135,9 @@ message KafkaListOffsetResp {
135135message PubSubResp {
136136 int64 sequence = 1 ;
137137 oneof resp {
138- ErrorResp error_resp = 31 ;
139- PongResp pong_resp = 32 ;
140- KafkaFetchResp kafka_fetch_resp = 33 ;
138+ ErrorResp error_resp = 31 ;
139+ PongResp pong_resp = 32 ;
140+ KafkaFetchResp kafka_fetch_resp = 33 ;
141141 KafkaListOffsetResp kafka_list_offset_resp = 34 ;
142142 };
143143}
You can’t perform that action at this time.
0 commit comments