[−][src]Struct nakadion::publisher::Publisher
Publishes events with retries
PublishApi
The publisher implements PublishApi
. If the trait method is used
for publishing no retries are done on partial successes. Retries are
only done on io errors and server errors or on auth errors if
retry_on_auth_errors
is set to true
.
Implementations
impl<C> Publisher<C> where
C: PublishApi + Send + Sync + 'static,
[src]
C: PublishApi + Send + Sync + 'static,
pub fn new(api_client: C) -> Self
[src]
Creates a new Publisher
with the default configuration.
pub fn from_env_prefixed<T: AsRef<str>>(
api_client: C,
prefix: T
) -> Result<Self, Error>
[src]
api_client: C,
prefix: T
) -> Result<Self, Error>
Creates a new Publisher
from the environement.
Environment variables must be prefixed with the given prefix
.
See PublisherConfig::from_env_prefixed
pub fn from_env(api_client: C) -> Result<Self, Error>
[src]
Creates a new Publisher
from the environement.
Environment variables must be prefixed "NAKADION".
See PublisherConfig::from_env
pub fn with_config(api_client: C, config: PublisherConfig) -> Self
[src]
pub fn set_logger<L: Logger>(&mut self, logger: L)
[src]
pub fn logger<L: Logger>(mut self: Self, logger: L) -> Self
[src]
pub fn instrumentation(mut self: Self, instr: Instrumentation) -> Self
[src]
pub fn set_instrumentation(&mut self, instr: Instrumentation)
[src]
Trait Implementations
impl<C: Clone> Clone for Publisher<C>
[src]
impl<C> PublishApi for Publisher<C> where
C: PublishApi + Send + Sync + 'static,
[src]
C: PublishApi + Send + Sync + 'static,
pub fn publish_events_batch<'a, B: Into<Bytes>, T: Into<FlowId>>(
&'a self,
event_type: &'a EventTypeName,
events: B,
flow_id: T
) -> PublishFuture<'a>
[src]
&'a self,
event_type: &'a EventTypeName,
events: B,
flow_id: T
) -> PublishFuture<'a>
impl<C> PublishesSerializedEvents for Publisher<C> where
C: PublishApi + Send + Sync + 'static,
[src]
C: PublishApi + Send + Sync + 'static,
pub fn publish_serialized_events<'a>(
&'a self,
event_type: &'a EventTypeName,
events: &[Bytes],
flow_id: FlowId
) -> PublishFuture<'a>
[src]
&'a self,
event_type: &'a EventTypeName,
events: &[Bytes],
flow_id: FlowId
) -> PublishFuture<'a>
Auto Trait Implementations
impl<C> !RefUnwindSafe for Publisher<C>
[src]
impl<C> Send for Publisher<C> where
C: Send + Sync,
[src]
C: Send + Sync,
impl<C> Sync for Publisher<C> where
C: Send + Sync,
[src]
C: Send + Sync,
impl<C> Unpin for Publisher<C>
[src]
impl<C> !UnwindSafe for Publisher<C>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> PublishesEvents for T where
T: PublishesSerializedEvents + Send + Sync,
[src]
T: PublishesSerializedEvents + Send + Sync,
pub fn publish_events<E, F>(
&'a Self,
&'a EventTypeName,
&'a [E],
F
) -> Pin<Box<dyn Future<Output = Result<(), PublishError>> + 'a + Send, Global>> where
F: Into<FlowId>,
E: Sync + Serialize,
[src]
&'a Self,
&'a EventTypeName,
&'a [E],
F
) -> Pin<Box<dyn Future<Output = Result<(), PublishError>> + 'a + Send, Global>> where
F: Into<FlowId>,
E: Sync + Serialize,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,