1#[allow(clippy::derive_partial_eq_without_eq)]
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct TrafficSpec {
4 #[prost(string, tag = "1")]
7 pub source_workload: ::prost::alloc::string::String,
8 #[prost(oneof = "traffic_spec::Target", tags = "2, 3")]
10 pub target: ::core::option::Option<traffic_spec::Target>,
11}
12pub mod traffic_spec {
14 #[allow(clippy::derive_partial_eq_without_eq)]
16 #[derive(Clone, PartialEq, ::prost::Oneof)]
17 pub enum Target {
18 #[prost(message, tag = "2")]
20 Addr(super::super::net::TcpAddress),
21 #[prost(string, tag = "3")]
24 Authority(::prost::alloc::string::String),
25 }
26}
27#[allow(clippy::derive_partial_eq_without_eq)]
29#[derive(Clone, PartialEq, ::prost::Message)]
30pub struct OutboundPolicy {
31 #[prost(message, optional, tag = "1")]
34 pub protocol: ::core::option::Option<ProxyProtocol>,
35 #[prost(message, optional, tag = "2")]
37 pub metadata: ::core::option::Option<super::meta::Metadata>,
38}
39#[allow(clippy::derive_partial_eq_without_eq)]
40#[derive(Clone, PartialEq, ::prost::Message)]
41pub struct ProxyProtocol {
42 #[prost(oneof = "proxy_protocol::Kind", tags = "1, 2, 3, 4, 5, 6")]
43 pub kind: ::core::option::Option<proxy_protocol::Kind>,
44}
45pub mod proxy_protocol {
47 #[allow(clippy::derive_partial_eq_without_eq)]
48 #[derive(Clone, PartialEq, ::prost::Message)]
49 pub struct Detect {
50 #[prost(message, optional, tag = "1")]
52 pub timeout: ::core::option::Option<::prost_types::Duration>,
53 #[prost(message, optional, tag = "2")]
54 pub opaque: ::core::option::Option<Opaque>,
55 #[prost(message, optional, tag = "3")]
57 pub http1: ::core::option::Option<Http1>,
58 #[prost(message, optional, tag = "4")]
60 pub http2: ::core::option::Option<Http2>,
61 }
62 #[allow(clippy::derive_partial_eq_without_eq)]
63 #[derive(Clone, PartialEq, ::prost::Message)]
64 pub struct Opaque {
65 #[prost(message, repeated, tag = "1")]
66 pub routes: ::prost::alloc::vec::Vec<super::OpaqueRoute>,
67 }
68 #[allow(clippy::derive_partial_eq_without_eq)]
69 #[derive(Clone, PartialEq, ::prost::Message)]
70 pub struct Http1 {
71 #[prost(message, repeated, tag = "1")]
72 pub routes: ::prost::alloc::vec::Vec<super::HttpRoute>,
73 #[prost(message, optional, tag = "2")]
75 pub failure_accrual: ::core::option::Option<super::FailureAccrual>,
76 }
77 #[allow(clippy::derive_partial_eq_without_eq)]
78 #[derive(Clone, PartialEq, ::prost::Message)]
79 pub struct Http2 {
80 #[prost(message, repeated, tag = "1")]
81 pub routes: ::prost::alloc::vec::Vec<super::HttpRoute>,
82 #[prost(message, optional, tag = "2")]
84 pub failure_accrual: ::core::option::Option<super::FailureAccrual>,
85 }
86 #[allow(clippy::derive_partial_eq_without_eq)]
87 #[derive(Clone, PartialEq, ::prost::Message)]
88 pub struct Grpc {
89 #[prost(message, repeated, tag = "1")]
90 pub routes: ::prost::alloc::vec::Vec<super::GrpcRoute>,
91 #[prost(message, optional, tag = "2")]
93 pub failure_accrual: ::core::option::Option<super::FailureAccrual>,
94 }
95 #[allow(clippy::derive_partial_eq_without_eq)]
96 #[derive(Clone, PartialEq, ::prost::Message)]
97 pub struct Tls {
98 #[prost(message, repeated, tag = "1")]
99 pub routes: ::prost::alloc::vec::Vec<super::TlsRoute>,
100 }
101 #[allow(clippy::derive_partial_eq_without_eq)]
102 #[derive(Clone, PartialEq, ::prost::Oneof)]
103 pub enum Kind {
104 #[prost(message, tag = "1")]
105 Detect(Detect),
106 #[prost(message, tag = "2")]
107 Opaque(Opaque),
108 #[prost(message, tag = "3")]
110 Http1(Http1),
111 #[prost(message, tag = "4")]
113 Http2(Http2),
114 #[prost(message, tag = "5")]
116 Grpc(Grpc),
117 #[prost(message, tag = "6")]
119 Tls(Tls),
120 }
121}
122#[allow(clippy::derive_partial_eq_without_eq)]
125#[derive(Clone, PartialEq, ::prost::Message)]
126pub struct HttpRoute {
127 #[prost(message, optional, tag = "1")]
128 pub metadata: ::core::option::Option<super::meta::Metadata>,
129 #[prost(message, repeated, tag = "2")]
131 pub hosts: ::prost::alloc::vec::Vec<super::http_route::HostMatch>,
132 #[prost(message, repeated, tag = "3")]
134 pub rules: ::prost::alloc::vec::Vec<http_route::Rule>,
135}
136pub mod http_route {
138 #[allow(clippy::derive_partial_eq_without_eq)]
139 #[derive(Clone, PartialEq, ::prost::Message)]
140 pub struct Rule {
141 #[prost(message, repeated, tag = "1")]
142 pub matches: ::prost::alloc::vec::Vec<super::super::http_route::HttpRouteMatch>,
143 #[prost(message, repeated, tag = "2")]
144 pub filters: ::prost::alloc::vec::Vec<Filter>,
145 #[prost(message, optional, tag = "3")]
146 pub backends: ::core::option::Option<Distribution>,
147 #[deprecated]
150 #[prost(message, optional, tag = "4")]
151 pub request_timeout: ::core::option::Option<::prost_types::Duration>,
152 #[prost(message, optional, tag = "5")]
153 pub timeouts: ::core::option::Option<super::super::http_route::Timeouts>,
154 #[prost(message, optional, tag = "6")]
155 pub retry: ::core::option::Option<Retry>,
156 #[prost(bool, tag = "7")]
159 pub allow_l5d_request_headers: bool,
160 }
161 #[allow(clippy::derive_partial_eq_without_eq)]
162 #[derive(Clone, PartialEq, ::prost::Message)]
163 pub struct Filter {
164 #[prost(oneof = "filter::Kind", tags = "1, 2, 3, 4")]
165 pub kind: ::core::option::Option<filter::Kind>,
166 }
167 pub mod filter {
169 #[allow(clippy::derive_partial_eq_without_eq)]
170 #[derive(Clone, PartialEq, ::prost::Oneof)]
171 pub enum Kind {
172 #[prost(message, tag = "1")]
173 FailureInjector(super::super::super::http_route::HttpFailureInjector),
174 #[prost(message, tag = "2")]
175 RequestHeaderModifier(
176 super::super::super::http_route::RequestHeaderModifier,
177 ),
178 #[prost(message, tag = "3")]
179 Redirect(super::super::super::http_route::RequestRedirect),
180 #[prost(message, tag = "4")]
181 ResponseHeaderModifier(
182 super::super::super::http_route::ResponseHeaderModifier,
183 ),
184 }
185 }
186 #[allow(clippy::derive_partial_eq_without_eq)]
187 #[derive(Clone, PartialEq, ::prost::Message)]
188 pub struct Distribution {
189 #[prost(oneof = "distribution::Kind", tags = "1, 2, 3")]
190 pub kind: ::core::option::Option<distribution::Kind>,
191 }
192 pub mod distribution {
194 #[allow(clippy::derive_partial_eq_without_eq)]
195 #[derive(Clone, PartialEq, ::prost::Message)]
196 pub struct Empty {}
197 #[allow(clippy::derive_partial_eq_without_eq)]
198 #[derive(Clone, PartialEq, ::prost::Message)]
199 pub struct FirstAvailable {
200 #[prost(message, repeated, tag = "1")]
201 pub backends: ::prost::alloc::vec::Vec<super::RouteBackend>,
202 }
203 #[allow(clippy::derive_partial_eq_without_eq)]
204 #[derive(Clone, PartialEq, ::prost::Message)]
205 pub struct RandomAvailable {
206 #[prost(message, repeated, tag = "1")]
207 pub backends: ::prost::alloc::vec::Vec<super::WeightedRouteBackend>,
208 }
209 #[allow(clippy::derive_partial_eq_without_eq)]
210 #[derive(Clone, PartialEq, ::prost::Oneof)]
211 pub enum Kind {
212 #[prost(message, tag = "1")]
213 Empty(Empty),
214 #[prost(message, tag = "2")]
216 FirstAvailable(FirstAvailable),
217 #[prost(message, tag = "3")]
218 RandomAvailable(RandomAvailable),
219 }
220 }
221 #[allow(clippy::derive_partial_eq_without_eq)]
222 #[derive(Clone, PartialEq, ::prost::Message)]
223 pub struct Retry {
224 #[prost(uint32, tag = "1")]
225 pub max_retries: u32,
226 #[prost(uint32, tag = "2")]
227 pub max_request_bytes: u32,
228 #[prost(message, optional, tag = "3")]
230 pub conditions: ::core::option::Option<retry::Conditions>,
231 #[prost(message, optional, tag = "4")]
232 pub timeout: ::core::option::Option<::prost_types::Duration>,
233 #[prost(message, optional, tag = "5")]
234 pub backoff: ::core::option::Option<super::ExponentialBackoff>,
235 }
236 pub mod retry {
238 #[allow(clippy::derive_partial_eq_without_eq)]
240 #[derive(Clone, PartialEq, ::prost::Message)]
241 pub struct Conditions {
242 #[prost(message, repeated, tag = "1")]
244 pub status_ranges: ::prost::alloc::vec::Vec<conditions::StatusRange>,
245 }
246 pub mod conditions {
248 #[allow(clippy::derive_partial_eq_without_eq)]
249 #[derive(Clone, PartialEq, ::prost::Message)]
250 pub struct StatusRange {
251 #[prost(uint32, tag = "1")]
252 pub start: u32,
253 #[prost(uint32, tag = "2")]
254 pub end: u32,
255 }
256 }
257 }
258 #[allow(clippy::derive_partial_eq_without_eq)]
259 #[derive(Clone, PartialEq, ::prost::Message)]
260 pub struct RouteBackend {
261 #[prost(message, optional, tag = "1")]
262 pub backend: ::core::option::Option<super::Backend>,
263 #[prost(message, repeated, tag = "3")]
264 pub filters: ::prost::alloc::vec::Vec<Filter>,
265 #[deprecated]
267 #[prost(message, optional, tag = "4")]
268 pub request_timeout: ::core::option::Option<::prost_types::Duration>,
269 }
270 #[allow(clippy::derive_partial_eq_without_eq)]
271 #[derive(Clone, PartialEq, ::prost::Message)]
272 pub struct WeightedRouteBackend {
273 #[prost(message, optional, tag = "1")]
274 pub backend: ::core::option::Option<RouteBackend>,
275 #[prost(uint32, tag = "2")]
276 pub weight: u32,
277 }
278}
279#[allow(clippy::derive_partial_eq_without_eq)]
280#[derive(Clone, PartialEq, ::prost::Message)]
281pub struct GrpcRoute {
282 #[prost(message, optional, tag = "1")]
283 pub metadata: ::core::option::Option<super::meta::Metadata>,
284 #[prost(message, repeated, tag = "2")]
286 pub hosts: ::prost::alloc::vec::Vec<super::http_route::HostMatch>,
287 #[prost(message, repeated, tag = "3")]
289 pub rules: ::prost::alloc::vec::Vec<grpc_route::Rule>,
290}
291pub mod grpc_route {
293 #[allow(clippy::derive_partial_eq_without_eq)]
294 #[derive(Clone, PartialEq, ::prost::Message)]
295 pub struct Rule {
296 #[prost(message, repeated, tag = "1")]
297 pub matches: ::prost::alloc::vec::Vec<super::super::grpc_route::GrpcRouteMatch>,
298 #[prost(message, repeated, tag = "2")]
299 pub filters: ::prost::alloc::vec::Vec<Filter>,
300 #[prost(message, optional, tag = "3")]
301 pub backends: ::core::option::Option<Distribution>,
302 #[deprecated]
305 #[prost(message, optional, tag = "4")]
306 pub request_timeout: ::core::option::Option<::prost_types::Duration>,
307 #[prost(message, optional, tag = "5")]
308 pub timeouts: ::core::option::Option<super::super::http_route::Timeouts>,
309 #[prost(message, optional, tag = "6")]
310 pub retry: ::core::option::Option<Retry>,
311 #[prost(bool, tag = "7")]
314 pub allow_l5d_request_headers: bool,
315 }
316 #[allow(clippy::derive_partial_eq_without_eq)]
317 #[derive(Clone, PartialEq, ::prost::Message)]
318 pub struct Filter {
319 #[prost(oneof = "filter::Kind", tags = "1, 2")]
320 pub kind: ::core::option::Option<filter::Kind>,
321 }
322 pub mod filter {
324 #[allow(clippy::derive_partial_eq_without_eq)]
325 #[derive(Clone, PartialEq, ::prost::Oneof)]
326 pub enum Kind {
327 #[prost(message, tag = "1")]
328 FailureInjector(super::super::super::grpc_route::GrpcFailureInjector),
329 #[prost(message, tag = "2")]
330 RequestHeaderModifier(
331 super::super::super::http_route::RequestHeaderModifier,
332 ),
333 }
334 }
335 #[allow(clippy::derive_partial_eq_without_eq)]
336 #[derive(Clone, PartialEq, ::prost::Message)]
337 pub struct Distribution {
338 #[prost(oneof = "distribution::Kind", tags = "1, 2, 3")]
339 pub kind: ::core::option::Option<distribution::Kind>,
340 }
341 pub mod distribution {
343 #[allow(clippy::derive_partial_eq_without_eq)]
344 #[derive(Clone, PartialEq, ::prost::Message)]
345 pub struct Empty {}
346 #[allow(clippy::derive_partial_eq_without_eq)]
347 #[derive(Clone, PartialEq, ::prost::Message)]
348 pub struct FirstAvailable {
349 #[prost(message, repeated, tag = "1")]
350 pub backends: ::prost::alloc::vec::Vec<super::RouteBackend>,
351 }
352 #[allow(clippy::derive_partial_eq_without_eq)]
353 #[derive(Clone, PartialEq, ::prost::Message)]
354 pub struct RandomAvailable {
355 #[prost(message, repeated, tag = "1")]
356 pub backends: ::prost::alloc::vec::Vec<super::WeightedRouteBackend>,
357 }
358 #[allow(clippy::derive_partial_eq_without_eq)]
359 #[derive(Clone, PartialEq, ::prost::Oneof)]
360 pub enum Kind {
361 #[prost(message, tag = "1")]
362 Empty(Empty),
363 #[prost(message, tag = "2")]
365 FirstAvailable(FirstAvailable),
366 #[prost(message, tag = "3")]
367 RandomAvailable(RandomAvailable),
368 }
369 }
370 #[allow(clippy::derive_partial_eq_without_eq)]
371 #[derive(Clone, PartialEq, ::prost::Message)]
372 pub struct Retry {
373 #[prost(uint32, tag = "1")]
374 pub max_retries: u32,
375 #[prost(uint32, tag = "2")]
376 pub max_request_bytes: u32,
377 #[prost(message, optional, tag = "3")]
379 pub conditions: ::core::option::Option<retry::Conditions>,
380 #[prost(message, optional, tag = "4")]
381 pub timeout: ::core::option::Option<::prost_types::Duration>,
382 #[prost(message, optional, tag = "5")]
383 pub backoff: ::core::option::Option<super::ExponentialBackoff>,
384 }
385 pub mod retry {
387 #[allow(clippy::derive_partial_eq_without_eq)]
389 #[derive(Clone, PartialEq, ::prost::Message)]
390 pub struct Conditions {
391 #[prost(bool, tag = "1")]
392 pub cancelled: bool,
393 #[prost(bool, tag = "4")]
394 pub deadine_exceeded: bool,
395 #[prost(bool, tag = "8")]
396 pub resource_exhausted: bool,
397 #[prost(bool, tag = "13")]
398 pub internal: bool,
399 #[prost(bool, tag = "14")]
400 pub unavailable: bool,
401 }
402 }
403 #[allow(clippy::derive_partial_eq_without_eq)]
404 #[derive(Clone, PartialEq, ::prost::Message)]
405 pub struct RouteBackend {
406 #[prost(message, optional, tag = "1")]
407 pub backend: ::core::option::Option<super::Backend>,
408 #[prost(message, repeated, tag = "3")]
409 pub filters: ::prost::alloc::vec::Vec<Filter>,
410 #[deprecated]
412 #[prost(message, optional, tag = "4")]
413 pub request_timeout: ::core::option::Option<::prost_types::Duration>,
414 }
415 #[allow(clippy::derive_partial_eq_without_eq)]
416 #[derive(Clone, PartialEq, ::prost::Message)]
417 pub struct WeightedRouteBackend {
418 #[prost(message, optional, tag = "1")]
419 pub backend: ::core::option::Option<RouteBackend>,
420 #[prost(uint32, tag = "2")]
421 pub weight: u32,
422 }
423}
424#[allow(clippy::derive_partial_eq_without_eq)]
425#[derive(Clone, PartialEq, ::prost::Message)]
426pub struct OpaqueRoute {
427 #[prost(message, optional, tag = "1")]
428 pub metadata: ::core::option::Option<super::meta::Metadata>,
429 #[prost(message, repeated, tag = "3")]
431 pub rules: ::prost::alloc::vec::Vec<opaque_route::Rule>,
432}
433pub mod opaque_route {
435 #[allow(clippy::derive_partial_eq_without_eq)]
436 #[derive(Clone, PartialEq, ::prost::Message)]
437 pub struct Rule {
438 #[prost(message, optional, tag = "1")]
439 pub backends: ::core::option::Option<Distribution>,
440 #[prost(message, repeated, tag = "2")]
441 pub filters: ::prost::alloc::vec::Vec<Filter>,
442 }
443 #[allow(clippy::derive_partial_eq_without_eq)]
444 #[derive(Clone, PartialEq, ::prost::Message)]
445 pub struct Filter {
446 #[prost(oneof = "filter::Kind", tags = "1, 2")]
447 pub kind: ::core::option::Option<filter::Kind>,
448 }
449 pub mod filter {
451 #[allow(clippy::derive_partial_eq_without_eq)]
452 #[derive(Clone, PartialEq, ::prost::Oneof)]
453 pub enum Kind {
454 #[prost(message, tag = "1")]
455 Invalid(super::super::super::opaque_route::Invalid),
456 #[prost(message, tag = "2")]
457 Forbidden(super::super::super::opaque_route::Forbidden),
458 }
459 }
460 #[allow(clippy::derive_partial_eq_without_eq)]
461 #[derive(Clone, PartialEq, ::prost::Message)]
462 pub struct Distribution {
463 #[prost(oneof = "distribution::Kind", tags = "1, 2, 3")]
464 pub kind: ::core::option::Option<distribution::Kind>,
465 }
466 pub mod distribution {
468 #[allow(clippy::derive_partial_eq_without_eq)]
469 #[derive(Clone, PartialEq, ::prost::Message)]
470 pub struct Empty {}
471 #[allow(clippy::derive_partial_eq_without_eq)]
472 #[derive(Clone, PartialEq, ::prost::Message)]
473 pub struct FirstAvailable {
474 #[prost(message, repeated, tag = "1")]
475 pub backends: ::prost::alloc::vec::Vec<super::RouteBackend>,
476 }
477 #[allow(clippy::derive_partial_eq_without_eq)]
478 #[derive(Clone, PartialEq, ::prost::Message)]
479 pub struct RandomAvailable {
480 #[prost(message, repeated, tag = "1")]
481 pub backends: ::prost::alloc::vec::Vec<super::WeightedRouteBackend>,
482 }
483 #[allow(clippy::derive_partial_eq_without_eq)]
484 #[derive(Clone, PartialEq, ::prost::Oneof)]
485 pub enum Kind {
486 #[prost(message, tag = "1")]
487 Empty(Empty),
488 #[prost(message, tag = "2")]
490 FirstAvailable(FirstAvailable),
491 #[prost(message, tag = "3")]
492 RandomAvailable(RandomAvailable),
493 }
494 }
495 #[allow(clippy::derive_partial_eq_without_eq)]
496 #[derive(Clone, PartialEq, ::prost::Message)]
497 pub struct RouteBackend {
498 #[prost(message, optional, tag = "1")]
499 pub backend: ::core::option::Option<super::Backend>,
500 #[prost(message, repeated, tag = "3")]
501 pub filters: ::prost::alloc::vec::Vec<Filter>,
502 }
503 #[allow(clippy::derive_partial_eq_without_eq)]
504 #[derive(Clone, PartialEq, ::prost::Message)]
505 pub struct WeightedRouteBackend {
506 #[prost(message, optional, tag = "1")]
507 pub backend: ::core::option::Option<RouteBackend>,
508 #[prost(uint32, tag = "2")]
509 pub weight: u32,
510 }
511}
512#[allow(clippy::derive_partial_eq_without_eq)]
513#[derive(Clone, PartialEq, ::prost::Message)]
514pub struct TlsRoute {
515 #[prost(message, optional, tag = "1")]
516 pub metadata: ::core::option::Option<super::meta::Metadata>,
517 #[prost(message, repeated, tag = "2")]
519 pub snis: ::prost::alloc::vec::Vec<super::tls_route::SniMatch>,
520 #[prost(message, repeated, tag = "3")]
522 pub rules: ::prost::alloc::vec::Vec<tls_route::Rule>,
523}
524pub mod tls_route {
526 #[allow(clippy::derive_partial_eq_without_eq)]
527 #[derive(Clone, PartialEq, ::prost::Message)]
528 pub struct Rule {
529 #[prost(message, optional, tag = "1")]
530 pub backends: ::core::option::Option<Distribution>,
531 #[prost(message, repeated, tag = "2")]
532 pub filters: ::prost::alloc::vec::Vec<Filter>,
533 }
534 #[allow(clippy::derive_partial_eq_without_eq)]
535 #[derive(Clone, PartialEq, ::prost::Message)]
536 pub struct Filter {
537 #[prost(oneof = "filter::Kind", tags = "1, 2")]
538 pub kind: ::core::option::Option<filter::Kind>,
539 }
540 pub mod filter {
542 #[allow(clippy::derive_partial_eq_without_eq)]
543 #[derive(Clone, PartialEq, ::prost::Oneof)]
544 pub enum Kind {
545 #[prost(message, tag = "1")]
546 Invalid(super::super::super::opaque_route::Invalid),
547 #[prost(message, tag = "2")]
548 Forbidden(super::super::super::opaque_route::Forbidden),
549 }
550 }
551 #[allow(clippy::derive_partial_eq_without_eq)]
552 #[derive(Clone, PartialEq, ::prost::Message)]
553 pub struct Distribution {
554 #[prost(oneof = "distribution::Kind", tags = "1, 2, 3")]
555 pub kind: ::core::option::Option<distribution::Kind>,
556 }
557 pub mod distribution {
559 #[allow(clippy::derive_partial_eq_without_eq)]
560 #[derive(Clone, PartialEq, ::prost::Message)]
561 pub struct Empty {}
562 #[allow(clippy::derive_partial_eq_without_eq)]
563 #[derive(Clone, PartialEq, ::prost::Message)]
564 pub struct FirstAvailable {
565 #[prost(message, repeated, tag = "1")]
566 pub backends: ::prost::alloc::vec::Vec<super::RouteBackend>,
567 }
568 #[allow(clippy::derive_partial_eq_without_eq)]
569 #[derive(Clone, PartialEq, ::prost::Message)]
570 pub struct RandomAvailable {
571 #[prost(message, repeated, tag = "1")]
572 pub backends: ::prost::alloc::vec::Vec<super::WeightedRouteBackend>,
573 }
574 #[allow(clippy::derive_partial_eq_without_eq)]
575 #[derive(Clone, PartialEq, ::prost::Oneof)]
576 pub enum Kind {
577 #[prost(message, tag = "1")]
578 Empty(Empty),
579 #[prost(message, tag = "2")]
581 FirstAvailable(FirstAvailable),
582 #[prost(message, tag = "3")]
583 RandomAvailable(RandomAvailable),
584 }
585 }
586 #[allow(clippy::derive_partial_eq_without_eq)]
587 #[derive(Clone, PartialEq, ::prost::Message)]
588 pub struct RouteBackend {
589 #[prost(message, optional, tag = "1")]
590 pub backend: ::core::option::Option<super::Backend>,
591 #[prost(message, repeated, tag = "3")]
592 pub filters: ::prost::alloc::vec::Vec<Filter>,
593 }
594 #[allow(clippy::derive_partial_eq_without_eq)]
595 #[derive(Clone, PartialEq, ::prost::Message)]
596 pub struct WeightedRouteBackend {
597 #[prost(message, optional, tag = "1")]
598 pub backend: ::core::option::Option<RouteBackend>,
599 #[prost(uint32, tag = "2")]
600 pub weight: u32,
601 }
602}
603#[allow(clippy::derive_partial_eq_without_eq)]
604#[derive(Clone, PartialEq, ::prost::Message)]
605pub struct Backend {
606 #[prost(message, optional, tag = "1")]
607 pub metadata: ::core::option::Option<super::meta::Metadata>,
608 #[prost(message, optional, tag = "4")]
610 pub queue: ::core::option::Option<Queue>,
611 #[prost(oneof = "backend::Kind", tags = "2, 3")]
612 pub kind: ::core::option::Option<backend::Kind>,
613}
614pub mod backend {
616 #[allow(clippy::derive_partial_eq_without_eq)]
618 #[derive(Clone, PartialEq, ::prost::Message)]
619 pub struct EndpointDiscovery {
620 #[prost(oneof = "endpoint_discovery::Kind", tags = "1")]
621 pub kind: ::core::option::Option<endpoint_discovery::Kind>,
622 }
623 pub mod endpoint_discovery {
625 #[allow(clippy::derive_partial_eq_without_eq)]
626 #[derive(Clone, PartialEq, ::prost::Message)]
627 pub struct DestinationGet {
628 #[prost(string, tag = "1")]
629 pub path: ::prost::alloc::string::String,
630 }
631 #[allow(clippy::derive_partial_eq_without_eq)]
632 #[derive(Clone, PartialEq, ::prost::Oneof)]
633 pub enum Kind {
634 #[prost(message, tag = "1")]
636 Dst(DestinationGet),
637 }
638 }
639 #[allow(clippy::derive_partial_eq_without_eq)]
642 #[derive(Clone, PartialEq, ::prost::Message)]
643 pub struct BalanceP2c {
644 #[prost(message, optional, tag = "1")]
645 pub discovery: ::core::option::Option<EndpointDiscovery>,
646 #[prost(oneof = "balance_p2c::Load", tags = "2")]
648 pub load: ::core::option::Option<balance_p2c::Load>,
649 }
650 pub mod balance_p2c {
652 #[allow(clippy::derive_partial_eq_without_eq)]
654 #[derive(Clone, PartialEq, ::prost::Message)]
655 pub struct PeakEwma {
656 #[prost(message, optional, tag = "1")]
659 pub default_rtt: ::core::option::Option<::prost_types::Duration>,
660 #[prost(message, optional, tag = "2")]
662 pub decay: ::core::option::Option<::prost_types::Duration>,
663 }
664 #[allow(clippy::derive_partial_eq_without_eq)]
666 #[derive(Clone, PartialEq, ::prost::Oneof)]
667 pub enum Load {
668 #[prost(message, tag = "2")]
671 PeakEwma(PeakEwma),
672 }
673 }
674 #[allow(clippy::derive_partial_eq_without_eq)]
675 #[derive(Clone, PartialEq, ::prost::Oneof)]
676 pub enum Kind {
677 #[prost(message, tag = "2")]
679 Forward(super::super::destination::WeightedAddr),
680 #[prost(message, tag = "3")]
682 Balancer(BalanceP2c),
683 }
684}
685#[allow(clippy::derive_partial_eq_without_eq)]
686#[derive(Clone, PartialEq, ::prost::Message)]
687pub struct Queue {
688 #[prost(uint32, tag = "1")]
691 pub capacity: u32,
692 #[prost(message, optional, tag = "2")]
695 pub failfast_timeout: ::core::option::Option<::prost_types::Duration>,
696}
697#[allow(clippy::derive_partial_eq_without_eq)]
698#[derive(Clone, PartialEq, ::prost::Message)]
699pub struct FailureAccrual {
700 #[prost(oneof = "failure_accrual::Kind", tags = "1")]
701 pub kind: ::core::option::Option<failure_accrual::Kind>,
702}
703pub mod failure_accrual {
705 #[allow(clippy::derive_partial_eq_without_eq)]
706 #[derive(Clone, PartialEq, ::prost::Message)]
707 pub struct ConsecutiveFailures {
708 #[prost(uint32, tag = "1")]
709 pub max_failures: u32,
710 #[prost(message, optional, tag = "2")]
711 pub backoff: ::core::option::Option<super::ExponentialBackoff>,
712 }
713 #[allow(clippy::derive_partial_eq_without_eq)]
714 #[derive(Clone, PartialEq, ::prost::Oneof)]
715 pub enum Kind {
716 #[prost(message, tag = "1")]
717 ConsecutiveFailures(ConsecutiveFailures),
718 }
719}
720#[allow(clippy::derive_partial_eq_without_eq)]
721#[derive(Clone, PartialEq, ::prost::Message)]
722pub struct ExponentialBackoff {
723 #[prost(message, optional, tag = "1")]
725 pub min_backoff: ::core::option::Option<::prost_types::Duration>,
726 #[prost(message, optional, tag = "2")]
729 pub max_backoff: ::core::option::Option<::prost_types::Duration>,
730 #[prost(float, tag = "3")]
733 pub jitter_ratio: f32,
734}
735pub mod outbound_policies_client {
737 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
738 use tonic::codegen::*;
739 use tonic::codegen::http::Uri;
740 #[derive(Debug, Clone)]
741 pub struct OutboundPoliciesClient<T> {
742 inner: tonic::client::Grpc<T>,
743 }
744 impl<T> OutboundPoliciesClient<T>
745 where
746 T: tonic::client::GrpcService<tonic::body::BoxBody>,
747 T::Error: Into<StdError>,
748 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
749 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
750 {
751 pub fn new(inner: T) -> Self {
752 let inner = tonic::client::Grpc::new(inner);
753 Self { inner }
754 }
755 pub fn with_origin(inner: T, origin: Uri) -> Self {
756 let inner = tonic::client::Grpc::with_origin(inner, origin);
757 Self { inner }
758 }
759 pub fn with_interceptor<F>(
760 inner: T,
761 interceptor: F,
762 ) -> OutboundPoliciesClient<InterceptedService<T, F>>
763 where
764 F: tonic::service::Interceptor,
765 T::ResponseBody: Default,
766 T: tonic::codegen::Service<
767 http::Request<tonic::body::BoxBody>,
768 Response = http::Response<
769 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
770 >,
771 >,
772 <T as tonic::codegen::Service<
773 http::Request<tonic::body::BoxBody>,
774 >>::Error: Into<StdError> + Send + Sync,
775 {
776 OutboundPoliciesClient::new(InterceptedService::new(inner, interceptor))
777 }
778 #[must_use]
783 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
784 self.inner = self.inner.send_compressed(encoding);
785 self
786 }
787 #[must_use]
789 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
790 self.inner = self.inner.accept_compressed(encoding);
791 self
792 }
793 #[must_use]
797 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
798 self.inner = self.inner.max_decoding_message_size(limit);
799 self
800 }
801 #[must_use]
805 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
806 self.inner = self.inner.max_encoding_message_size(limit);
807 self
808 }
809 pub async fn get(
810 &mut self,
811 request: impl tonic::IntoRequest<super::TrafficSpec>,
812 ) -> std::result::Result<tonic::Response<super::OutboundPolicy>, tonic::Status> {
813 self.inner
814 .ready()
815 .await
816 .map_err(|e| {
817 tonic::Status::new(
818 tonic::Code::Unknown,
819 format!("Service was not ready: {}", e.into()),
820 )
821 })?;
822 let codec = tonic::codec::ProstCodec::default();
823 let path = http::uri::PathAndQuery::from_static(
824 "/io.linkerd.proxy.outbound.OutboundPolicies/Get",
825 );
826 let mut req = request.into_request();
827 req.extensions_mut()
828 .insert(
829 GrpcMethod::new("io.linkerd.proxy.outbound.OutboundPolicies", "Get"),
830 );
831 self.inner.unary(req, path, codec).await
832 }
833 pub async fn watch(
834 &mut self,
835 request: impl tonic::IntoRequest<super::TrafficSpec>,
836 ) -> std::result::Result<
837 tonic::Response<tonic::codec::Streaming<super::OutboundPolicy>>,
838 tonic::Status,
839 > {
840 self.inner
841 .ready()
842 .await
843 .map_err(|e| {
844 tonic::Status::new(
845 tonic::Code::Unknown,
846 format!("Service was not ready: {}", e.into()),
847 )
848 })?;
849 let codec = tonic::codec::ProstCodec::default();
850 let path = http::uri::PathAndQuery::from_static(
851 "/io.linkerd.proxy.outbound.OutboundPolicies/Watch",
852 );
853 let mut req = request.into_request();
854 req.extensions_mut()
855 .insert(
856 GrpcMethod::new(
857 "io.linkerd.proxy.outbound.OutboundPolicies",
858 "Watch",
859 ),
860 );
861 self.inner.server_streaming(req, path, codec).await
862 }
863 }
864}
865pub mod outbound_policies_server {
867 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
868 use tonic::codegen::*;
869 #[async_trait]
871 pub trait OutboundPolicies: Send + Sync + 'static {
872 async fn get(
873 &self,
874 request: tonic::Request<super::TrafficSpec>,
875 ) -> std::result::Result<tonic::Response<super::OutboundPolicy>, tonic::Status>;
876 type WatchStream: tonic::codegen::tokio_stream::Stream<
878 Item = std::result::Result<super::OutboundPolicy, tonic::Status>,
879 >
880 + Send
881 + 'static;
882 async fn watch(
883 &self,
884 request: tonic::Request<super::TrafficSpec>,
885 ) -> std::result::Result<tonic::Response<Self::WatchStream>, tonic::Status>;
886 }
887 #[derive(Debug)]
888 pub struct OutboundPoliciesServer<T: OutboundPolicies> {
889 inner: _Inner<T>,
890 accept_compression_encodings: EnabledCompressionEncodings,
891 send_compression_encodings: EnabledCompressionEncodings,
892 max_decoding_message_size: Option<usize>,
893 max_encoding_message_size: Option<usize>,
894 }
895 struct _Inner<T>(Arc<T>);
896 impl<T: OutboundPolicies> OutboundPoliciesServer<T> {
897 pub fn new(inner: T) -> Self {
898 Self::from_arc(Arc::new(inner))
899 }
900 pub fn from_arc(inner: Arc<T>) -> Self {
901 let inner = _Inner(inner);
902 Self {
903 inner,
904 accept_compression_encodings: Default::default(),
905 send_compression_encodings: Default::default(),
906 max_decoding_message_size: None,
907 max_encoding_message_size: None,
908 }
909 }
910 pub fn with_interceptor<F>(
911 inner: T,
912 interceptor: F,
913 ) -> InterceptedService<Self, F>
914 where
915 F: tonic::service::Interceptor,
916 {
917 InterceptedService::new(Self::new(inner), interceptor)
918 }
919 #[must_use]
921 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
922 self.accept_compression_encodings.enable(encoding);
923 self
924 }
925 #[must_use]
927 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
928 self.send_compression_encodings.enable(encoding);
929 self
930 }
931 #[must_use]
935 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
936 self.max_decoding_message_size = Some(limit);
937 self
938 }
939 #[must_use]
943 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
944 self.max_encoding_message_size = Some(limit);
945 self
946 }
947 }
948 impl<T, B> tonic::codegen::Service<http::Request<B>> for OutboundPoliciesServer<T>
949 where
950 T: OutboundPolicies,
951 B: Body + Send + 'static,
952 B::Error: Into<StdError> + Send + 'static,
953 {
954 type Response = http::Response<tonic::body::BoxBody>;
955 type Error = std::convert::Infallible;
956 type Future = BoxFuture<Self::Response, Self::Error>;
957 fn poll_ready(
958 &mut self,
959 _cx: &mut Context<'_>,
960 ) -> Poll<std::result::Result<(), Self::Error>> {
961 Poll::Ready(Ok(()))
962 }
963 fn call(&mut self, req: http::Request<B>) -> Self::Future {
964 let inner = self.inner.clone();
965 match req.uri().path() {
966 "/io.linkerd.proxy.outbound.OutboundPolicies/Get" => {
967 #[allow(non_camel_case_types)]
968 struct GetSvc<T: OutboundPolicies>(pub Arc<T>);
969 impl<
970 T: OutboundPolicies,
971 > tonic::server::UnaryService<super::TrafficSpec> for GetSvc<T> {
972 type Response = super::OutboundPolicy;
973 type Future = BoxFuture<
974 tonic::Response<Self::Response>,
975 tonic::Status,
976 >;
977 fn call(
978 &mut self,
979 request: tonic::Request<super::TrafficSpec>,
980 ) -> Self::Future {
981 let inner = Arc::clone(&self.0);
982 let fut = async move {
983 <T as OutboundPolicies>::get(&inner, request).await
984 };
985 Box::pin(fut)
986 }
987 }
988 let accept_compression_encodings = self.accept_compression_encodings;
989 let send_compression_encodings = self.send_compression_encodings;
990 let max_decoding_message_size = self.max_decoding_message_size;
991 let max_encoding_message_size = self.max_encoding_message_size;
992 let inner = self.inner.clone();
993 let fut = async move {
994 let inner = inner.0;
995 let method = GetSvc(inner);
996 let codec = tonic::codec::ProstCodec::default();
997 let mut grpc = tonic::server::Grpc::new(codec)
998 .apply_compression_config(
999 accept_compression_encodings,
1000 send_compression_encodings,
1001 )
1002 .apply_max_message_size_config(
1003 max_decoding_message_size,
1004 max_encoding_message_size,
1005 );
1006 let res = grpc.unary(method, req).await;
1007 Ok(res)
1008 };
1009 Box::pin(fut)
1010 }
1011 "/io.linkerd.proxy.outbound.OutboundPolicies/Watch" => {
1012 #[allow(non_camel_case_types)]
1013 struct WatchSvc<T: OutboundPolicies>(pub Arc<T>);
1014 impl<
1015 T: OutboundPolicies,
1016 > tonic::server::ServerStreamingService<super::TrafficSpec>
1017 for WatchSvc<T> {
1018 type Response = super::OutboundPolicy;
1019 type ResponseStream = T::WatchStream;
1020 type Future = BoxFuture<
1021 tonic::Response<Self::ResponseStream>,
1022 tonic::Status,
1023 >;
1024 fn call(
1025 &mut self,
1026 request: tonic::Request<super::TrafficSpec>,
1027 ) -> Self::Future {
1028 let inner = Arc::clone(&self.0);
1029 let fut = async move {
1030 <T as OutboundPolicies>::watch(&inner, request).await
1031 };
1032 Box::pin(fut)
1033 }
1034 }
1035 let accept_compression_encodings = self.accept_compression_encodings;
1036 let send_compression_encodings = self.send_compression_encodings;
1037 let max_decoding_message_size = self.max_decoding_message_size;
1038 let max_encoding_message_size = self.max_encoding_message_size;
1039 let inner = self.inner.clone();
1040 let fut = async move {
1041 let inner = inner.0;
1042 let method = WatchSvc(inner);
1043 let codec = tonic::codec::ProstCodec::default();
1044 let mut grpc = tonic::server::Grpc::new(codec)
1045 .apply_compression_config(
1046 accept_compression_encodings,
1047 send_compression_encodings,
1048 )
1049 .apply_max_message_size_config(
1050 max_decoding_message_size,
1051 max_encoding_message_size,
1052 );
1053 let res = grpc.server_streaming(method, req).await;
1054 Ok(res)
1055 };
1056 Box::pin(fut)
1057 }
1058 _ => {
1059 Box::pin(async move {
1060 Ok(
1061 http::Response::builder()
1062 .status(200)
1063 .header("grpc-status", "12")
1064 .header("content-type", "application/grpc")
1065 .body(empty_body())
1066 .unwrap(),
1067 )
1068 })
1069 }
1070 }
1071 }
1072 }
1073 impl<T: OutboundPolicies> Clone for OutboundPoliciesServer<T> {
1074 fn clone(&self) -> Self {
1075 let inner = self.inner.clone();
1076 Self {
1077 inner,
1078 accept_compression_encodings: self.accept_compression_encodings,
1079 send_compression_encodings: self.send_compression_encodings,
1080 max_decoding_message_size: self.max_decoding_message_size,
1081 max_encoding_message_size: self.max_encoding_message_size,
1082 }
1083 }
1084 }
1085 impl<T: OutboundPolicies> Clone for _Inner<T> {
1086 fn clone(&self) -> Self {
1087 Self(Arc::clone(&self.0))
1088 }
1089 }
1090 impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
1091 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1092 write!(f, "{:?}", self.0)
1093 }
1094 }
1095 impl<T: OutboundPolicies> tonic::server::NamedService for OutboundPoliciesServer<T> {
1096 const NAME: &'static str = "io.linkerd.proxy.outbound.OutboundPolicies";
1097 }
1098}