| 1 |
/* |
| 2 |
To regen, with `protoc` on the `PATH` and `protoc-gen-go` on the `PATH` (usually via `$GOPATH/bin`), from this dir run: |
| 3 |
|
| 4 |
protoc --go_out=plugins=grpc:. service.proto |
| 5 |
*/ |
| 6 |
syntax = "proto3"; |
| 7 |
package pb; |
| 8 |
|
| 9 |
service SimpleService { |
| 10 |
rpc JoinStrings(JoinStringsRequest) returns (JoinStringsResponse); |
| 11 |
rpc ProvideStrings(ProvideStringsRequest) returns (stream ProvideStringsResponse); |
| 12 |
rpc ReceiveStrings(stream ReceiveStringsRequest) returns (ReceiveStringsResponse); |
| 13 |
rpc ExchangeStrings(stream ExchangeStringsRequest) returns (stream ExchangeStringsResponse); |
| 14 |
} |
| 15 |
|
| 16 |
message JoinStringsRequest { |
| 17 |
repeated string strings = 1; |
| 18 |
string delimiter = 2; |
| 19 |
} |
| 20 |
|
| 21 |
message JoinStringsResponse { |
| 22 |
string joined = 1; |
| 23 |
} |
| 24 |
|
| 25 |
message ProvideStringsRequest { |
| 26 |
uint32 count = 1; |
| 27 |
} |
| 28 |
|
| 29 |
message ProvideStringsResponse { |
| 30 |
string string = 1; |
| 31 |
} |
| 32 |
|
| 33 |
message ReceiveStringsRequest { |
| 34 |
string string = 1; |
| 35 |
} |
| 36 |
|
| 37 |
message ReceiveStringsResponse { |
| 38 |
repeated string received = 1; |
| 39 |
} |
| 40 |
|
| 41 |
message ExchangeStringsRequest { |
| 42 |
string string = 1; |
| 43 |
bool want_return = 2; |
| 44 |
} |
| 45 |
|
| 46 |
message ExchangeStringsResponse { |
| 47 |
repeated string received = 1; |
| 48 |
} |