pub struct LaserstreamConfig {
pub api_key: String,
pub endpoint: String,
pub max_reconnect_attempts: Option<u32>,
pub channel_options: ChannelOptions,
pub replay: bool,
}Fields§
§api_key: StringAPI Key for authentication.
endpoint: StringThe Laserstream endpoint URL.
max_reconnect_attempts: Option<u32>Maximum number of reconnection attempts. Defaults to 10. A hard cap of 240 attempts (20 minutes / 5 seconds) is enforced internally.
channel_options: ChannelOptionsgRPC channel options
replay: boolWhen true, enable replay on reconnects (uses from_slot and internal slot tracking). When false, no replay - start from current slot on reconnects. Default: true
Implementations§
Source§impl LaserstreamConfig
impl LaserstreamConfig
pub fn new(endpoint: String, api_key: String) -> Self
Sourcepub fn with_max_reconnect_attempts(self, attempts: u32) -> Self
pub fn with_max_reconnect_attempts(self, attempts: u32) -> Self
Sets the maximum number of reconnection attempts.
Sourcepub fn with_channel_options(self, options: ChannelOptions) -> Self
pub fn with_channel_options(self, options: ChannelOptions) -> Self
Sets custom channel options.
Sourcepub fn with_replay(self, replay: bool) -> Self
pub fn with_replay(self, replay: bool) -> Self
Sets replay behavior on reconnects. When true (default), uses from_slot and internal slot tracking for replay. When false, starts from current slot on reconnects (no replay).
Trait Implementations§
Source§impl Clone for LaserstreamConfig
impl Clone for LaserstreamConfig
Source§fn clone(&self) -> LaserstreamConfig
fn clone(&self) -> LaserstreamConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LaserstreamConfig
impl Debug for LaserstreamConfig
Auto Trait Implementations§
impl Freeze for LaserstreamConfig
impl RefUnwindSafe for LaserstreamConfig
impl Send for LaserstreamConfig
impl Sync for LaserstreamConfig
impl Unpin for LaserstreamConfig
impl UnsafeUnpin for LaserstreamConfig
impl UnwindSafe for LaserstreamConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§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::RequestSource§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