2019-06-26 18:23:10 +03:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
// Router service is used by the proxy to lookup routes
|
|
|
|
service Router {
|
|
|
|
rpc Lookup(LookupRequest) returns (LookupResponse) {};
|
|
|
|
}
|
|
|
|
|
|
|
|
// LookupRequest is made to Lookup
|
|
|
|
message LookupRequest {
|
|
|
|
Query query = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// LookupResponse is returns by Lookup
|
|
|
|
message LookupResponse {
|
|
|
|
repeated Route routes = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Query is passed in a LookupRequest
|
|
|
|
message Query {
|
2019-07-09 18:45:31 +03:00
|
|
|
// service to lookup
|
|
|
|
string service = 1;
|
2019-06-26 18:23:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// Route is a service route
|
|
|
|
message Route {
|
|
|
|
// service for the route
|
2019-07-09 18:45:31 +03:00
|
|
|
string service = 1;
|
|
|
|
// the address that advertise this route
|
|
|
|
string address = 2;
|
2019-06-26 18:23:10 +03:00
|
|
|
// gateway as the next hop
|
2019-07-09 18:45:31 +03:00
|
|
|
string gateway = 3;
|
2019-06-26 18:23:10 +03:00
|
|
|
// the network for this destination
|
|
|
|
string network = 4;
|
2019-07-09 18:45:31 +03:00
|
|
|
// the network link
|
|
|
|
string link = 5;
|
2019-06-26 18:23:10 +03:00
|
|
|
// the metric / score of this route
|
2019-07-09 18:45:31 +03:00
|
|
|
int64 metric = 6;
|
2019-06-26 18:23:10 +03:00
|
|
|
}
|