pub struct CustomProbe { /* private fields */ }Expand description
Зонд на функции проверки: следит за соседом, вызывая функцию проверки сразу и затем с паузой
pull_delay, пока его токен не отменён.
Каждая попытка получает собственный Attempt с дочерним токеном и ограничивается пределом
длительности снаружи; не уложившаяся попытка считается отказом. Каждое изменение наблюдения
записывается в канал; повтор того же наблюдения в канал не пишется.
Implementations§
Trait Implementations§
Source§impl Debug for CustomProbe
impl Debug for CustomProbe
Source§impl Probe for CustomProbe
impl Probe for CustomProbe
Source§fn run<'life0, 'life1, 'async_trait>(
&'life0 self,
settings: &'life1 ProbeSettings,
states: Sender<Observation>,
token: CancellationToken,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn run<'life0, 'life1, 'async_trait>(
&'life0 self,
settings: &'life1 ProbeSettings,
states: Sender<Observation>,
token: CancellationToken,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Следить за соседом до отмены
token, записывая каждое изменение в states.Auto Trait Implementations§
impl !RefUnwindSafe for CustomProbe
impl !UnwindSafe for CustomProbe
impl Forget for CustomProbe
impl Freeze for CustomProbewhere
*const ArcInner<dyn Fn(Attempt) -> Pin<Box<dyn Future<Output = Result<bool, Box<dyn Error + Sync + Send>>> + Send>> + Sync + Send> is !null: Freeze,
PhantomData<ArcInner<dyn Fn(Attempt) -> Pin<Box<dyn Future<Output = Result<bool, Box<dyn Error + Sync + Send>>> + Send>> + Sync + Send>>: Freeze,
impl Move for CustomProbe
impl Send for CustomProbe
impl Sync for CustomProbe
impl Unpin for CustomProbe
impl UnsafeUnpin for CustomProbewhere
*const ArcInner<dyn Fn(Attempt) -> Pin<Box<dyn Future<Output = Result<bool, Box<dyn Error + Sync + Send>>> + Send>> + Sync + Send> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn(Attempt) -> Pin<Box<dyn Future<Output = Result<bool, Box<dyn Error + Sync + Send>>> + Send>> + Sync + Send>>: UnsafeUnpin,
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