Check-in ubermessage-related thrift specs
This commit is contained in:
parent
5caa61e8cb
commit
b5cff914c0
src/interface
@ -33,3 +33,11 @@ mg_thrift_library(
|
||||
"${MG_INTERFACE_PATH}" #output_path
|
||||
"interface" #include_prefix
|
||||
)
|
||||
|
||||
mg_thrift_library(
|
||||
"ubermessage" #file_name
|
||||
"UberServer" #services
|
||||
"${MG_INTERFACE_PATH}" #file_path
|
||||
"${MG_INTERFACE_PATH}" #output_path
|
||||
"interface" #include_prefix
|
||||
)
|
||||
|
47
src/interface/ubermessage.thrift
Normal file
47
src/interface/ubermessage.thrift
Normal file
@ -0,0 +1,47 @@
|
||||
//include "address.thrift"
|
||||
|
||||
struct HeartbeatRequest {
|
||||
1: bool test;
|
||||
}
|
||||
|
||||
struct HeartbeatResponse {
|
||||
1: bool test;
|
||||
}
|
||||
|
||||
struct ScanAllRequest{
|
||||
1: bool test;
|
||||
}
|
||||
|
||||
struct ScanAllResponse {
|
||||
1: bool test;
|
||||
}
|
||||
|
||||
union ToStorageEngine{
|
||||
1: ScanAllRequest scan_all_request;
|
||||
2: HeartbeatRequest heartbeat_request;
|
||||
}
|
||||
|
||||
union ToQueryEngine {
|
||||
1: ScanAllResponse scan_all_response;
|
||||
}
|
||||
|
||||
union ToCoordinator {
|
||||
1: HeartbeatResponse heartbeat_response;
|
||||
}
|
||||
|
||||
union HighLevelUnion {
|
||||
1: ToStorageEngine to_storage_engine;
|
||||
2: ToQueryEngine to_query_engine;
|
||||
3: ToCoordinator to_coordinator;
|
||||
}
|
||||
|
||||
struct UberMessage {
|
||||
//1: address.Address to_address;
|
||||
//2: address.Address from_address;
|
||||
3: i64 request_id;
|
||||
4: HighLevelUnion high_level_union;
|
||||
}
|
||||
|
||||
service UberServer {
|
||||
oneway void ReceiveUberMessage(1: UberMessage uber_message)
|
||||
}
|
Loading…
Reference in New Issue
Block a user