pub struct PollingSender<T: Transport> { /* private fields */ }
Expand description
PollingSender sends messages to a Polling service The Polling interface describes a service that automatically polls external services/hardware at a set interval, or a service which simply ensures an actor performs certain functionality at a set interval without any external input from the Polling service itself.
The AddPollTarget and RemovePollTarget operations may not be necessary for all implementations; some implementations might monitor heartbeats from sources configured in the link definition rather than manually adding or removing targets. client for sending Polling messages
Implementations§
Source§impl<T: Transport> PollingSender<T>
impl<T: Transport> PollingSender<T>
pub fn set_timeout(&self, interval: Duration)
Trait Implementations§
Source§impl<T: Clone + Transport> Clone for PollingSender<T>
impl<T: Clone + Transport> Clone for PollingSender<T>
Source§fn clone(&self) -> PollingSender<T>
fn clone(&self) -> PollingSender<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<T: Transport + Sync + Send> Polling for PollingSender<T>
impl<T: Transport + Sync + Send> Polling for PollingSender<T>
Source§fn poll_tx<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 PollRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<PollResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn poll_tx<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 PollRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<PollResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Manually request the provider to poll any external services/hardware
Source§fn add_poll_target<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 AddPollTargetRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<AddPollTargetResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add_poll_target<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 AddPollTargetRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<AddPollTargetResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Add a new target to be regularly polled
Source§fn remove_poll_target<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 RemovePollTargetRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<RemovePollTargetResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn remove_poll_target<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
arg: &'life2 RemovePollTargetRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<RemovePollTargetResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Remove a target that’s currently being polled so it will no longer be polled