1#[allow(clippy::derive_partial_eq_without_eq)]
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct PortSpec {
4 #[prost(string, tag = "1")]
6 pub workload: ::prost::alloc::string::String,
7 #[prost(uint32, tag = "2")]
9 pub port: u32,
10}
11#[allow(clippy::derive_partial_eq_without_eq)]
12#[derive(Clone, PartialEq, ::prost::Message)]
13pub struct Server {
14 #[prost(message, optional, tag = "1")]
17 pub protocol: ::core::option::Option<ProxyProtocol>,
18 #[prost(message, repeated, tag = "2")]
21 pub server_ips: ::prost::alloc::vec::Vec<super::net::IpAddress>,
22 #[prost(message, repeated, tag = "3")]
26 pub authorizations: ::prost::alloc::vec::Vec<Authz>,
27 #[prost(map = "string, string", tag = "4")]
32 pub labels: ::std::collections::HashMap<
33 ::prost::alloc::string::String,
34 ::prost::alloc::string::String,
35 >,
36}
37#[allow(clippy::derive_partial_eq_without_eq)]
38#[derive(Clone, PartialEq, ::prost::Message)]
39pub struct ProxyProtocol {
40 #[prost(oneof = "proxy_protocol::Kind", tags = "1, 2, 3, 4, 5, 6")]
41 pub kind: ::core::option::Option<proxy_protocol::Kind>,
42}
43pub mod proxy_protocol {
45 #[allow(clippy::derive_partial_eq_without_eq)]
46 #[derive(Clone, PartialEq, ::prost::Message)]
47 pub struct Detect {
48 #[prost(message, optional, tag = "1")]
49 pub timeout: ::core::option::Option<::prost_types::Duration>,
50 #[prost(message, repeated, tag = "3")]
53 pub http_routes: ::prost::alloc::vec::Vec<super::HttpRoute>,
54 #[prost(message, optional, tag = "4")]
56 pub http_local_rate_limit: ::core::option::Option<super::HttpLocalRateLimit>,
57 }
58 #[allow(clippy::derive_partial_eq_without_eq)]
59 #[derive(Clone, PartialEq, ::prost::Message)]
60 pub struct Http1 {
61 #[prost(message, repeated, tag = "2")]
62 pub routes: ::prost::alloc::vec::Vec<super::HttpRoute>,
63 #[prost(message, optional, tag = "3")]
64 pub local_rate_limit: ::core::option::Option<super::HttpLocalRateLimit>,
65 }
66 #[allow(clippy::derive_partial_eq_without_eq)]
67 #[derive(Clone, PartialEq, ::prost::Message)]
68 pub struct Http2 {
69 #[prost(message, repeated, tag = "2")]
70 pub routes: ::prost::alloc::vec::Vec<super::HttpRoute>,
71 #[prost(message, optional, tag = "3")]
72 pub local_rate_limit: ::core::option::Option<super::HttpLocalRateLimit>,
73 }
74 #[allow(clippy::derive_partial_eq_without_eq)]
75 #[derive(Clone, PartialEq, ::prost::Message)]
76 pub struct Grpc {
77 #[prost(message, repeated, tag = "2")]
78 pub routes: ::prost::alloc::vec::Vec<super::GrpcRoute>,
79 }
80 #[allow(clippy::derive_partial_eq_without_eq)]
82 #[derive(Clone, PartialEq, ::prost::Message)]
83 pub struct Opaque {}
84 #[allow(clippy::derive_partial_eq_without_eq)]
85 #[derive(Clone, PartialEq, ::prost::Message)]
86 pub struct Tls {}
87 #[allow(clippy::derive_partial_eq_without_eq)]
88 #[derive(Clone, PartialEq, ::prost::Oneof)]
89 pub enum Kind {
90 #[prost(message, tag = "1")]
91 Detect(Detect),
92 #[prost(message, tag = "2")]
93 Opaque(Opaque),
94 #[prost(message, tag = "3")]
95 Tls(Tls),
96 #[prost(message, tag = "4")]
97 Http1(Http1),
98 #[prost(message, tag = "5")]
99 Http2(Http2),
100 #[prost(message, tag = "6")]
101 Grpc(Grpc),
102 }
103}
104#[allow(clippy::derive_partial_eq_without_eq)]
105#[derive(Clone, PartialEq, ::prost::Message)]
106pub struct Authz {
107 #[prost(message, repeated, tag = "1")]
113 pub networks: ::prost::alloc::vec::Vec<Network>,
114 #[prost(message, optional, tag = "2")]
116 pub authentication: ::core::option::Option<Authn>,
117 #[prost(map = "string, string", tag = "3")]
126 pub labels: ::std::collections::HashMap<
127 ::prost::alloc::string::String,
128 ::prost::alloc::string::String,
129 >,
130 #[prost(message, optional, tag = "4")]
133 pub metadata: ::core::option::Option<super::meta::Metadata>,
134}
135#[allow(clippy::derive_partial_eq_without_eq)]
137#[derive(Clone, PartialEq, ::prost::Message)]
138pub struct Network {
139 #[prost(message, optional, tag = "1")]
140 pub net: ::core::option::Option<super::net::IpNetwork>,
141 #[prost(message, repeated, tag = "2")]
142 pub except: ::prost::alloc::vec::Vec<super::net::IpNetwork>,
143}
144#[allow(clippy::derive_partial_eq_without_eq)]
145#[derive(Clone, PartialEq, ::prost::Message)]
146pub struct Authn {
147 #[prost(oneof = "authn::Permit", tags = "1, 2")]
148 pub permit: ::core::option::Option<authn::Permit>,
149}
150pub mod authn {
152 #[allow(clippy::derive_partial_eq_without_eq)]
153 #[derive(Clone, PartialEq, ::prost::Message)]
154 pub struct PermitUnauthenticated {}
155 #[allow(clippy::derive_partial_eq_without_eq)]
156 #[derive(Clone, PartialEq, ::prost::Message)]
157 pub struct PermitMeshTls {
158 #[prost(oneof = "permit_mesh_tls::Clients", tags = "1, 2")]
159 pub clients: ::core::option::Option<permit_mesh_tls::Clients>,
160 }
161 pub mod permit_mesh_tls {
163 #[allow(clippy::derive_partial_eq_without_eq)]
164 #[derive(Clone, PartialEq, ::prost::Message)]
165 pub struct PermitClientIdentities {
166 #[prost(message, repeated, tag = "1")]
168 pub identities: ::prost::alloc::vec::Vec<super::super::Identity>,
169 #[prost(message, repeated, tag = "2")]
173 pub suffixes: ::prost::alloc::vec::Vec<super::super::IdentitySuffix>,
174 }
175 #[allow(clippy::derive_partial_eq_without_eq)]
176 #[derive(Clone, PartialEq, ::prost::Oneof)]
177 pub enum Clients {
178 #[prost(message, tag = "1")]
180 Unauthenticated(super::PermitUnauthenticated),
181 #[prost(message, tag = "2")]
184 Identities(PermitClientIdentities),
185 }
186 }
187 #[allow(clippy::derive_partial_eq_without_eq)]
188 #[derive(Clone, PartialEq, ::prost::Oneof)]
189 pub enum Permit {
190 #[prost(message, tag = "1")]
191 Unauthenticated(PermitUnauthenticated),
192 #[prost(message, tag = "2")]
194 MeshTls(PermitMeshTls),
195 }
196}
197#[allow(clippy::derive_partial_eq_without_eq)]
198#[derive(Clone, PartialEq, ::prost::Message)]
199pub struct Identity {
200 #[prost(string, tag = "1")]
201 pub name: ::prost::alloc::string::String,
202}
203#[allow(clippy::derive_partial_eq_without_eq)]
208#[derive(Clone, PartialEq, ::prost::Message)]
209pub struct IdentitySuffix {
210 #[prost(string, repeated, tag = "1")]
211 pub parts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
212}
213#[allow(clippy::derive_partial_eq_without_eq)]
216#[derive(Clone, PartialEq, ::prost::Message)]
217pub struct HttpRoute {
218 #[prost(message, optional, tag = "1")]
219 pub metadata: ::core::option::Option<super::meta::Metadata>,
220 #[prost(message, repeated, tag = "2")]
222 pub hosts: ::prost::alloc::vec::Vec<super::http_route::HostMatch>,
223 #[prost(message, repeated, tag = "3")]
226 pub authorizations: ::prost::alloc::vec::Vec<Authz>,
227 #[prost(message, repeated, tag = "4")]
229 pub rules: ::prost::alloc::vec::Vec<http_route::Rule>,
230}
231pub mod http_route {
233 #[allow(clippy::derive_partial_eq_without_eq)]
234 #[derive(Clone, PartialEq, ::prost::Message)]
235 pub struct Rule {
236 #[prost(message, repeated, tag = "1")]
237 pub matches: ::prost::alloc::vec::Vec<super::super::http_route::HttpRouteMatch>,
238 #[prost(message, repeated, tag = "2")]
239 pub filters: ::prost::alloc::vec::Vec<Filter>,
240 }
241 #[allow(clippy::derive_partial_eq_without_eq)]
242 #[derive(Clone, PartialEq, ::prost::Message)]
243 pub struct Filter {
244 #[prost(oneof = "filter::Kind", tags = "1, 2, 3")]
245 pub kind: ::core::option::Option<filter::Kind>,
246 }
247 pub mod filter {
249 #[allow(clippy::derive_partial_eq_without_eq)]
250 #[derive(Clone, PartialEq, ::prost::Oneof)]
251 pub enum Kind {
252 #[prost(message, tag = "1")]
253 FailureInjector(super::super::super::http_route::HttpFailureInjector),
254 #[prost(message, tag = "2")]
255 RequestHeaderModifier(
256 super::super::super::http_route::RequestHeaderModifier,
257 ),
258 #[prost(message, tag = "3")]
259 Redirect(super::super::super::http_route::RequestRedirect),
260 }
261 }
262}
263#[allow(clippy::derive_partial_eq_without_eq)]
265#[derive(Clone, PartialEq, ::prost::Message)]
266pub struct GrpcRoute {
267 #[prost(message, optional, tag = "1")]
268 pub metadata: ::core::option::Option<super::meta::Metadata>,
269 #[prost(message, repeated, tag = "2")]
271 pub hosts: ::prost::alloc::vec::Vec<super::http_route::HostMatch>,
272 #[prost(message, repeated, tag = "3")]
275 pub authorizations: ::prost::alloc::vec::Vec<Authz>,
276 #[prost(message, repeated, tag = "4")]
278 pub rules: ::prost::alloc::vec::Vec<grpc_route::Rule>,
279}
280pub mod grpc_route {
282 #[allow(clippy::derive_partial_eq_without_eq)]
283 #[derive(Clone, PartialEq, ::prost::Message)]
284 pub struct Rule {
285 #[prost(message, repeated, tag = "1")]
286 pub matches: ::prost::alloc::vec::Vec<super::super::grpc_route::GrpcRouteMatch>,
287 #[prost(message, repeated, tag = "2")]
288 pub filters: ::prost::alloc::vec::Vec<Filter>,
289 }
290 #[allow(clippy::derive_partial_eq_without_eq)]
291 #[derive(Clone, PartialEq, ::prost::Message)]
292 pub struct Filter {
293 #[prost(oneof = "filter::Kind", tags = "1, 2")]
294 pub kind: ::core::option::Option<filter::Kind>,
295 }
296 pub mod filter {
298 #[allow(clippy::derive_partial_eq_without_eq)]
299 #[derive(Clone, PartialEq, ::prost::Oneof)]
300 pub enum Kind {
301 #[prost(message, tag = "1")]
302 FailureInjector(super::super::super::grpc_route::GrpcFailureInjector),
303 #[prost(message, tag = "2")]
304 RequestHeaderModifier(
305 super::super::super::http_route::RequestHeaderModifier,
306 ),
307 }
308 }
309}
310#[allow(clippy::derive_partial_eq_without_eq)]
311#[derive(Clone, PartialEq, ::prost::Message)]
312pub struct HttpLocalRateLimit {
313 #[prost(message, optional, tag = "1")]
315 pub metadata: ::core::option::Option<super::meta::Metadata>,
316 #[prost(message, optional, tag = "2")]
319 pub total: ::core::option::Option<http_local_rate_limit::Limit>,
320 #[prost(message, optional, tag = "3")]
323 pub identity: ::core::option::Option<http_local_rate_limit::Limit>,
324 #[prost(message, repeated, tag = "4")]
326 pub overrides: ::prost::alloc::vec::Vec<http_local_rate_limit::Override>,
327}
328pub mod http_local_rate_limit {
330 #[allow(clippy::derive_partial_eq_without_eq)]
331 #[derive(Clone, PartialEq, ::prost::Message)]
332 pub struct Override {
333 #[prost(message, optional, tag = "1")]
334 pub limit: ::core::option::Option<Limit>,
335 #[prost(message, optional, tag = "2")]
336 pub clients: ::core::option::Option<r#override::ClientIdentities>,
337 }
338 pub mod r#override {
340 #[allow(clippy::derive_partial_eq_without_eq)]
341 #[derive(Clone, PartialEq, ::prost::Message)]
342 pub struct ClientIdentities {
343 #[prost(message, repeated, tag = "1")]
345 pub identities: ::prost::alloc::vec::Vec<super::super::Identity>,
346 }
347 }
348 #[allow(clippy::derive_partial_eq_without_eq)]
349 #[derive(Clone, PartialEq, ::prost::Message)]
350 pub struct Limit {
351 #[prost(uint32, tag = "1")]
352 pub requests_per_second: u32,
353 }
354}
355pub mod inbound_server_policies_client {
357 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
358 use tonic::codegen::*;
359 use tonic::codegen::http::Uri;
360 #[derive(Debug, Clone)]
368 pub struct InboundServerPoliciesClient<T> {
369 inner: tonic::client::Grpc<T>,
370 }
371 impl<T> InboundServerPoliciesClient<T>
372 where
373 T: tonic::client::GrpcService<tonic::body::BoxBody>,
374 T::Error: Into<StdError>,
375 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
376 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
377 {
378 pub fn new(inner: T) -> Self {
379 let inner = tonic::client::Grpc::new(inner);
380 Self { inner }
381 }
382 pub fn with_origin(inner: T, origin: Uri) -> Self {
383 let inner = tonic::client::Grpc::with_origin(inner, origin);
384 Self { inner }
385 }
386 pub fn with_interceptor<F>(
387 inner: T,
388 interceptor: F,
389 ) -> InboundServerPoliciesClient<InterceptedService<T, F>>
390 where
391 F: tonic::service::Interceptor,
392 T::ResponseBody: Default,
393 T: tonic::codegen::Service<
394 http::Request<tonic::body::BoxBody>,
395 Response = http::Response<
396 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
397 >,
398 >,
399 <T as tonic::codegen::Service<
400 http::Request<tonic::body::BoxBody>,
401 >>::Error: Into<StdError> + Send + Sync,
402 {
403 InboundServerPoliciesClient::new(InterceptedService::new(inner, interceptor))
404 }
405 #[must_use]
410 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
411 self.inner = self.inner.send_compressed(encoding);
412 self
413 }
414 #[must_use]
416 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
417 self.inner = self.inner.accept_compressed(encoding);
418 self
419 }
420 #[must_use]
424 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
425 self.inner = self.inner.max_decoding_message_size(limit);
426 self
427 }
428 #[must_use]
432 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
433 self.inner = self.inner.max_encoding_message_size(limit);
434 self
435 }
436 pub async fn get_port(
438 &mut self,
439 request: impl tonic::IntoRequest<super::PortSpec>,
440 ) -> std::result::Result<tonic::Response<super::Server>, tonic::Status> {
441 self.inner
442 .ready()
443 .await
444 .map_err(|e| {
445 tonic::Status::new(
446 tonic::Code::Unknown,
447 format!("Service was not ready: {}", e.into()),
448 )
449 })?;
450 let codec = tonic::codec::ProstCodec::default();
451 let path = http::uri::PathAndQuery::from_static(
452 "/io.linkerd.proxy.inbound.InboundServerPolicies/GetPort",
453 );
454 let mut req = request.into_request();
455 req.extensions_mut()
456 .insert(
457 GrpcMethod::new(
458 "io.linkerd.proxy.inbound.InboundServerPolicies",
459 "GetPort",
460 ),
461 );
462 self.inner.unary(req, path, codec).await
463 }
464 pub async fn watch_port(
466 &mut self,
467 request: impl tonic::IntoRequest<super::PortSpec>,
468 ) -> std::result::Result<
469 tonic::Response<tonic::codec::Streaming<super::Server>>,
470 tonic::Status,
471 > {
472 self.inner
473 .ready()
474 .await
475 .map_err(|e| {
476 tonic::Status::new(
477 tonic::Code::Unknown,
478 format!("Service was not ready: {}", e.into()),
479 )
480 })?;
481 let codec = tonic::codec::ProstCodec::default();
482 let path = http::uri::PathAndQuery::from_static(
483 "/io.linkerd.proxy.inbound.InboundServerPolicies/WatchPort",
484 );
485 let mut req = request.into_request();
486 req.extensions_mut()
487 .insert(
488 GrpcMethod::new(
489 "io.linkerd.proxy.inbound.InboundServerPolicies",
490 "WatchPort",
491 ),
492 );
493 self.inner.server_streaming(req, path, codec).await
494 }
495 }
496}
497pub mod inbound_server_policies_server {
499 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
500 use tonic::codegen::*;
501 #[async_trait]
503 pub trait InboundServerPolicies: Send + Sync + 'static {
504 async fn get_port(
506 &self,
507 request: tonic::Request<super::PortSpec>,
508 ) -> std::result::Result<tonic::Response<super::Server>, tonic::Status>;
509 type WatchPortStream: tonic::codegen::tokio_stream::Stream<
511 Item = std::result::Result<super::Server, tonic::Status>,
512 >
513 + Send
514 + 'static;
515 async fn watch_port(
517 &self,
518 request: tonic::Request<super::PortSpec>,
519 ) -> std::result::Result<tonic::Response<Self::WatchPortStream>, tonic::Status>;
520 }
521 #[derive(Debug)]
529 pub struct InboundServerPoliciesServer<T: InboundServerPolicies> {
530 inner: _Inner<T>,
531 accept_compression_encodings: EnabledCompressionEncodings,
532 send_compression_encodings: EnabledCompressionEncodings,
533 max_decoding_message_size: Option<usize>,
534 max_encoding_message_size: Option<usize>,
535 }
536 struct _Inner<T>(Arc<T>);
537 impl<T: InboundServerPolicies> InboundServerPoliciesServer<T> {
538 pub fn new(inner: T) -> Self {
539 Self::from_arc(Arc::new(inner))
540 }
541 pub fn from_arc(inner: Arc<T>) -> Self {
542 let inner = _Inner(inner);
543 Self {
544 inner,
545 accept_compression_encodings: Default::default(),
546 send_compression_encodings: Default::default(),
547 max_decoding_message_size: None,
548 max_encoding_message_size: None,
549 }
550 }
551 pub fn with_interceptor<F>(
552 inner: T,
553 interceptor: F,
554 ) -> InterceptedService<Self, F>
555 where
556 F: tonic::service::Interceptor,
557 {
558 InterceptedService::new(Self::new(inner), interceptor)
559 }
560 #[must_use]
562 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
563 self.accept_compression_encodings.enable(encoding);
564 self
565 }
566 #[must_use]
568 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
569 self.send_compression_encodings.enable(encoding);
570 self
571 }
572 #[must_use]
576 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
577 self.max_decoding_message_size = Some(limit);
578 self
579 }
580 #[must_use]
584 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
585 self.max_encoding_message_size = Some(limit);
586 self
587 }
588 }
589 impl<T, B> tonic::codegen::Service<http::Request<B>>
590 for InboundServerPoliciesServer<T>
591 where
592 T: InboundServerPolicies,
593 B: Body + Send + 'static,
594 B::Error: Into<StdError> + Send + 'static,
595 {
596 type Response = http::Response<tonic::body::BoxBody>;
597 type Error = std::convert::Infallible;
598 type Future = BoxFuture<Self::Response, Self::Error>;
599 fn poll_ready(
600 &mut self,
601 _cx: &mut Context<'_>,
602 ) -> Poll<std::result::Result<(), Self::Error>> {
603 Poll::Ready(Ok(()))
604 }
605 fn call(&mut self, req: http::Request<B>) -> Self::Future {
606 let inner = self.inner.clone();
607 match req.uri().path() {
608 "/io.linkerd.proxy.inbound.InboundServerPolicies/GetPort" => {
609 #[allow(non_camel_case_types)]
610 struct GetPortSvc<T: InboundServerPolicies>(pub Arc<T>);
611 impl<
612 T: InboundServerPolicies,
613 > tonic::server::UnaryService<super::PortSpec> for GetPortSvc<T> {
614 type Response = super::Server;
615 type Future = BoxFuture<
616 tonic::Response<Self::Response>,
617 tonic::Status,
618 >;
619 fn call(
620 &mut self,
621 request: tonic::Request<super::PortSpec>,
622 ) -> Self::Future {
623 let inner = Arc::clone(&self.0);
624 let fut = async move {
625 <T as InboundServerPolicies>::get_port(&inner, request)
626 .await
627 };
628 Box::pin(fut)
629 }
630 }
631 let accept_compression_encodings = self.accept_compression_encodings;
632 let send_compression_encodings = self.send_compression_encodings;
633 let max_decoding_message_size = self.max_decoding_message_size;
634 let max_encoding_message_size = self.max_encoding_message_size;
635 let inner = self.inner.clone();
636 let fut = async move {
637 let inner = inner.0;
638 let method = GetPortSvc(inner);
639 let codec = tonic::codec::ProstCodec::default();
640 let mut grpc = tonic::server::Grpc::new(codec)
641 .apply_compression_config(
642 accept_compression_encodings,
643 send_compression_encodings,
644 )
645 .apply_max_message_size_config(
646 max_decoding_message_size,
647 max_encoding_message_size,
648 );
649 let res = grpc.unary(method, req).await;
650 Ok(res)
651 };
652 Box::pin(fut)
653 }
654 "/io.linkerd.proxy.inbound.InboundServerPolicies/WatchPort" => {
655 #[allow(non_camel_case_types)]
656 struct WatchPortSvc<T: InboundServerPolicies>(pub Arc<T>);
657 impl<
658 T: InboundServerPolicies,
659 > tonic::server::ServerStreamingService<super::PortSpec>
660 for WatchPortSvc<T> {
661 type Response = super::Server;
662 type ResponseStream = T::WatchPortStream;
663 type Future = BoxFuture<
664 tonic::Response<Self::ResponseStream>,
665 tonic::Status,
666 >;
667 fn call(
668 &mut self,
669 request: tonic::Request<super::PortSpec>,
670 ) -> Self::Future {
671 let inner = Arc::clone(&self.0);
672 let fut = async move {
673 <T as InboundServerPolicies>::watch_port(&inner, request)
674 .await
675 };
676 Box::pin(fut)
677 }
678 }
679 let accept_compression_encodings = self.accept_compression_encodings;
680 let send_compression_encodings = self.send_compression_encodings;
681 let max_decoding_message_size = self.max_decoding_message_size;
682 let max_encoding_message_size = self.max_encoding_message_size;
683 let inner = self.inner.clone();
684 let fut = async move {
685 let inner = inner.0;
686 let method = WatchPortSvc(inner);
687 let codec = tonic::codec::ProstCodec::default();
688 let mut grpc = tonic::server::Grpc::new(codec)
689 .apply_compression_config(
690 accept_compression_encodings,
691 send_compression_encodings,
692 )
693 .apply_max_message_size_config(
694 max_decoding_message_size,
695 max_encoding_message_size,
696 );
697 let res = grpc.server_streaming(method, req).await;
698 Ok(res)
699 };
700 Box::pin(fut)
701 }
702 _ => {
703 Box::pin(async move {
704 Ok(
705 http::Response::builder()
706 .status(200)
707 .header("grpc-status", "12")
708 .header("content-type", "application/grpc")
709 .body(empty_body())
710 .unwrap(),
711 )
712 })
713 }
714 }
715 }
716 }
717 impl<T: InboundServerPolicies> Clone for InboundServerPoliciesServer<T> {
718 fn clone(&self) -> Self {
719 let inner = self.inner.clone();
720 Self {
721 inner,
722 accept_compression_encodings: self.accept_compression_encodings,
723 send_compression_encodings: self.send_compression_encodings,
724 max_decoding_message_size: self.max_decoding_message_size,
725 max_encoding_message_size: self.max_encoding_message_size,
726 }
727 }
728 }
729 impl<T: InboundServerPolicies> Clone for _Inner<T> {
730 fn clone(&self) -> Self {
731 Self(Arc::clone(&self.0))
732 }
733 }
734 impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
735 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
736 write!(f, "{:?}", self.0)
737 }
738 }
739 impl<T: InboundServerPolicies> tonic::server::NamedService
740 for InboundServerPoliciesServer<T> {
741 const NAME: &'static str = "io.linkerd.proxy.inbound.InboundServerPolicies";
742 }
743}