This repository has been archived by the owner on Sep 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
routes.proto
40 lines (31 loc) · 1.75 KB
/
routes.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
syntax = "proto3";
package kedge.config.grpc.routes;
import "github.com/mwitkow/go-proto-validators/validator.proto";
/// Route is a mapping between invoked gRPC requests and backends that should serve it.
message Route {
/// backend_name is the string identifying the backend to send data to.
string backend_name = 1 [(validator.field) = {regex: "^[a-z_0-9.]{2,64}$"}];
/// service_name_matcher is a globbing expression that matches a full gRPC service name.
/// For example a method call to 'com.example.MyService/Create' would be matched by:
/// - com.example.MyService
/// - com.example.*
/// - com.*
/// - *
/// If not present, '*' is default.
string service_name_matcher = 2;
/// authority_host_matcher matches on the host part of the ':authority' header (a.k.a. Host header) enabling Virtual Host-like proxying.
/// The matching is done through lower-case string-equality.
/// If none are present, the route skips ':authority' checks.
string authority_host_matcher = 3;
/// metadata_matcher matches any gRPC inbound request metadata.
/// Each key provided must find a match for the route to match.
/// The matching is done through lower-case key match and explicit string-equality of values.
/// If a given metadata entry has more than one string value, at least one of them needs to match.
/// If none are present, the route skips metadata checks.
map<string, string> metadata_matcher = 4;
/// authority_port_matcher is optional port matcher. It matches on the port part of the ':authority' header.
// If 0 route will ignore port.
uint32 authority_port_matcher = 5;
bool autogenerated = 6;
/// TODO(mwitkow): Add fields that require TLS Client auth, or :authorization keys.
}