pub struct DeliveryWorker { /* private fields */ }Expand description
background delivery worker that polls the queue and delivers messages
Implementations§
Source§impl DeliveryWorker
impl DeliveryWorker
Sourcepub fn new(
config: WorkerConfig,
pool: PgPool,
resolver: TokioResolver,
hostname: String,
) -> Self
pub fn new( config: WorkerConfig, pool: PgPool, resolver: TokioResolver, hostname: String, ) -> Self
Construct a delivery worker with the given config + dependencies.
Sourcepub fn with_dkim(self, dkim: DkimSignConfig) -> Self
pub fn with_dkim(self, dkim: DkimSignConfig) -> Self
Configure DKIM signing for outbound messages.
Sourcepub fn with_event_sender(self, sender: DeliveryEventSender) -> Self
pub fn with_event_sender(self, sender: DeliveryEventSender) -> Self
Attach a DeliveryEventSender callback for external observers.
Sourcepub fn with_valkey(self, url: String) -> Self
pub fn with_valkey(self, url: String) -> Self
Set the Valkey URL to subscribe to queue:notify for fast wakeup.
Auto Trait Implementations§
impl Freeze for DeliveryWorker
impl !RefUnwindSafe for DeliveryWorker
impl Send for DeliveryWorker
impl Sync for DeliveryWorker
impl Unpin for DeliveryWorker
impl UnsafeUnpin for DeliveryWorker
impl !UnwindSafe for DeliveryWorker
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