pub struct LdsService { /* private fields */ }Expand description
Listener Discovery Service.
Implementations§
Source§impl LdsService
impl LdsService
Sourcepub fn new(cache: Arc<ShardedCache>, registry: Arc<ResourceRegistry>) -> Self
pub fn new(cache: Arc<ShardedCache>, registry: Arc<ResourceRegistry>) -> Self
Create a new LDS 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 LDS 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) -> ListenerDiscoveryServiceServer<Self>
pub fn into_service(self) -> ListenerDiscoveryServiceServer<Self>
Convert this service into a tonic service for use with Server::add_service.
Trait Implementations§
Source§impl Clone for LdsService
impl Clone for LdsService
Source§impl Debug for LdsService
impl Debug for LdsService
Source§impl ListenerDiscoveryService for LdsService
impl ListenerDiscoveryService for LdsService
Source§type StreamListenersStream = ReceiverStream<Result<DiscoveryResponse, Status>>
type StreamListenersStream = ReceiverStream<Result<DiscoveryResponse, Status>>
Server streaming response type for the StreamListeners method.
Source§type DeltaListenersStream = ReceiverStream<Result<DeltaDiscoveryResponse, Status>>
type DeltaListenersStream = ReceiverStream<Result<DeltaDiscoveryResponse, Status>>
Server streaming response type for the DeltaListeners method.
fn stream_listeners<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<DiscoveryRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamListenersStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delta_listeners<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<DeltaDiscoveryRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::DeltaListenersStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_listeners<'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 LdsService
impl !UnwindSafe for LdsService
impl Freeze for LdsService
impl Send for LdsService
impl Sync for LdsService
impl Unpin for LdsService
impl UnsafeUnpin for LdsService
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