Add bi-di streaming variants of the discovery APIs. (#79)

Versioning for gRPC streaming APIs.
pull/80/head
tschroed 8 years ago committed by htuch
parent eb2e9a4ef7
commit 5e8fe4b392
  1. 11
      api/cds.proto
  2. 22
      api/eds.proto
  3. 14
      api/lds.proto
  4. 13
      api/rds.proto
  5. 2
      api/rlds.proto

@ -13,7 +13,7 @@ import "google/protobuf/wrappers.proto";
service ClusterDiscoveryService {
// Return list of all clusters, this proxy will load balance to.
rpc StreamClusters(ClusterDiscoveryRequest)
rpc StreamClusters(stream ClusterDiscoveryRequest)
returns (stream ClusterDiscoveryResponse) {
}
@ -27,11 +27,16 @@ service ClusterDiscoveryService {
}
message ClusterDiscoveryRequest {
Node node = 1;
// The version_info provided in the request messages will be the version_info
// received with the most recent successfully processed response or empty on
// the first request.
bytes version_info = 1;
Node node = 2;
}
message ClusterDiscoveryResponse {
repeated Cluster clusters = 1;
bytes version_info = 1;
repeated Cluster clusters = 2;
}
// Circuit breaking settings can be specified individually for each defined

@ -66,8 +66,12 @@ service EndpointDiscoveryService {
}
message EndpointDiscoveryRequest {
repeated string cluster_name = 1;
Node node = 2;
// The version_info provided in the request messages will be the version_info
// received with the most recent successfully processed response or empty on
// the first request.
bytes version_info = 1;
repeated string cluster_name = 2;
Node node = 3;
}
message LbEndpoint {
@ -107,7 +111,8 @@ message LocalityLbEndpoints {
}
message EndpointDiscoveryResponse {
repeated ClusterLoadAssignment cluster_endpoints = 1;
bytes version_info = 1;
repeated ClusterLoadAssignment cluster_endpoints = 2;
}
// Example load report from a single request:
@ -173,7 +178,11 @@ message ClusterStats {
}
message LoadAssignmentRequest {
Node node = 1; // zone/region where this Envoy runs
// The version_info provided in the request messages will be the version_info
// received with the most recent successfully processed response or empty on
// the first request.
bytes version_info = 1;
Node node = 2; // zone/region where this Envoy runs
repeated ClusterStats cluster_stats = 3;
}
@ -204,7 +213,8 @@ message ClusterLoadAssignment {
}
message LoadAssignmentResponse {
repeated ClusterLoadAssignment clusters = 1;
bytes version_info = 1;
repeated ClusterLoadAssignment clusters = 2;
// The default is 10 seconds.
google.protobuf.Duration load_reporting_interval = 2;
google.protobuf.Duration load_reporting_interval = 3;
}

@ -19,8 +19,9 @@ import "google/protobuf/wrappers.proto";
// consist of a complete update of all listeners. Existing connections will be
// allowed to drain from listeners that are no longer present.
service ListenerDiscoveryService {
rpc StreamListeners(ListenerDiscoveryRequest) returns
(stream ListenerDiscoveryResponse) {}
rpc StreamListeners(stream ListenerDiscoveryRequest)
returns (stream ListenerDiscoveryResponse) {
}
rpc FetchListeners(ListenerDiscoveryRequest)
returns (ListenerDiscoveryResponse) {
@ -32,11 +33,16 @@ service ListenerDiscoveryService {
}
message ListenerDiscoveryRequest {
Node node = 1;
// The version_info provided in the request messages will be the version_info
// received with the most recent successfully processed response or empty on
// the first request.
bytes version_info = 1;
Node node = 2;
}
message ListenerDiscoveryResponse {
repeated Listener listeners = 1;
bytes version_info = 1;
repeated Listener listeners = 2;
}
message Filter {

@ -13,7 +13,7 @@ import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";
service RouteDiscoveryService {
rpc StreamRoutes(RouteDiscoveryRequest)
rpc StreamRoutes(stream RouteDiscoveryRequest)
returns (stream RouteDiscoveryResponse) {
}
@ -27,16 +27,21 @@ service RouteDiscoveryService {
}
message RouteDiscoveryRequest {
Node node = 1;
// The version_info provided in the request messages will be the version_info
// received with the most recent successfully processed response or empty on
// the first request.
bytes version_info = 1;
Node node = 2;
// The name of the route configuration. This allows an Envoy configuration
// with multiple HTTP listeners (and associated HTTP connection manager
// filters) to use different route configurations. Each listener will bind its
// HTTP connection manager filter to a route table via this identifier.
string route_config_name = 2;
string route_config_name = 3;
}
message RouteDiscoveryResponse {
RouteConfiguration route_table = 1;
bytes version_info = 1;
RouteConfiguration route_table = 2;
}
// Compared to the cluster field that specifies a single upstream cluster as the

@ -99,4 +99,4 @@ message RateLimitResponse {
// in the RateLimitRequest. This can be used by the caller to determine which individual
// descriptors failed and/or what the currently configured limits are for all of them.
repeated DescriptorStatus statuses = 2;
}
}

Loading…
Cancel
Save