[−][src]Struct nakadion::Nakadion
This struct represents Nakadion.
Once instantiated 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]
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,
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]
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,
Start with the given configuration and create all internally 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
impl Unpin for Nakadion
impl !UnwindSafe for Nakadion
impl !RefUnwindSafe for Nakadion
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,