File: service.proto

package info (click to toggle)
golang-github-cretz-bine 0.2.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-backports, forky, sid, trixie
  • size: 652 kB
  • sloc: makefile: 3
file content (48 lines) | stat: -rw-r--r-- 1,096 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
To regen, with `protoc` on the `PATH` and `protoc-gen-go` on the `PATH` (usually via `$GOPATH/bin`), from this dir run:
  
    protoc --go_out=plugins=grpc:. service.proto
*/
syntax = "proto3";
package pb;

service SimpleService {
  rpc JoinStrings(JoinStringsRequest) returns (JoinStringsResponse);
  rpc ProvideStrings(ProvideStringsRequest) returns (stream ProvideStringsResponse);
  rpc ReceiveStrings(stream ReceiveStringsRequest) returns (ReceiveStringsResponse);
  rpc ExchangeStrings(stream ExchangeStringsRequest) returns (stream ExchangeStringsResponse);
}

message JoinStringsRequest {
  repeated string strings = 1;
  string delimiter = 2;
}

message JoinStringsResponse {
  string joined = 1;
}

message ProvideStringsRequest {
  uint32 count = 1;
}

message ProvideStringsResponse {
  string string = 1;
}

message ReceiveStringsRequest {
  string string = 1;
}

message ReceiveStringsResponse {
  repeated string received = 1;
}

message ExchangeStringsRequest {
  string string = 1;
  bool want_return = 2;
}

message ExchangeStringsResponse {
  repeated string received = 1;
}