• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2021 The gRPC Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// Local copy of Envoy xDS proto file, used for testing only.
16
17syntax = "proto3";
18
19package envoy.service.status.v3;
20
21import "src/proto/grpc/testing/xds/v3/config_dump.proto";
22import "src/proto/grpc/testing/xds/v3/base.proto";
23
24
25// CSDS is Client Status Discovery Service. It can be used to get the status of
26// an xDS-compliant client from the management server's point of view. It can
27// also be used to get the current xDS states directly from the client.
28service ClientStatusDiscoveryService {
29  rpc StreamClientStatus(stream ClientStatusRequest) returns (stream ClientStatusResponse) {}
30  rpc FetchClientStatus(ClientStatusRequest) returns (ClientStatusResponse) {}
31}
32
33// Status of a config from a management server view.
34enum ConfigStatus {
35  // Status info is not available/unknown.
36  UNKNOWN = 0;
37
38  // Management server has sent the config to client and received ACK.
39  SYNCED = 1;
40
41  // Config is not sent.
42  NOT_SENT = 2;
43
44  // Management server has sent the config to client but hasn’t received
45  // ACK/NACK.
46  STALE = 3;
47
48  // Management server has sent the config to client but received NACK. The
49  // attached config dump will be the latest config (the rejected one), since
50  // it is the persisted version in the management server.
51  ERROR = 4;
52}
53
54// Request for client status of clients identified by a list of NodeMatchers.
55message ClientStatusRequest {
56  // The node making the csds request.
57  config.core.v3.Node node = 2;
58}
59
60// Detailed config (per xDS) with status.
61// [#next-free-field: 8]
62message PerXdsConfig {
63  // Config status generated by management servers. Will not be present if the
64  // CSDS server is an xDS client.
65  ConfigStatus status = 1;
66
67  oneof per_xds_config {
68    admin.v3.ListenersConfigDump listener_config = 2;
69
70    admin.v3.ClustersConfigDump cluster_config = 3;
71
72    admin.v3.RoutesConfigDump route_config = 4;
73
74    admin.v3.EndpointsConfigDump endpoint_config = 6;
75  }
76}
77
78// All xds configs for a particular client.
79message ClientConfig {
80  // Node for a particular client.
81  config.core.v3.Node node = 1;
82
83  repeated PerXdsConfig xds_config = 2;
84}
85
86message ClientStatusResponse {
87  // Client configs for the clients specified in the ClientStatusRequest.
88  repeated ClientConfig config = 1;
89}
90