pub struct PgDeliveries { /* private fields */ }Expand description
The relay’s publisher on the db transport: fans each event out to the consumers subscribed
to its type and marks it published, in one transaction.
Implementations§
Source§impl PgDeliveries
impl PgDeliveries
pub fn new(pool: PgPool) -> Self
Sourcepub fn route(self, consumer: &str, event_types: &[&str]) -> Self
pub fn route(self, consumer: &str, event_types: &[&str]) -> Self
Subscribes consumer to event_types — one [[consumer]] of puerto.toml.
Sourcepub fn consumers_for(&self, event_type: &str) -> &[String]
pub fn consumers_for(&self, event_type: &str) -> &[String]
Who receives an event of this type. None is fine: the event is marked published anyway.
Trait Implementations§
Source§impl EventPublisher for PgDeliveries
impl EventPublisher for PgDeliveries
Auto Trait Implementations§
impl !RefUnwindSafe for PgDeliveries
impl !UnwindSafe for PgDeliveries
impl Freeze for PgDeliveries
impl Send for PgDeliveries
impl Sync for PgDeliveries
impl Unpin for PgDeliveries
impl UnsafeUnpin for PgDeliveries
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more