Codebase list golang-github-go-kit-kit / f9d8373b-9935-4125-b2b2-694ccabcf82b/v0.1.0 examples / addsvc / pb / addsvc.proto
f9d8373b-9935-4125-b2b2-694ccabcf82b/v0.1.0

Tree @f9d8373b-9935-4125-b2b2-694ccabcf82b/v0.1.0 (Download .tar.gz)

addsvc.proto @f9d8373b-9935-4125-b2b2-694ccabcf82b/v0.1.0raw · history · blame

syntax = "proto3";

package pb;

// The Add service definition.
service Add {
  // Sums two integers.
  rpc Sum (SumRequest) returns (SumReply) {}

  // Concatenates two strings
  rpc Concat (ConcatRequest) returns (ConcatReply) {}
}

// The sum request contains two parameters.
message SumRequest {
  int64 a = 1;
  int64 b = 2;
}

// The sum response contains the result of the calculation.
message SumReply {
  int64 v = 1;
  string err = 2;
}

// The Concat request contains two parameters.
message ConcatRequest {
  string a = 1;
  string b = 2;
}

// The Concat response contains the result of the concatenation.
message ConcatReply {
  string v = 1;
  string err = 2;
}