Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
79 lines (54 sloc) 1.76 KB
package vtrc_example;
option cc_generic_services = true;
message empty { }
message ping_req {
optional bytes payload = 1;
}
message ping_res { }
message generate_events_req {
optional uint32 count = 1;
optional bool callback = 2;
optional bool wait = 3;
optional uint32 payload_size = 4 [default = 64];
}
message generate_events_res {
optional uint32 count = 1;
}
message recursive_call_req {
optional uint32 balance = 1;
optional bytes payload = 2;
}
message recursive_call_res { }
message shutdown_req { }
message shutdown_res { }
message timer_register_req {
optional uint32 microseconds = 1;
}
message timer_register_res {
optional uint32 id = 1;
}
service stress_service {
rpc init (empty) returns (empty);
rpc ping (ping_req) returns (ping_res);
rpc generate_event (generate_events_req) returns (generate_events_res);
/// make recursive_callback if balance != 0
rpc recursive_call (recursive_call_req) returns (recursive_call_res);
/// shutdown server
rpc shutdown(shutdown_req) returns (shutdown_res);
rpc reg(timer_register_req) returns (timer_register_res);
rpc unreg(timer_register_res) returns (empty);
rpc close_me(empty) returns (empty);
}
/// ============== events or callbacks ================== ///
message event_req {
optional uint32 id = 1;
optional bool is_event = 2;
optional bytes payload = 4;
}
message event_res { }
service stress_events {
rpc event (event_req) returns (event_res);
/// make recursive_call if balance != 0
rpc recursive_callback (recursive_call_req) returns (recursive_call_res);
rpc timer_event( timer_register_res ) returns ( empty );
}
You can’t perform that action at this time.