pub struct Cache { /* private fields */ }
Implementations§
Source§impl Cache
impl Cache
pub fn new(ads: bool) -> Self
pub async fn create_watch( &self, req: &DiscoveryRequest, tx: Sender<(DiscoveryRequest, DiscoveryResponse)>, known_resource_names: &HashMap<String, HashSet<String>>, ) -> Option<WatchId>
pub async fn cancel_watch(&self, watch_id: &WatchId)
pub async fn set_snapshot(&self, node: &str, snapshot: Snapshot)
pub async fn fetch<'a>( &'a self, req: &'a DiscoveryRequest, type_url: &'static str, ) -> Result<DiscoveryResponse, FetchError>
pub async fn node_status(&self) -> HashMap<String, Instant>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Cache
impl !RefUnwindSafe for Cache
impl Send for Cache
impl Sync for Cache
impl Unpin for Cache
impl !UnwindSafe for Cache
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
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