envoy_types/generated/envoy.extensions.filters.http.fault.v3.rs
1// This file is @generated by prost-build.
2/// \[\#next-free-field: 6\]
3#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct FaultAbort {
5 /// The percentage of requests/operations/connections that will be aborted with the error code
6 /// provided.
7 #[prost(message, optional, tag = "3")]
8 pub percentage: ::core::option::Option<
9 super::super::super::super::super::r#type::v3::FractionalPercent,
10 >,
11 #[prost(oneof = "fault_abort::ErrorType", tags = "2, 5, 4")]
12 pub error_type: ::core::option::Option<fault_abort::ErrorType>,
13}
14/// Nested message and enum types in `FaultAbort`.
15pub mod fault_abort {
16 ///
17 /// Fault aborts are controlled via an HTTP header (if applicable). See the
18 /// : ref:`HTTP fault filter <config_http_filters_fault_injection_http_header>` documentation for
19 /// more information.
20 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
21 pub struct HeaderAbort {}
22 impl ::prost::Name for HeaderAbort {
23 const NAME: &'static str = "HeaderAbort";
24 const PACKAGE: &'static str = "envoy.extensions.filters.http.fault.v3";
25 fn full_name() -> ::prost::alloc::string::String {
26 "envoy.extensions.filters.http.fault.v3.FaultAbort.HeaderAbort".into()
27 }
28 fn type_url() -> ::prost::alloc::string::String {
29 "type.googleapis.com/envoy.extensions.filters.http.fault.v3.FaultAbort.HeaderAbort"
30 .into()
31 }
32 }
33 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
34 pub enum ErrorType {
35 /// HTTP status code to use to abort the HTTP request.
36 #[prost(uint32, tag = "2")]
37 HttpStatus(u32),
38 /// gRPC status code to use to abort the gRPC request.
39 #[prost(uint32, tag = "5")]
40 GrpcStatus(u32),
41 /// Fault aborts are controlled via an HTTP header (if applicable).
42 #[prost(message, tag = "4")]
43 HeaderAbort(HeaderAbort),
44 }
45}
46impl ::prost::Name for FaultAbort {
47 const NAME: &'static str = "FaultAbort";
48 const PACKAGE: &'static str = "envoy.extensions.filters.http.fault.v3";
49 fn full_name() -> ::prost::alloc::string::String {
50 "envoy.extensions.filters.http.fault.v3.FaultAbort".into()
51 }
52 fn type_url() -> ::prost::alloc::string::String {
53 "type.googleapis.com/envoy.extensions.filters.http.fault.v3.FaultAbort".into()
54 }
55}
56/// \[\#next-free-field: 17\]
57#[derive(Clone, PartialEq, ::prost::Message)]
58pub struct HttpFault {
59 /// If specified, the filter will inject delays based on the values in the
60 /// object.
61 #[prost(message, optional, tag = "1")]
62 pub delay: ::core::option::Option<
63 super::super::super::common::fault::v3::FaultDelay,
64 >,
65 /// If specified, the filter will abort requests based on the values in
66 /// the object. At least `abort` or `delay` must be specified.
67 #[prost(message, optional, tag = "2")]
68 pub abort: ::core::option::Option<FaultAbort>,
69 /// Specifies the name of the (destination) upstream cluster that the
70 /// filter should match on. Fault injection will be restricted to requests
71 /// bound to the specific upstream cluster.
72 #[prost(string, tag = "3")]
73 pub upstream_cluster: ::prost::alloc::string::String,
74 /// Specifies a set of headers that the filter should match on. The fault
75 /// injection filter can be applied selectively to requests that match a set of
76 /// headers specified in the fault filter config. The chances of actual fault
77 /// injection further depend on the value of the :ref:`percentage <envoy_v3_api_field_extensions.filters.http.fault.v3.FaultAbort.percentage>` field.
78 /// The filter will check the request's headers against all the specified
79 /// headers in the filter config. A match will happen if all the headers in the
80 /// config are present in the request with the same values (or based on
81 /// presence if the `value` field is not in the config).
82 #[prost(message, repeated, tag = "4")]
83 pub headers: ::prost::alloc::vec::Vec<
84 super::super::super::super::super::config::route::v3::HeaderMatcher,
85 >,
86 /// Faults are injected for the specified list of downstream hosts. If this
87 /// setting is not set, faults are injected for all downstream nodes.
88 /// Downstream node name is taken from :ref:`the HTTP x-envoy-downstream-service-node <config_http_conn_man_headers_downstream-service-node>` header and compared
89 /// against downstream_nodes list.
90 #[prost(string, repeated, tag = "5")]
91 pub downstream_nodes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
92 /// The maximum number of faults that can be active at a single time via the configured fault
93 /// filter. Note that because this setting can be overridden at the route level, it's possible
94 /// for the number of active faults to be greater than this value (if injected via a different
95 /// route). If not specified, defaults to unlimited. This setting can be overridden via
96 /// `runtime <config_http_filters_fault_injection_runtime>` and any faults that are not injected
97 /// due to overflow will be indicated via the `faults_overflow <config_http_filters_fault_injection_stats>` stat.
98 ///
99 /// .. attention::
100 /// Like other :ref:`circuit breakers <arch_overview_circuit_break>` in Envoy, this is a fuzzy
101 /// limit. It's possible for the number of active faults to rise slightly above the configured
102 /// amount due to the implementation details.
103 #[prost(message, optional, tag = "6")]
104 pub max_active_faults: ::core::option::Option<
105 super::super::super::super::super::super::google::protobuf::UInt32Value,
106 >,
107 /// The response rate limit to be applied to the response body of the stream. When configured,
108 /// the percentage can be overridden by the :ref:`fault.http.rate_limit.response_percent <config_http_filters_fault_injection_runtime>` runtime key.
109 ///
110 /// .. attention::
111 /// This is a per-stream limit versus a connection level limit. This means that concurrent streams
112 /// will each get an independent limit.
113 #[prost(message, optional, tag = "7")]
114 pub response_rate_limit: ::core::option::Option<
115 super::super::super::common::fault::v3::FaultRateLimit,
116 >,
117 /// The runtime key to override the :ref:`default <config_http_filters_fault_injection_runtime>`
118 /// runtime. The default is: fault.http.delay.fixed_delay_percent
119 #[prost(string, tag = "8")]
120 pub delay_percent_runtime: ::prost::alloc::string::String,
121 /// The runtime key to override the :ref:`default <config_http_filters_fault_injection_runtime>`
122 /// runtime. The default is: fault.http.abort.abort_percent
123 #[prost(string, tag = "9")]
124 pub abort_percent_runtime: ::prost::alloc::string::String,
125 /// The runtime key to override the :ref:`default <config_http_filters_fault_injection_runtime>`
126 /// runtime. The default is: fault.http.delay.fixed_duration_ms
127 #[prost(string, tag = "10")]
128 pub delay_duration_runtime: ::prost::alloc::string::String,
129 /// The runtime key to override the :ref:`default <config_http_filters_fault_injection_runtime>`
130 /// runtime. The default is: fault.http.abort.http_status
131 #[prost(string, tag = "11")]
132 pub abort_http_status_runtime: ::prost::alloc::string::String,
133 /// The runtime key to override the :ref:`default <config_http_filters_fault_injection_runtime>`
134 /// runtime. The default is: fault.http.max_active_faults
135 #[prost(string, tag = "12")]
136 pub max_active_faults_runtime: ::prost::alloc::string::String,
137 /// The runtime key to override the :ref:`default <config_http_filters_fault_injection_runtime>`
138 /// runtime. The default is: fault.http.rate_limit.response_percent
139 #[prost(string, tag = "13")]
140 pub response_rate_limit_percent_runtime: ::prost::alloc::string::String,
141 /// The runtime key to override the :ref:`default <config_http_filters_fault_injection_runtime>`
142 /// runtime. The default is: fault.http.abort.grpc_status
143 #[prost(string, tag = "14")]
144 pub abort_grpc_status_runtime: ::prost::alloc::string::String,
145 /// To control whether stats storage is allocated dynamically for each downstream server.
146 /// If set to true, "x-envoy-downstream-service-cluster" field of header will be ignored by this filter.
147 /// If set to false, dynamic stats storage will be allocated for the downstream cluster name.
148 /// Default value is false.
149 #[prost(bool, tag = "15")]
150 pub disable_downstream_cluster_stats: bool,
151 /// When an abort or delay fault is executed, the metadata struct provided here will be added to the
152 /// request's dynamic metadata under the namespace corresponding to the name of the fault filter.
153 /// This data can be logged as part of Access Logs using the :ref:`command operator <config_access_log_command_operators>` %DYNAMIC_METADATA(NAMESPACE)%, where NAMESPACE is the name of
154 /// the fault filter.
155 #[prost(message, optional, tag = "16")]
156 pub filter_metadata: ::core::option::Option<
157 super::super::super::super::super::super::google::protobuf::Struct,
158 >,
159}
160impl ::prost::Name for HttpFault {
161 const NAME: &'static str = "HTTPFault";
162 const PACKAGE: &'static str = "envoy.extensions.filters.http.fault.v3";
163 fn full_name() -> ::prost::alloc::string::String {
164 "envoy.extensions.filters.http.fault.v3.HTTPFault".into()
165 }
166 fn type_url() -> ::prost::alloc::string::String {
167 "type.googleapis.com/envoy.extensions.filters.http.fault.v3.HTTPFault".into()
168 }
169}