pub struct ResilientConfig {
pub backoff: Backoff,
pub lag_policy: LagPolicy,
pub cursor_store: Arc<dyn CursorStore>,
}Expand description
Bundles the resilience knobs for StreamClient::resilient_subscribe.
Fields§
§backoff: BackoffReconnect backoff schedule.
lag_policy: LagPolicyWhat to do with Lagged notices.
cursor_store: Arc<dyn CursorStore>Where the resume cursor is persisted.
Implementations§
Source§impl ResilientConfig
impl ResilientConfig
Sourcepub fn new() -> Self
pub fn new() -> Self
Start from the defaults (forever-retry backoff, LagPolicy::AutoResume,
no persistence).
Sourcepub fn cursor_store(self, store: Arc<dyn CursorStore>) -> Self
pub fn cursor_store(self, store: Arc<dyn CursorStore>) -> Self
Persist the resume cursor through store.
Sourcepub fn lag_policy(self, policy: LagPolicy) -> Self
pub fn lag_policy(self, policy: LagPolicy) -> Self
Override the lag policy.
Trait Implementations§
Source§impl Debug for ResilientConfig
impl Debug for ResilientConfig
Auto Trait Implementations§
impl !RefUnwindSafe for ResilientConfig
impl !UnwindSafe for ResilientConfig
impl Freeze for ResilientConfig
impl Send for ResilientConfig
impl Sync for ResilientConfig
impl Unpin for ResilientConfig
impl UnsafeUnpin for ResilientConfig
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