forked from vyshane/grpc-swift-combine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_scenarios.proto
57 lines (46 loc) · 1.54 KB
/
test_scenarios.proto
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
49
50
51
52
53
54
55
56
57
// Copyright 2019, Vy-Shane Xie
// Licensed under the Apache License, Version 2.0
//
// Scenarios for end to end tests.
syntax = "proto3";
service UnaryScenarios {
rpc Ok (EchoRequest) returns (EchoResponse);
rpc FailedPrecondition (EchoRequest) returns (Empty);
rpc NoResponse (EchoRequest) returns (Empty);
}
service ClientStreamingScenarios {
rpc Ok (stream EchoRequest) returns (EchoResponse);
rpc FailedPrecondition (stream EchoRequest) returns (Empty);
rpc NoResponse (stream EchoRequest) returns (Empty);
}
service ServerStreamingScenarios {
rpc Ok (EchoRequest) returns (stream EchoResponse);
rpc FailedPrecondition (EchoRequest) returns (stream Empty);
rpc NoResponse (EchoRequest) returns (stream Empty);
}
service BidirectionalStreamingScenarios {
rpc Ok (stream EchoRequest) returns (stream EchoResponse);
rpc FailedPrecondition (stream EchoRequest) returns (stream Empty);
rpc NoResponse (stream EchoRequest) returns (stream Empty);
}
service RetryScenarios {
rpc FailThenSucceed (FailThenSucceedRequest) returns (FailThenSucceedResponse);
rpc AuthenticatedRpc (EchoRequest) returns (EchoResponse);
}
message EchoRequest {
string message = 1;
}
message EchoResponse {
string message = 1;
}
message Empty {}
message FailThenSucceedRequest {
// Key used to partition failure counts
string key = 1;
// Number of failures that the service should respond with before succeeding
uint32 num_failures = 2;
}
message FailThenSucceedResponse {
// Number of failures recorded before succeeding
uint32 num_failures = 1;
}