Struct nakadion::publisher::NakadiPublisher [−][src]
pub struct NakadiPublisher { /* fields omitted */ }
Publishes events to Nakadi
The publisher is just a convinience struct
and is not used for consuming a Nakadi
stream.
It is simply a helper for publishing to a Nakadi
stream
Methods
impl NakadiPublisher
[src]
impl NakadiPublisher
pub fn new<U: Into<String>, T: ProvidesAccessToken + 'static>(
nakadi_base_url: U,
token_provider: T
) -> NakadiPublisher
[src]
pub fn new<U: Into<String>, T: ProvidesAccessToken + 'static>(
nakadi_base_url: U,
token_provider: T
) -> NakadiPublisher
Create a new NakadiPublisher
Create a new NakadiPublisher
pub fn publish_raw(
&self,
event_type: &str,
bytes: Vec<u8>,
flow_id: Option<FlowId>,
budget: Duration
) -> Result<PublishStatus, PublishError>
[src]
pub fn publish_raw(
&self,
event_type: &str,
bytes: Vec<u8>,
flow_id: Option<FlowId>,
budget: Duration
) -> Result<PublishStatus, PublishError>
Publish events packed into a vector of bytes.
The events must be encoded in a way that Nakadi
can understand and pass it`s valaditation mechanism
especially regarding schemas.
The budget
is the maximum Duration
publishing events
is retried. This can lead to events being published multiple
times.
pub fn publish_events<T: Serialize>(
&self,
event_type: &str,
events: &[T],
flow_id: Option<FlowId>,
budget: Duration
) -> Result<PublishStatus, PublishError>
[src]
pub fn publish_events<T: Serialize>(
&self,
event_type: &str,
events: &[T],
flow_id: Option<FlowId>,
budget: Duration
) -> Result<PublishStatus, PublishError>
Publish the given events to Nakadi
The budget
is the maximum Duration
publishing events
is retried. This can lead to events being published multiple
times.
Auto Trait Implementations
impl !Send for NakadiPublisher
impl !Send for NakadiPublisher
impl !Sync for NakadiPublisher
impl !Sync for NakadiPublisher