Service

Struct Service 

Source
pub struct Service {
    pub cache: Arc<Cache>,
}

Fields§

§cache: Arc<Cache>

Implementations§

Source§

impl Service

Source

pub fn new(cache: Arc<Cache>) -> Self

Source

pub fn stream( &self, req: Request<Streaming<DiscoveryRequest>>, type_url: &'static str, ) -> Result<Response<StreamResponse<DiscoveryResponse>>, Status>

Source

pub async fn fetch( &self, req: &DiscoveryRequest, type_url: &'static str, ) -> Result<Response<DiscoveryResponse>, Status>

Trait Implementations§

Source§

impl AggregatedDiscoveryService for Service

Source§

type StreamAggregatedResourcesStream = Pin<Box<dyn Stream<Item = Result<DiscoveryResponse, Status>> + Send>>

Server streaming response type for the StreamAggregatedResources method.
Source§

type DeltaAggregatedResourcesStream = Pin<Box<dyn Stream<Item = Result<DeltaDiscoveryResponse, Status>> + Send>>

Server streaming response type for the DeltaAggregatedResources method.
Source§

fn stream_aggregated_resources<'life0, 'async_trait>( &'life0 self, req: Request<Streaming<DiscoveryRequest>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamAggregatedResourcesStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

This is a gRPC-only API.
Source§

fn delta_aggregated_resources<'life0, 'async_trait>( &'life0 self, __arg1: Request<Streaming<DeltaDiscoveryRequest>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::DeltaAggregatedResourcesStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl ClusterDiscoveryService for Service

Source§

type StreamClustersStream = Pin<Box<dyn Stream<Item = Result<DiscoveryResponse, Status>> + Send>>

Server streaming response type for the StreamClusters method.
Source§

type DeltaClustersStream = Pin<Box<dyn Stream<Item = Result<DeltaDiscoveryResponse, Status>> + Send>>

Server streaming response type for the DeltaClusters method.
Source§

fn stream_clusters<'life0, 'async_trait>( &'life0 self, req: Request<Streaming<DiscoveryRequest>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamClustersStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn delta_clusters<'life0, 'async_trait>( &'life0 self, __arg1: Request<Streaming<DeltaDiscoveryRequest>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::DeltaClustersStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn fetch_clusters<'life0, 'async_trait>( &'life0 self, req: Request<DiscoveryRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<DiscoveryResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl Debug for Service

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl EndpointDiscoveryService for Service

Source§

type StreamEndpointsStream = Pin<Box<dyn Stream<Item = Result<DiscoveryResponse, Status>> + Send>>

Server streaming response type for the StreamEndpoints method.
Source§

type DeltaEndpointsStream = Pin<Box<dyn Stream<Item = Result<DeltaDiscoveryResponse, Status>> + Send>>

Server streaming response type for the DeltaEndpoints method.
Source§

fn stream_endpoints<'life0, 'async_trait>( &'life0 self, req: Request<Streaming<DiscoveryRequest>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamEndpointsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The resource_names field in DiscoveryRequest specifies a list of clusters to subscribe to updates for.
Source§

fn delta_endpoints<'life0, 'async_trait>( &'life0 self, __arg1: Request<Streaming<DeltaDiscoveryRequest>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::DeltaEndpointsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn fetch_endpoints<'life0, 'async_trait>( &'life0 self, req: Request<DiscoveryRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<DiscoveryResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl ExtensionConfigDiscoveryService for Service

Source§

type StreamExtensionConfigsStream = Pin<Box<dyn Stream<Item = Result<DiscoveryResponse, Status>> + Send>>

Server streaming response type for the StreamExtensionConfigs method.
Source§

type DeltaExtensionConfigsStream = Pin<Box<dyn Stream<Item = Result<DeltaDiscoveryResponse, Status>> + Send>>

Server streaming response type for the DeltaExtensionConfigs method.
Source§

fn stream_extension_configs<'life0, 'async_trait>( &'life0 self, req: Request<Streaming<DiscoveryRequest>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamExtensionConfigsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn delta_extension_configs<'life0, 'async_trait>( &'life0 self, __arg1: Request<Streaming<DeltaDiscoveryRequest>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::DeltaExtensionConfigsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn fetch_extension_configs<'life0, 'async_trait>( &'life0 self, req: Request<DiscoveryRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<DiscoveryResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl ListenerDiscoveryService for Service

Source§

type StreamListenersStream = Pin<Box<dyn Stream<Item = Result<DiscoveryResponse, Status>> + Send>>

Server streaming response type for the StreamListeners method.
Source§

type DeltaListenersStream = Pin<Box<dyn Stream<Item = Result<DeltaDiscoveryResponse, Status>> + Send>>

Server streaming response type for the DeltaListeners method.
Source§

fn stream_listeners<'life0, 'async_trait>( &'life0 self, req: Request<Streaming<DiscoveryRequest>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamListenersStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn delta_listeners<'life0, 'async_trait>( &'life0 self, __arg1: Request<Streaming<DeltaDiscoveryRequest>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::DeltaListenersStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn fetch_listeners<'life0, 'async_trait>( &'life0 self, req: Request<DiscoveryRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<DiscoveryResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl RouteDiscoveryService for Service

Source§

type StreamRoutesStream = Pin<Box<dyn Stream<Item = Result<DiscoveryResponse, Status>> + Send>>

Server streaming response type for the StreamRoutes method.
Source§

type DeltaRoutesStream = Pin<Box<dyn Stream<Item = Result<DeltaDiscoveryResponse, Status>> + Send>>

Server streaming response type for the DeltaRoutes method.
Source§

fn stream_routes<'life0, 'async_trait>( &'life0 self, req: Request<Streaming<DiscoveryRequest>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamRoutesStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn delta_routes<'life0, 'async_trait>( &'life0 self, __arg1: Request<Streaming<DeltaDiscoveryRequest>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::DeltaRoutesStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn fetch_routes<'life0, 'async_trait>( &'life0 self, req: Request<DiscoveryRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<DiscoveryResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl RuntimeDiscoveryService for Service

Source§

type StreamRuntimeStream = Pin<Box<dyn Stream<Item = Result<DiscoveryResponse, Status>> + Send>>

Server streaming response type for the StreamRuntime method.
Source§

type DeltaRuntimeStream = Pin<Box<dyn Stream<Item = Result<DeltaDiscoveryResponse, Status>> + Send>>

Server streaming response type for the DeltaRuntime method.
Source§

fn stream_runtime<'life0, 'async_trait>( &'life0 self, req: Request<Streaming<DiscoveryRequest>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamRuntimeStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn delta_runtime<'life0, 'async_trait>( &'life0 self, __arg1: Request<Streaming<DeltaDiscoveryRequest>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::DeltaRuntimeStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn fetch_runtime<'life0, 'async_trait>( &'life0 self, req: Request<DiscoveryRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<DiscoveryResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl ScopedRoutesDiscoveryService for Service

Source§

type StreamScopedRoutesStream = Pin<Box<dyn Stream<Item = Result<DiscoveryResponse, Status>> + Send>>

Server streaming response type for the StreamScopedRoutes method.
Source§

type DeltaScopedRoutesStream = Pin<Box<dyn Stream<Item = Result<DeltaDiscoveryResponse, Status>> + Send>>

Server streaming response type for the DeltaScopedRoutes method.
Source§

fn stream_scoped_routes<'life0, 'async_trait>( &'life0 self, req: Request<Streaming<DiscoveryRequest>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamScopedRoutesStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn delta_scoped_routes<'life0, 'async_trait>( &'life0 self, __arg1: Request<Streaming<DeltaDiscoveryRequest>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::DeltaScopedRoutesStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn fetch_scoped_routes<'life0, 'async_trait>( &'life0 self, req: Request<DiscoveryRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<DiscoveryResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl SecretDiscoveryService for Service

Source§

type StreamSecretsStream = Pin<Box<dyn Stream<Item = Result<DiscoveryResponse, Status>> + Send>>

Server streaming response type for the StreamSecrets method.
Source§

type DeltaSecretsStream = Pin<Box<dyn Stream<Item = Result<DeltaDiscoveryResponse, Status>> + Send>>

Server streaming response type for the DeltaSecrets method.
Source§

fn stream_secrets<'life0, 'async_trait>( &'life0 self, req: Request<Streaming<DiscoveryRequest>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamSecretsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn delta_secrets<'life0, 'async_trait>( &'life0 self, __arg1: Request<Streaming<DeltaDiscoveryRequest>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::DeltaSecretsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn fetch_secrets<'life0, 'async_trait>( &'life0 self, req: Request<DiscoveryRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<DiscoveryResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl VirtualHostDiscoveryService for Service

Source§

type DeltaVirtualHostsStream = Pin<Box<dyn Stream<Item = Result<DeltaDiscoveryResponse, Status>> + Send>>

Server streaming response type for the DeltaVirtualHosts method.
Source§

fn delta_virtual_hosts<'life0, 'async_trait>( &'life0 self, __arg1: Request<Streaming<DeltaDiscoveryRequest>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::DeltaVirtualHostsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more