pub struct CardRefresher { /* private fields */ }Expand description
Probes registered agents and records whether they answered.
Implementations§
Source§impl CardRefresher
impl CardRefresher
Sourcepub fn new(registry: Arc<dyn AgentRegistry>, cards: Arc<dyn CardSource>) -> Self
pub fn new(registry: Arc<dyn AgentRegistry>, cards: Arc<dyn CardSource>) -> Self
Build a refresher over a registry and a way to read cards.
Sourcepub fn every(self, interval: Duration) -> Self
pub fn every(self, interval: Duration) -> Self
Probe on a different interval than DEFAULT_REFRESH_INTERVAL.
Sourcepub async fn refresh_once(&self) -> Result<RefreshReport, RegistryError>
pub async fn refresh_once(&self) -> Result<RefreshReport, RegistryError>
Probe every registered agent once.
Errors are per agent and never abort the pass: one unreachable agent must not stop the others from being checked, which is the whole reason to check them.
Auto Trait Implementations§
impl !RefUnwindSafe for CardRefresher
impl !UnwindSafe for CardRefresher
impl Freeze for CardRefresher
impl Send for CardRefresher
impl Sync for CardRefresher
impl Unpin for CardRefresher
impl UnsafeUnpin for CardRefresher
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more