csds.proto 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. syntax = "proto3";
  2. package envoy.service.status.v2;
  3. import "envoy/admin/v2alpha/config_dump.proto";
  4. import "envoy/api/v2/core/base.proto";
  5. import "envoy/type/matcher/node.proto";
  6. import "google/api/annotations.proto";
  7. import "udpa/annotations/status.proto";
  8. option java_package = "io.envoyproxy.envoy.service.status.v2";
  9. option java_outer_classname = "CsdsProto";
  10. option java_multiple_files = true;
  11. option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/status/v2;statusv2";
  12. option java_generic_services = true;
  13. option (udpa.annotations.file_status).package_version_status = FROZEN;
  14. // [#protodoc-title: Client Status Discovery Service (CSDS)]
  15. // CSDS is Client Status Discovery Service. It can be used to get the status of
  16. // an xDS-compliant client from the management server's point of view. In the
  17. // future, it can potentially be used as an interface to get the current
  18. // state directly from the client.
  19. service ClientStatusDiscoveryService {
  20. rpc StreamClientStatus(stream ClientStatusRequest) returns (stream ClientStatusResponse) {
  21. }
  22. rpc FetchClientStatus(ClientStatusRequest) returns (ClientStatusResponse) {
  23. option (google.api.http).post = "/v2/discovery:client_status";
  24. option (google.api.http).body = "*";
  25. }
  26. }
  27. // Status of a config.
  28. enum ConfigStatus {
  29. // Status info is not available/unknown.
  30. UNKNOWN = 0;
  31. // Management server has sent the config to client and received ACK.
  32. SYNCED = 1;
  33. // Config is not sent.
  34. NOT_SENT = 2;
  35. // Management server has sent the config to client but hasn’t received
  36. // ACK/NACK.
  37. STALE = 3;
  38. // Management server has sent the config to client but received NACK.
  39. ERROR = 4;
  40. }
  41. // Request for client status of clients identified by a list of NodeMatchers.
  42. message ClientStatusRequest {
  43. // Management server can use these match criteria to identify clients.
  44. // The match follows OR semantics.
  45. repeated type.matcher.NodeMatcher node_matchers = 1;
  46. }
  47. // Detailed config (per xDS) with status.
  48. // [#next-free-field: 6]
  49. message PerXdsConfig {
  50. ConfigStatus status = 1;
  51. oneof per_xds_config {
  52. admin.v2alpha.ListenersConfigDump listener_config = 2;
  53. admin.v2alpha.ClustersConfigDump cluster_config = 3;
  54. admin.v2alpha.RoutesConfigDump route_config = 4;
  55. admin.v2alpha.ScopedRoutesConfigDump scoped_route_config = 5;
  56. }
  57. }
  58. // All xds configs for a particular client.
  59. message ClientConfig {
  60. // Node for a particular client.
  61. api.v2.core.Node node = 1;
  62. repeated PerXdsConfig xds_config = 2;
  63. }
  64. message ClientStatusResponse {
  65. // Client configs for the clients specified in the ClientStatusRequest.
  66. repeated ClientConfig config = 1;
  67. }