syntax = "proto3";

package nameko;

service example {
  rpc unary_unary (ExampleRequest) returns (ExampleReply) {}
  rpc unary_stream (ExampleRequest) returns (stream ExampleReply) {}
  rpc stream_unary (stream ExampleRequest) returns (ExampleReply) {}
  rpc stream_stream (stream ExampleRequest) returns (stream ExampleReply) {}
  rpc not_found (ExampleRequest) returns (ExampleReply) {}
  rpc unary_error (ExampleRequest) returns (ExampleReply) {}
  rpc stream_error (ExampleRequest) returns (stream ExampleReply) {}
  rpc unary_error_via_context (ExampleRequest) returns (ExampleReply) {}
  rpc stream_error_via_context (ExampleRequest) returns (stream ExampleReply) {}
  rpc unary_grpc_error (ExampleRequest) returns (ExampleReply) {}
  rpc stream_grpc_error (ExampleRequest) returns (stream ExampleReply) {}
}


message ExampleRequest {
  string value = 1;
  int32 multiplier = 2;
  string blob = 3;  // arbitrary extra data
  int32 delay = 4;
  int32 response_count = 5;
  string compression = 6;
}



message ExampleReply {
  string message = 1;
  int32 seqno = 2;
  string metadata = 3;
}

