[][src]Struct nakadion::components::connector::Connector

pub struct Connector<C> { /* fields omitted */ }

A Connector to connect to a Nakadi Stream

on_retry

A closure to be called before a retry. The error which caused the retry and the time until the retry will be made is passed. This closure overrides the current one and will be used for all subsequent clones of this instance. This allows users to give context on the call site.

Methods

impl<C> Connector<C> where
    C: SubscriptionStreamApi + Send + Sync + 'static, 
[src]

pub fn new_with_config(stream_client: C, config: ConnectConfig) -> Self[src]

pub fn new(stream_client: C) -> Self[src]

pub fn set_logger<L: Logger>(&mut self, logger: L)[src]

pub fn logger<L: Logger>(self, logger: L) -> Self[src]

pub fn instrumentation(&self) -> Instrumentation[src]

pub async fn connect<'_>(
    &'_ self,
    subscription_id: SubscriptionId
) -> Result<SubscriptionStreamChunks, ConnectError>
[src]

pub async fn connect_abortable<'_, F>(
    &'_ self,
    subscription_id: SubscriptionId,
    abort: F
) -> Result<SubscriptionStreamChunks, ConnectError> where
    F: FnMut() -> bool + Send
[src]

pub fn set_flow_id(&mut self, flow_id: FlowId)[src]

pub fn configure(self, config: ConnectConfig) -> Self[src]

pub fn set_config(&mut self, config: ConnectConfig)[src]

pub fn set_instrumentation(&mut self, instrumentation: Instrumentation)[src]

pub fn stream_parameters_mut(&mut self) -> &mut StreamParameters[src]

pub fn config(&self) -> &ConnectConfig[src]

pub fn config_mut(&mut self) -> &mut ConnectConfig[src]

pub async fn frame_stream<'_>(
    &'_ self,
    subscription_id: SubscriptionId
) -> Result<(StreamId, FramesStream), ConnectError>
[src]

Get a stream of frames(lines) directly from Nakadi.

pub async fn batch_stream<'_>(
    &'_ self,
    subscription_id: SubscriptionId
) -> Result<(StreamId, BatchStream), ConnectError>
[src]

Get a stream of analyzed lines.

pub async fn events_stream<'_, E: DeserializeOwned>(
    &'_ self,
    subscription_id: SubscriptionId
) -> Result<(StreamId, EventsStream<E>), ConnectError>
[src]

Get a stream of deserialized events.

Auto Trait Implementations

impl<C> !RefUnwindSafe for Connector<C>

impl<C> Send for Connector<C> where
    C: Send

impl<C> Sync for Connector<C> where
    C: Sync

impl<C> Unpin for Connector<C> where
    C: Unpin

impl<C> !UnwindSafe for Connector<C>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,