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]
pub fn new<U: Into<String>, T: ProvidesAccessToken + 'static>(
nakadi_base_url: U,
token_provider: T
) -> NakadiPublisher
[src]
nakadi_base_url: U,
token_provider: T
) -> NakadiPublisher
Create a new NakadiPublisher
[src]
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]
&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.
pub fn publish_events<T: Serialize>(
&self,
event_type: &str,
events: &[T],
flow_id: Option<FlowId>,
budget: Duration
) -> Result<PublishStatus, PublishError>
[src]
&self,
event_type: &str,
events: &[T],
flow_id: Option<FlowId>,
budget: Duration
) -> Result<PublishStatus, PublishError>
Publish the given events to Nakadi