-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbenchmark.yaml
More file actions
64 lines (58 loc) · 1.62 KB
/
benchmark.yaml
File metadata and controls
64 lines (58 loc) · 1.62 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
## this config requires the grpc-echo server to be running on localhost:8081
## https://github.com/semior001/grpc-echo
## docker run --rm -p 8081:8080 semior/grpc-echo:latest
version: "1"
upstreams:
echo:
address: localhost:8081
tls: false
serve-reflection: true
rules:
- match:
uri: grpc_echo.v1.EchoService/Echo
header: { test: mocker }
respond:
body: |
message Response {
option (groxypb.target) = true;
}
- match:
uri: grpc_echo.v1.EchoService/Echo
header: { test: reverse-proxy }
forward:
upstream: echo
- match:
uri: grpc_echo.v1.EchoService/Echo
header: { test: templated }
respond:
body: |
message Response {
option (groxypb.target) = true;
string pong = 2 [(groxypb.value) = `{{.ping}} pong`];
}
- match:
uri: grpc_echo.v1.EchoService/Echo
body: |
message Request {
option (groxypb.target) = true;
string ping = 1 [(groxypb.value) = `request-matcher`];
}
respond:
body: |
message Response {
option (groxypb.target) = true;
string pong = 2 [(groxypb.value) = `request matched`];
}
- match:
uri: grpc_echo.v1.EchoService/Echo
body: |
message Request {
option (groxypb.target) = true;
string ping = 1 [(groxypb.matcher) = `ping == "complex-request-matcher"`];
}
respond:
body: |
message Response {
option (groxypb.target) = true;
string pong = 2 [(groxypb.value) = `request matched`];
}