pub struct ActionPoller { /* private fields */ }Expand description
Single-owner bounded action workflow driver.
ⓘ
use cloud_sdk::action_polling::ActionPoller;
fn duplicate(driver: ActionPoller) {
let _copy = driver.clone();
}Implementations§
Source§impl ActionPoller
impl ActionPoller
Sourcepub const fn new(
limits: ActionPollLimits,
progress_policy: ProgressPolicy,
started: MonotonicInstant,
) -> Self
pub const fn new( limits: ActionPollLimits, progress_policy: ProgressPolicy, started: MonotonicInstant, ) -> Self
Creates a workflow without reading a clock or issuing a request.
Sourcepub const fn observations(&self) -> u32
pub const fn observations(&self) -> u32
Returns accepted provider observations.
Sourcepub const fn cumulative_delay(&self) -> MonotonicDuration
pub const fn cumulative_delay(&self) -> MonotonicDuration
Returns cumulative delay selected by backoff.
Sourcepub const fn is_terminal(&self) -> bool
pub const fn is_terminal(&self) -> bool
Reports whether no further request can be admitted.
Sourcepub fn next_request(
&mut self,
control: PollControl,
now: MonotonicInstant,
) -> Result<PollRequestStep, ActionPollError>
pub fn next_request( &mut self, control: PollControl, now: MonotonicInstant, ) -> Result<PollRequestStep, ActionPollError>
Admits, delays, cancels, or times out the next request.
Sourcepub fn observe<E, B>(
&mut self,
update: ActionUpdate<E>,
progress: ProgressObservation,
rate_limit: Option<RateLimit>,
provider_time: ProviderTimeObservation,
now: MonotonicInstant,
backoff: &mut B,
) -> Result<ActionPollStep<E>, ActionObserveError<B::Error>>where
B: PollBackoff,
pub fn observe<E, B>(
&mut self,
update: ActionUpdate<E>,
progress: ProgressObservation,
rate_limit: Option<RateLimit>,
provider_time: ProviderTimeObservation,
now: MonotonicInstant,
backoff: &mut B,
) -> Result<ActionPollStep<E>, ActionObserveError<B::Error>>where
B: PollBackoff,
Accepts exactly one response for the last admitted request.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ActionPoller
impl RefUnwindSafe for ActionPoller
impl Send for ActionPoller
impl Sync for ActionPoller
impl Unpin for ActionPoller
impl UnsafeUnpin for ActionPoller
impl UnwindSafe for ActionPoller
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