[][src]Struct nakadion::Nakadion

pub struct Nakadion { /* fields omitted */ }

This struct represents Nakadion.

Once instatntiated it can only be used query its running state or to stop consuming events.

Methods

impl Nakadion[src]

pub fn start_with<HF, C, A, M>(
    subscription_id: SubscriptionId,
    streaming_client: C,
    api_client: A,
    handler_factory: HF,
    commit_strategy: CommitStrategy,
    metrics_collector: M,
    min_idle_worker_lifetime: Option<Duration>
) -> Result<Nakadion, Error> where
    C: StreamingClient + Clone + Sync + Send + 'static,
    A: ApiClient + Clone + Sync + Send + 'static,
    HF: HandlerFactory + Sync + Send + 'static,
    M: MetricsCollector + Clone + Send + Sync + 'static, 
[src]

Start with manually created components and parameter

The SubscriptionId must be already known

Errors

Nakadion could not be started.

pub fn start<HF, P, M>(
    config: NakadionConfig,
    handler_factory: HF,
    access_token_provider: P,
    metrics_collector: M
) -> Result<Nakadion, Error> where
    HF: HandlerFactory + Sync + Send + 'static,
    P: ProvidesAccessToken + Send + Sync + 'static,
    M: MetricsCollector + Clone + Send + Sync + 'static, 
[src]

Start with the given configuration and create all interally required components from the configuration

Errors

Nakadion could not be started. This might be due to an invalid configuration

pub fn running(&self) -> bool[src]

Returns true if Nakadion is running

pub fn stop(&self)[src]

Stops Nakadion

pub fn block_until_stopped(&self)[src]

Block the current thread until Nakadion has stopped

pub fn block_until_stopped_with_interval(&self, poll_interval: Duration)[src]

Block the current thread until Nakadion has stopped.

The state is polled at the given poll_interval.

Auto Trait Implementations

impl Send for Nakadion

impl Sync for Nakadion

Blanket Implementations

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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