pub struct AdsService { /* private fields */ }Expand description
Aggregated Discovery Service.
Implements the ADS gRPC service, multiplexing CDS, EDS, LDS, RDS, and SDS over a single bidirectional stream.
Implementations§
Source§impl AdsService
impl AdsService
Sourcepub fn new(cache: Arc<ShardedCache>, registry: Arc<ResourceRegistry>) -> Self
pub fn new(cache: Arc<ShardedCache>, registry: Arc<ResourceRegistry>) -> Self
Create a new ADS service.
Sourcepub fn with_config(
cache: Arc<ShardedCache>,
registry: Arc<ResourceRegistry>,
config: AdsConfig,
) -> Self
pub fn with_config( cache: Arc<ShardedCache>, registry: Arc<ResourceRegistry>, config: AdsConfig, ) -> Self
Create with custom configuration.
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) -> AggregatedDiscoveryServiceServer<Self>
pub fn into_service(self) -> AggregatedDiscoveryServiceServer<Self>
Convert this service into a tonic service for use with Server::add_service.
This creates a properly typed gRPC service using the data-plane-api generated server.
Sourcepub fn process_sotw_request(
&self,
ctx: &StreamContext,
type_url: &str,
version_info: &str,
resource_names: &[String],
node_hash: NodeHash,
response_nonce: &str,
error_detail: Option<&str>,
) -> Result<Option<DiscoveryResponse>, Status>
pub fn process_sotw_request( &self, ctx: &StreamContext, type_url: &str, version_info: &str, resource_names: &[String], node_hash: NodeHash, response_nonce: &str, error_detail: Option<&str>, ) -> Result<Option<DiscoveryResponse>, Status>
Process an incoming SotW discovery request.
Trait Implementations§
Source§impl AggregatedDiscoveryService for AdsService
impl AggregatedDiscoveryService for AdsService
Source§type StreamAggregatedResourcesStream = ReceiverStream<Result<DiscoveryResponse, Status>>
type StreamAggregatedResourcesStream = ReceiverStream<Result<DiscoveryResponse, Status>>
Server streaming response type for the StreamAggregatedResources method.
Source§type DeltaAggregatedResourcesStream = ReceiverStream<Result<DeltaDiscoveryResponse, Status>>
type DeltaAggregatedResourcesStream = ReceiverStream<Result<DeltaDiscoveryResponse, Status>>
Server streaming response type for the DeltaAggregatedResources method.
Source§fn stream_aggregated_resources<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<DiscoveryRequest>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamAggregatedResourcesStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stream_aggregated_resources<'life0, 'async_trait>(
&'life0 self,
request: 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.
fn delta_aggregated_resources<'life0, 'async_trait>(
&'life0 self,
request: 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 Clone for AdsService
impl Clone for AdsService
Auto Trait Implementations§
impl !RefUnwindSafe for AdsService
impl !UnwindSafe for AdsService
impl Freeze for AdsService
impl Send for AdsService
impl Sync for AdsService
impl Unpin for AdsService
impl UnsafeUnpin for AdsService
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