pub struct OutboxPostgres { /* private fields */ }Expand description
The outbox, as the relay reads it.
Implementations§
Trait Implementations§
Source§impl Outbox for OutboxPostgres
impl Outbox for OutboxPostgres
Source§fn intentar_liderar<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, ErrorTransporte>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn intentar_liderar<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, ErrorTransporte>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Whether this process may relay now. Only one relay runs at a time, so the outbox order
is kept with several worker replicas (a Postgres advisory lock). It is asked before
every batch; once held, it keeps answering
true.Source§fn buscar_sin_publicar<'life0, 'async_trait>(
&'life0 self,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<SobreEvento>, ErrorTransporte>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn buscar_sin_publicar<'life0, 'async_trait>(
&'life0 self,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<SobreEvento>, ErrorTransporte>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Up to
limite unpublished events, oldest first (the order they were written).Source§fn marcar_publicados<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [Uuid],
) -> Pin<Box<dyn Future<Output = Result<(), ErrorTransporte>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn marcar_publicados<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [Uuid],
) -> Pin<Box<dyn Future<Output = Result<(), ErrorTransporte>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Marks these events published. Idempotent: an id already marked is left as it is.
Auto Trait Implementations§
impl !Freeze for OutboxPostgres
impl !RefUnwindSafe for OutboxPostgres
impl !UnwindSafe for OutboxPostgres
impl Forget for OutboxPostgres
impl Move for OutboxPostgres
impl Send for OutboxPostgres
impl Sync for OutboxPostgres
impl Unpin for OutboxPostgres
impl UnsafeUnpin for OutboxPostgres
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