1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
// This file is @generated by prost-build.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ResourceMonitor {
/// The name of the resource monitor to instantiate. Must match a registered
/// resource monitor type.
/// See the :ref:`extensions listed in typed_config below <extension_category_envoy.resource_monitors>` for the default list of available resource monitor.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Configuration for the resource monitor being instantiated.
/// \[\#extension-category: envoy.resource_monitors\]
#[prost(oneof = "resource_monitor::ConfigType", tags = "3")]
pub config_type: ::core::option::Option<resource_monitor::ConfigType>,
}
/// Nested message and enum types in `ResourceMonitor`.
pub mod resource_monitor {
/// Configuration for the resource monitor being instantiated.
/// \[\#extension-category: envoy.resource_monitors\]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum ConfigType {
#[prost(message, tag = "3")]
TypedConfig(super::super::super::super::super::google::protobuf::Any),
}
}
impl ::prost::Name for ResourceMonitor {
const NAME: &'static str = "ResourceMonitor";
const PACKAGE: &'static str = "envoy.config.overload.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.overload.v3.ResourceMonitor".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.overload.v3.ResourceMonitor".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ThresholdTrigger {
/// If the resource pressure is greater than or equal to this value, the trigger
/// will enter saturation.
#[prost(double, tag = "1")]
pub value: f64,
}
impl ::prost::Name for ThresholdTrigger {
const NAME: &'static str = "ThresholdTrigger";
const PACKAGE: &'static str = "envoy.config.overload.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.overload.v3.ThresholdTrigger".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.overload.v3.ThresholdTrigger".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ScaledTrigger {
///
/// If the resource pressure is greater than this value, the trigger will be in the
/// : ref:`scaling <arch_overview_overload_manager-triggers-state>` state with value
/// `(pressure - scaling_threshold) / (saturation_threshold - scaling_threshold)`.
#[prost(double, tag = "1")]
pub scaling_threshold: f64,
/// If the resource pressure is greater than this value, the trigger will enter saturation.
#[prost(double, tag = "2")]
pub saturation_threshold: f64,
}
impl ::prost::Name for ScaledTrigger {
const NAME: &'static str = "ScaledTrigger";
const PACKAGE: &'static str = "envoy.config.overload.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.overload.v3.ScaledTrigger".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.overload.v3.ScaledTrigger".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Trigger {
/// The name of the resource this is a trigger for.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(oneof = "trigger::TriggerOneof", tags = "2, 3")]
pub trigger_oneof: ::core::option::Option<trigger::TriggerOneof>,
}
/// Nested message and enum types in `Trigger`.
pub mod trigger {
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum TriggerOneof {
#[prost(message, tag = "2")]
Threshold(super::ThresholdTrigger),
#[prost(message, tag = "3")]
Scaled(super::ScaledTrigger),
}
}
impl ::prost::Name for Trigger {
const NAME: &'static str = "Trigger";
const PACKAGE: &'static str = "envoy.config.overload.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.overload.v3.Trigger".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.overload.v3.Trigger".into()
}
}
///
/// Typed configuration for the "envoy.overload_actions.reduce_timeouts" action. See
/// : ref:`the docs <config_overload_manager_reducing_timeouts>` for an example of how to configure
/// the action with different timeouts and minimum values.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScaleTimersOverloadActionConfig {
/// A set of timer scaling rules to be applied.
#[prost(message, repeated, tag = "1")]
pub timer_scale_factors: ::prost::alloc::vec::Vec<
scale_timers_overload_action_config::ScaleTimer,
>,
}
/// Nested message and enum types in `ScaleTimersOverloadActionConfig`.
pub mod scale_timers_overload_action_config {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ScaleTimer {
/// The type of timer this minimum applies to.
#[prost(enumeration = "TimerType", tag = "1")]
pub timer: i32,
#[prost(oneof = "scale_timer::OverloadAdjust", tags = "2, 3")]
pub overload_adjust: ::core::option::Option<scale_timer::OverloadAdjust>,
}
/// Nested message and enum types in `ScaleTimer`.
pub mod scale_timer {
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum OverloadAdjust {
/// Sets the minimum duration as an absolute value.
#[prost(message, tag = "2")]
MinTimeout(
super::super::super::super::super::super::google::protobuf::Duration,
),
/// Sets the minimum duration as a percentage of the maximum value.
#[prost(message, tag = "3")]
MinScale(super::super::super::super::super::r#type::v3::Percent),
}
}
impl ::prost::Name for ScaleTimer {
const NAME: &'static str = "ScaleTimer";
const PACKAGE: &'static str = "envoy.config.overload.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.overload.v3.ScaleTimersOverloadActionConfig.ScaleTimer".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.overload.v3.ScaleTimersOverloadActionConfig.ScaleTimer"
.into()
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum TimerType {
/// Unsupported value; users must explicitly specify the timer they want scaled.
Unspecified = 0,
/// Adjusts the idle timer for downstream HTTP connections that takes effect when there are no active streams.
/// This affects the value of :ref:`HttpConnectionManager.common_http_protocol_options.idle_timeout <envoy_v3_api_field_config.core.v3.HttpProtocolOptions.idle_timeout>`
HttpDownstreamConnectionIdle = 1,
///
/// Adjusts the idle timer for HTTP streams initiated by downstream clients.
/// This affects the value of :ref:`RouteAction.idle_timeout <envoy_v3_api_field_config.route.v3.RouteAction.idle_timeout>` and
/// : ref:`HttpConnectionManager.stream_idle_timeout <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout>`
HttpDownstreamStreamIdle = 2,
///
/// Adjusts the timer for how long downstream clients have to finish transport-level negotiations
/// before the connection is closed.
/// This affects the value of
/// : ref:`FilterChain.transport_socket_connect_timeout <envoy_v3_api_field_config.listener.v3.FilterChain.transport_socket_connect_timeout>`.
TransportSocketConnect = 3,
///
/// Adjusts the max connection duration timer for downstream HTTP connections.
/// This affects the value of
/// : ref:`HttpConnectionManager.common_http_protocol_options.max_connection_duration <envoy_v3_api_field_config.core.v3.HttpProtocolOptions.max_connection_duration>`.
HttpDownstreamConnectionMax = 4,
///
/// Adjusts the timeout for the downstream codec to flush an ended stream.
/// This affects the value of :ref:`RouteAction.flush_timeout <envoy_v3_api_field_config.route.v3.RouteAction.flush_timeout>` and
/// : ref:`HttpConnectionManager.stream_flush_timeout <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_flush_timeout>`
HttpDownstreamStreamFlush = 5,
}
impl TimerType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "UNSPECIFIED",
Self::HttpDownstreamConnectionIdle => "HTTP_DOWNSTREAM_CONNECTION_IDLE",
Self::HttpDownstreamStreamIdle => "HTTP_DOWNSTREAM_STREAM_IDLE",
Self::TransportSocketConnect => "TRANSPORT_SOCKET_CONNECT",
Self::HttpDownstreamConnectionMax => "HTTP_DOWNSTREAM_CONNECTION_MAX",
Self::HttpDownstreamStreamFlush => "HTTP_DOWNSTREAM_STREAM_FLUSH",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED" => Some(Self::Unspecified),
"HTTP_DOWNSTREAM_CONNECTION_IDLE" => {
Some(Self::HttpDownstreamConnectionIdle)
}
"HTTP_DOWNSTREAM_STREAM_IDLE" => Some(Self::HttpDownstreamStreamIdle),
"TRANSPORT_SOCKET_CONNECT" => Some(Self::TransportSocketConnect),
"HTTP_DOWNSTREAM_CONNECTION_MAX" => {
Some(Self::HttpDownstreamConnectionMax)
}
"HTTP_DOWNSTREAM_STREAM_FLUSH" => Some(Self::HttpDownstreamStreamFlush),
_ => None,
}
}
}
}
impl ::prost::Name for ScaleTimersOverloadActionConfig {
const NAME: &'static str = "ScaleTimersOverloadActionConfig";
const PACKAGE: &'static str = "envoy.config.overload.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.overload.v3.ScaleTimersOverloadActionConfig".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.overload.v3.ScaleTimersOverloadActionConfig"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OverloadAction {
/// The name of the overload action. This is just a well-known string that
/// listeners can use for registering callbacks.
/// Valid known overload actions include:
///
/// * envoy.overload_actions.stop_accepting_requests
/// * envoy.overload_actions.disable_http_keepalive
/// * envoy.overload_actions.stop_accepting_connections
/// * envoy.overload_actions.reject_incoming_connections
/// * envoy.overload_actions.shrink_heap
/// * envoy.overload_actions.reduce_timeouts
/// * envoy.overload_actions.reset_high_memory_stream
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// A set of triggers for this action. The state of the action is the maximum
/// state of all triggers, which can be scalar values between 0 and 1 or
/// saturated. Listeners are notified when the overload action changes state.
/// An overload manager action can only have one trigger for a given resource
/// e.g. :ref:`Trigger.name <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique
/// in this list.
#[prost(message, repeated, tag = "2")]
pub triggers: ::prost::alloc::vec::Vec<Trigger>,
/// Configuration for the action being instantiated if applicable.
#[prost(message, optional, tag = "3")]
pub typed_config: ::core::option::Option<
super::super::super::super::google::protobuf::Any,
>,
}
impl ::prost::Name for OverloadAction {
const NAME: &'static str = "OverloadAction";
const PACKAGE: &'static str = "envoy.config.overload.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.overload.v3.OverloadAction".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.overload.v3.OverloadAction".into()
}
}
/// A point within the connection or request lifecycle that provides context on
/// whether to shed load at that given stage for the current entity at the
/// point.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LoadShedPoint {
/// This is just a well-known string for the LoadShedPoint.
/// Deployment specific LoadShedPoints e.g. within a custom extension should
/// be prefixed by the company / deployment name to avoid colliding with any
/// open source LoadShedPoints.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// A set of triggers for this LoadShedPoint. The LoadShedPoint will use the
/// the maximum state of all triggers, which can be scalar values between 0 and
/// 1 or saturated. A LoadShedPoint can only have one trigger for a given
/// resource e.g. :ref:`Trigger.name <envoy_v3_api_field_config.overload.v3.Trigger.name>` must be unique in
/// this list.
#[prost(message, repeated, tag = "2")]
pub triggers: ::prost::alloc::vec::Vec<Trigger>,
}
impl ::prost::Name for LoadShedPoint {
const NAME: &'static str = "LoadShedPoint";
const PACKAGE: &'static str = "envoy.config.overload.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.overload.v3.LoadShedPoint".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.overload.v3.LoadShedPoint".into()
}
}
/// Configuration for which accounts the WatermarkBuffer Factories should
/// track.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BufferFactoryConfig {
/// The minimum power of two at which Envoy starts tracking an account.
///
/// Envoy has 8 power of two buckets starting with the provided exponent below.
/// Concretely the 1st bucket contains accounts for streams that use
/// \[2^minimum_account_to_track_power_of_two,
/// 2^(minimum_account_to_track_power_of_two + 1)) bytes.
/// With the 8th bucket tracking accounts
///
/// >
/// > = 128 * 2^minimum_account_to_track_power_of_two.
///
/// The maximum value is 56, since we're using uint64_t for bytes counting,
/// and that's the last value that would use the 8 buckets. In practice,
/// we don't expect the proxy to be holding 2^56 bytes.
///
/// If omitted, Envoy should not do any tracking.
#[prost(uint32, tag = "1")]
pub minimum_account_to_track_power_of_two: u32,
}
impl ::prost::Name for BufferFactoryConfig {
const NAME: &'static str = "BufferFactoryConfig";
const PACKAGE: &'static str = "envoy.config.overload.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.overload.v3.BufferFactoryConfig".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.overload.v3.BufferFactoryConfig".into()
}
}
/// \[\#next-free-field: 6\]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OverloadManager {
/// The interval for refreshing resource usage.
#[prost(message, optional, tag = "1")]
pub refresh_interval: ::core::option::Option<
super::super::super::super::google::protobuf::Duration,
>,
/// The set of resources to monitor.
#[prost(message, repeated, tag = "2")]
pub resource_monitors: ::prost::alloc::vec::Vec<ResourceMonitor>,
/// The set of overload actions.
#[prost(message, repeated, tag = "3")]
pub actions: ::prost::alloc::vec::Vec<OverloadAction>,
/// The set of load shed points.
#[prost(message, repeated, tag = "5")]
pub loadshed_points: ::prost::alloc::vec::Vec<LoadShedPoint>,
/// Configuration for buffer factory.
#[prost(message, optional, tag = "4")]
pub buffer_factory_config: ::core::option::Option<BufferFactoryConfig>,
}
impl ::prost::Name for OverloadManager {
const NAME: &'static str = "OverloadManager";
const PACKAGE: &'static str = "envoy.config.overload.v3";
fn full_name() -> ::prost::alloc::string::String {
"envoy.config.overload.v3.OverloadManager".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/envoy.config.overload.v3.OverloadManager".into()
}
}