pub struct EdsService { /* private fields */ }Expand description
Endpoint Discovery Service.
Implementations§
Source§impl EdsService
impl EdsService
Sourcepub fn new(cache: Arc<ShardedCache>, registry: Arc<ResourceRegistry>) -> Self
pub fn new(cache: Arc<ShardedCache>, registry: Arc<ResourceRegistry>) -> Self
Create a new EDS service.
Sourcepub fn new_with_handlers(
cache: Arc<ShardedCache>,
registry: Arc<ResourceRegistry>,
sotw_handler: Arc<SotwHandler>,
delta_handler: Arc<DeltaHandler>,
) -> Self
pub fn new_with_handlers( cache: Arc<ShardedCache>, registry: Arc<ResourceRegistry>, sotw_handler: Arc<SotwHandler>, delta_handler: Arc<DeltaHandler>, ) -> Self
Create a new EDS service with shared protocol handlers.
This allows sharing handlers across multiple services for better resource efficiency.
Sourcepub fn cache(&self) -> &ShardedCache
pub fn cache(&self) -> &ShardedCache
Get a reference to the cache.
Sourcepub fn registry(&self) -> &ResourceRegistry
pub fn registry(&self) -> &ResourceRegistry
Get a reference to the registry.
Sourcepub fn into_service(self) -> EndpointDiscoveryServiceServer<Self>
pub fn into_service(self) -> EndpointDiscoveryServiceServer<Self>
Convert this service into a tonic service for use with Server::add_service.
Trait Implementations§
Source§impl Clone for EdsService
impl Clone for EdsService
Source§impl Debug for EdsService
impl Debug for EdsService
Source§impl EndpointDiscoveryService for EdsService
impl EndpointDiscoveryService for EdsService
Source§type StreamEndpointsStream = ReceiverStream<Result<DiscoveryResponse, Status>>
type StreamEndpointsStream = ReceiverStream<Result<DiscoveryResponse, Status>>
Server streaming response type for the StreamEndpoints method.
Source§type DeltaEndpointsStream = ReceiverStream<Result<DeltaDiscoveryResponse, Status>>
type DeltaEndpointsStream = ReceiverStream<Result<DeltaDiscoveryResponse, Status>>
Server streaming response type for the DeltaEndpoints method.
Source§fn stream_endpoints<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<DiscoveryRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamEndpointsStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stream_endpoints<'life0, 'async_trait>(
&'life0 self,
request: 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.
fn delta_endpoints<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<DeltaDiscoveryRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::DeltaEndpointsStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_endpoints<'life0, 'async_trait>(
&'life0 self,
request: Request<DiscoveryRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<DiscoveryResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for EdsService
impl !UnwindSafe for EdsService
impl Freeze for EdsService
impl Send for EdsService
impl Sync for EdsService
impl Unpin for EdsService
impl UnsafeUnpin for EdsService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request