The code requires cc_generic_services = true in the service proto files. nng_msg payload is: request format : size:u32 + serialized MethodCall response format: size:u32 + serialized MethodCallResponse Dispatch is done using descriptors, message prototypes and protobuf.Any. Error handling is missing apart from error logging.
19 lines
337 B
Protocol Buffer
19 lines
337 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
import "google/protobuf/any.proto";
|
|
import "google/rpc/status.proto";
|
|
|
|
package mesytec.mnode.proto.mrpc;
|
|
|
|
message MethodCall
|
|
{
|
|
string service = 1;
|
|
string method = 2;
|
|
google.protobuf.Any request = 3;
|
|
}
|
|
|
|
message MethodCallResponse
|
|
{
|
|
google.rpc.Status status = 1;
|
|
google.protobuf.Any response = 2;
|
|
}
|