• 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.admin.v3;
20
21import "google/protobuf/any.proto";
22import "google/protobuf/timestamp.proto";
23
24// Resource status from the view of a xDS client, which tells the synchronization
25// status between the xDS client and the xDS server.
26enum ClientResourceStatus {
27  // Resource status is not available/unknown.
28  UNKNOWN = 0;
29
30  // Client requested this resource but hasn't received any update from management
31  // server. The client will not fail requests, but will queue them until update
32  // arrives or the client times out waiting for the resource.
33  REQUESTED = 1;
34
35  // This resource has been requested by the client but has either not been
36  // delivered by the server or was previously delivered by the server and then
37  // subsequently removed from resources provided by the server. For more
38  // information, please refer to the :ref:`"Knowing When a Requested Resource
39  // Does Not Exist" <xds_protocol_resource_not_existed>` section.
40  DOES_NOT_EXIST = 2;
41
42  // Client received this resource and replied with ACK.
43  ACKED = 3;
44
45  // Client received this resource and replied with NACK.
46  NACKED = 4;
47}
48
49message UpdateFailureState {
50  // What the component configuration would have been if the update had succeeded.
51  // This field may not be populated by xDS clients due to storage overhead.
52  google.protobuf.Any failed_configuration = 1;
53
54  // Time of the latest failed update attempt.
55  google.protobuf.Timestamp last_update_attempt = 2;
56
57  // Details about the last failed update attempt.
58  string details = 3;
59
60  // This is the version of the rejected resource.
61  // [#not-implemented-hide:]
62  string version_info = 4;
63}
64
65// Envoy's listener manager fills this message with all currently known listeners. Listener
66// configuration information can be used to recreate an Envoy configuration by populating all
67// listeners as static listeners or by returning them in a LDS response.
68message ListenersConfigDump {
69  // Describes a statically loaded listener.
70  message StaticListener {
71    // The listener config.
72    google.protobuf.Any listener = 1;
73
74    // The timestamp when the Listener was last successfully updated.
75    google.protobuf.Timestamp last_updated = 2;
76  }
77
78  message DynamicListenerState {
79    // This is the per-resource version information. This version is currently taken from the
80    // :ref:`version_info <envoy_api_field_service.discovery.v3.DiscoveryResponse.version_info>` field at the time
81    // that the listener was loaded. In the future, discrete per-listener versions may be supported
82    // by the API.
83    string version_info = 1;
84
85    // The listener config.
86    google.protobuf.Any listener = 2;
87
88    // The timestamp when the Listener was last successfully updated.
89    google.protobuf.Timestamp last_updated = 3;
90  }
91
92  // Describes a dynamically loaded listener via the LDS API.
93  // [#next-free-field: 7]
94  message DynamicListener {
95    // The name or unique id of this listener, pulled from the DynamicListenerState config.
96    string name = 1;
97
98    // The listener state for any active listener by this name.
99    // These are listeners that are available to service data plane traffic.
100    DynamicListenerState active_state = 2;
101
102    // The listener state for any warming listener by this name.
103    // These are listeners that are currently undergoing warming in preparation to service data
104    // plane traffic. Note that if attempting to recreate an Envoy configuration from a
105    // configuration dump, the warming listeners should generally be discarded.
106    DynamicListenerState warming_state = 3;
107
108    // The listener state for any draining listener by this name.
109    // These are listeners that are currently undergoing draining in preparation to stop servicing
110    // data plane traffic. Note that if attempting to recreate an Envoy configuration from a
111    // configuration dump, the draining listeners should generally be discarded.
112    DynamicListenerState draining_state = 4;
113
114    // Set if the last update failed, cleared after the next successful update.
115    // The *error_state* field contains the rejected version of this particular
116    // resource along with the reason and timestamp. For successfully updated or
117    // acknowledged resource, this field should be empty.
118    UpdateFailureState error_state = 5;
119
120    // The client status of this resource.
121    // [#not-implemented-hide:]
122    ClientResourceStatus client_status = 6;
123  }
124
125  // This is the :ref:`version_info <envoy_api_field_service.discovery.v3.DiscoveryResponse.version_info>` in the
126  // last processed LDS discovery response. If there are only static bootstrap listeners, this field
127  // will be "".
128  string version_info = 1;
129
130  // The statically loaded listener configs.
131  repeated StaticListener static_listeners = 2;
132
133  // State for any warming, active, or draining listeners.
134  repeated DynamicListener dynamic_listeners = 3;
135}
136
137// Envoy's cluster manager fills this message with all currently known clusters. Cluster
138// configuration information can be used to recreate an Envoy configuration by populating all
139// clusters as static clusters or by returning them in a CDS response.
140message ClustersConfigDump {
141  // Describes a statically loaded cluster.
142  message StaticCluster {
143    // The cluster config.
144    google.protobuf.Any cluster = 1;
145
146    // The timestamp when the Cluster was last updated.
147    google.protobuf.Timestamp last_updated = 2;
148  }
149
150  // Describes a dynamically loaded cluster via the CDS API.
151  // [#next-free-field: 6]
152  message DynamicCluster {
153    // This is the per-resource version information. This version is currently taken from the
154    // :ref:`version_info <envoy_api_field_service.discovery.v3.DiscoveryResponse.version_info>` field at the time
155    // that the cluster was loaded. In the future, discrete per-cluster versions may be supported by
156    // the API.
157    string version_info = 1;
158
159    // The cluster config.
160    google.protobuf.Any cluster = 2;
161
162    // The timestamp when the Cluster was last updated.
163    google.protobuf.Timestamp last_updated = 3;
164
165    // Set if the last update failed, cleared after the next successful update.
166    // The *error_state* field contains the rejected version of this particular
167    // resource along with the reason and timestamp. For successfully updated or
168    // acknowledged resource, this field should be empty.
169    // [#not-implemented-hide:]
170    UpdateFailureState error_state = 4;
171
172    // The client status of this resource.
173    // [#not-implemented-hide:]
174    ClientResourceStatus client_status = 5;
175  }
176
177  // This is the :ref:`version_info <envoy_api_field_service.discovery.v3.DiscoveryResponse.version_info>` in the
178  // last processed CDS discovery response. If there are only static bootstrap clusters, this field
179  // will be "".
180  string version_info = 1;
181
182  // The statically loaded cluster configs.
183  repeated StaticCluster static_clusters = 2;
184
185  // The dynamically loaded active clusters. These are clusters that are available to service
186  // data plane traffic.
187  repeated DynamicCluster dynamic_active_clusters = 3;
188
189  // The dynamically loaded warming clusters. These are clusters that are currently undergoing
190  // warming in preparation to service data plane traffic. Note that if attempting to recreate an
191  // Envoy configuration from a configuration dump, the warming clusters should generally be
192  // discarded.
193  repeated DynamicCluster dynamic_warming_clusters = 4;
194}
195
196// Envoy's RDS implementation fills this message with all currently loaded routes, as described by
197// their RouteConfiguration objects. Static routes that are either defined in the bootstrap configuration
198// or defined inline while configuring listeners are separated from those configured dynamically via RDS.
199// Route configuration information can be used to recreate an Envoy configuration by populating all routes
200// as static routes or by returning them in RDS responses.
201message RoutesConfigDump {
202  message StaticRouteConfig {
203    // The route config.
204    google.protobuf.Any route_config = 1;
205
206    // The timestamp when the Route was last updated.
207    google.protobuf.Timestamp last_updated = 2;
208  }
209
210  // [#next-free-field: 6]
211  message DynamicRouteConfig {
212    // This is the per-resource version information. This version is currently taken from the
213    // :ref:`version_info <envoy_api_field_service.discovery.v3.DiscoveryResponse.version_info>` field at the time that
214    // the route configuration was loaded.
215    string version_info = 1;
216
217    // The route config.
218    google.protobuf.Any route_config = 2;
219
220    // The timestamp when the Route was last updated.
221    google.protobuf.Timestamp last_updated = 3;
222
223    // Set if the last update failed, cleared after the next successful update.
224    // The *error_state* field contains the rejected version of this particular
225    // resource along with the reason and timestamp. For successfully updated or
226    // acknowledged resource, this field should be empty.
227    // [#not-implemented-hide:]
228    UpdateFailureState error_state = 4;
229
230    // The client status of this resource.
231    // [#not-implemented-hide:]
232    ClientResourceStatus client_status = 5;
233  }
234
235  // The statically loaded route configs.
236  repeated StaticRouteConfig static_route_configs = 2;
237
238  // The dynamically loaded route configs.
239  repeated DynamicRouteConfig dynamic_route_configs = 3;
240}
241
242// Envoy's admin fill this message with all currently known endpoints. Endpoint
243// configuration information can be used to recreate an Envoy configuration by populating all
244// endpoints as static endpoints or by returning them in an EDS response.
245message EndpointsConfigDump {
246  message StaticEndpointConfig {
247    // The endpoint config.
248    google.protobuf.Any endpoint_config = 1;
249
250    // [#not-implemented-hide:] The timestamp when the Endpoint was last updated.
251    google.protobuf.Timestamp last_updated = 2;
252  }
253
254  // [#next-free-field: 6]
255  message DynamicEndpointConfig {
256    // [#not-implemented-hide:] This is the per-resource version information. This version is currently taken from the
257    // :ref:`version_info <envoy_api_field_service.discovery.v3.DiscoveryResponse.version_info>` field at the time that
258    // the endpoint configuration was loaded.
259    string version_info = 1;
260
261    // The endpoint config.
262    google.protobuf.Any endpoint_config = 2;
263
264    // [#not-implemented-hide:] The timestamp when the Endpoint was last updated.
265    google.protobuf.Timestamp last_updated = 3;
266
267    // Set if the last update failed, cleared after the next successful update.
268    // The *error_state* field contains the rejected version of this particular
269    // resource along with the reason and timestamp. For successfully updated or
270    // acknowledged resource, this field should be empty.
271    // [#not-implemented-hide:]
272    UpdateFailureState error_state = 4;
273
274    // The client status of this resource.
275    // [#not-implemented-hide:]
276    ClientResourceStatus client_status = 5;
277  }
278
279  // The statically loaded endpoint configs.
280  repeated StaticEndpointConfig static_endpoint_configs = 2;
281
282  // The dynamically loaded endpoint configs.
283  repeated DynamicEndpointConfig dynamic_endpoint_configs = 3;
284}
285