-
-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy pathtestservice.proto
More file actions
41 lines (29 loc) · 1.06 KB
/
testservice.proto
File metadata and controls
41 lines (29 loc) · 1.06 KB
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
syntax = "proto3";
package scalapb.zio_grpc;
import "scalapb/scalapb.proto";
message Request {
enum Scenario {
OK = 0;
ERROR_NOW = 1; // fail with an error
ERROR_AFTER = 2; // for server streaming, error after two responses
DELAY = 3; // do not return a response, to test cancellations
LARGE_STREAM = 4; // stream of large elements, to test backpressure
DIE = 5; // fail
UNAVAILABLE = 6; // fail with UNAVAILABLE, to test client retries
}
Scenario scenario = 1;
int32 in = 2;
}
message Response { string out = 1; }
message ResponseTypeMapped {
option (scalapb.message).type = "scalapb.zio_grpc.WrappedString";
string out = 1;
}
service TestService {
rpc Unary(Request) returns (Response);
rpc UnaryTypeMapped(Request) returns (ResponseTypeMapped);
rpc ServerStreaming(Request) returns (stream Response);
rpc ServerStreamingTypeMapped(Request) returns (stream ResponseTypeMapped);
rpc ClientStreaming(stream Request) returns (Response);
rpc BidiStreaming(stream Request) returns (stream Response);
}