pub struct RdsService { /* private fields */ }Expand description
Route Discovery Service.
Implementations§
Source§impl RdsService
impl RdsService
Sourcepub fn new(cache: Arc<ShardedCache>, registry: Arc<ResourceRegistry>) -> Self
pub fn new(cache: Arc<ShardedCache>, registry: Arc<ResourceRegistry>) -> Self
Create a new RDS 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 RDS 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) -> RouteDiscoveryServiceServer<Self>
pub fn into_service(self) -> RouteDiscoveryServiceServer<Self>
Convert this service into a tonic service for use with Server::add_service.
Trait Implementations§
Source§impl Clone for RdsService
impl Clone for RdsService
Source§impl Debug for RdsService
impl Debug for RdsService
Source§impl RouteDiscoveryService for RdsService
impl RouteDiscoveryService for RdsService
Source§type StreamRoutesStream = ReceiverStream<Result<DiscoveryResponse, Status>>
type StreamRoutesStream = ReceiverStream<Result<DiscoveryResponse, Status>>
Server streaming response type for the StreamRoutes method.
Source§type DeltaRoutesStream = ReceiverStream<Result<DeltaDiscoveryResponse, Status>>
type DeltaRoutesStream = ReceiverStream<Result<DeltaDiscoveryResponse, Status>>
Server streaming response type for the DeltaRoutes method.
fn stream_routes<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<DiscoveryRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamRoutesStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delta_routes<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<DeltaDiscoveryRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::DeltaRoutesStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_routes<'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 RdsService
impl !UnwindSafe for RdsService
impl Freeze for RdsService
impl Send for RdsService
impl Sync for RdsService
impl Unpin for RdsService
impl UnsafeUnpin for RdsService
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