pub struct AdminDovecote { /* private fields */ }Expand description
Explicit all-tenant PostgreSQL Dovecote operations.
Implementations§
Source§impl AdminDovecote
impl AdminDovecote
Sourcepub async fn enqueue<'c>(
&self,
transaction: &mut Transaction<'c, Postgres>,
tenant_id: TenantId,
event: NewEvent,
) -> Result<EnqueueOutcome, EnqueueError>
pub async fn enqueue<'c>( &self, transaction: &mut Transaction<'c, Postgres>, tenant_id: TenantId, event: NewEvent, ) -> Result<EnqueueOutcome, EnqueueError>
Enqueues an event for an explicitly named tenant.
Sourcepub async fn import_for_migration<'c>(
&self,
transaction: &mut Transaction<'c, Postgres>,
tenant_id: TenantId,
event: NewEvent,
state: ImportedDeliveryState,
) -> Result<ImportOutcome, ImportError>
pub async fn import_for_migration<'c>( &self, transaction: &mut Transaction<'c, Postgres>, tenant_id: TenantId, event: NewEvent, state: ImportedDeliveryState, ) -> Result<ImportOutcome, ImportError>
Imports one event and legacy state for an explicitly named tenant.
Sourcepub async fn finalize_pending_delivery_for_migration<'c>(
&self,
transaction: &mut Transaction<'c, Postgres>,
tenant_id: TenantId,
row_id: RowId,
delivered_at: OffsetDateTime,
) -> Result<FinalizeOutcome, FinalizeError>
pub async fn finalize_pending_delivery_for_migration<'c>( &self, transaction: &mut Transaction<'c, Postgres>, tenant_id: TenantId, row_id: RowId, delivered_at: OffsetDateTime, ) -> Result<FinalizeOutcome, FinalizeError>
Finalizes one migration row for an explicitly named tenant.
Sourcepub async fn page(
&self,
after_row_id: Option<RowId>,
limit: Limit,
) -> Result<Vec<PagedEvent>, PageError>
pub async fn page( &self, after_row_id: Option<RowId>, limit: Limit, ) -> Result<Vec<PagedEvent>, PageError>
Reads a live page across all tenants.
Sourcepub async fn begin_snapshot(&self) -> Result<SnapshotPager, PageError>
pub async fn begin_snapshot(&self) -> Result<SnapshotPager, PageError>
Begins a finite snapshot pager across all tenants.
Sourcepub async fn claim(
&self,
worker: WorkerId,
lease_for: Lease,
limit: Limit,
) -> Result<Vec<ClaimedEvent>, ClaimError>
pub async fn claim( &self, worker: WorkerId, lease_for: Lease, limit: Limit, ) -> Result<Vec<ClaimedEvent>, ClaimError>
Claims pending and expired deliveries across all tenants.
Sourcepub async fn renew(
&self,
tenant_id: TenantId,
row_id: RowId,
claim_token: &ClaimToken,
lease_for: Lease,
) -> Result<(), MutationError>
pub async fn renew( &self, tenant_id: TenantId, row_id: RowId, claim_token: &ClaimToken, lease_for: Lease, ) -> Result<(), MutationError>
Renews one claim for an explicitly named tenant.
Sourcepub async fn ack(
&self,
tenant_id: TenantId,
row_id: RowId,
claim_token: &ClaimToken,
) -> Result<(), MutationError>
pub async fn ack( &self, tenant_id: TenantId, row_id: RowId, claim_token: &ClaimToken, ) -> Result<(), MutationError>
Acknowledges one claim for an explicitly named tenant.
Sourcepub async fn retry(
&self,
tenant_id: TenantId,
row_id: RowId,
claim_token: &ClaimToken,
failure: &Failure,
backoff: Delay,
) -> Result<(), MutationError>
pub async fn retry( &self, tenant_id: TenantId, row_id: RowId, claim_token: &ClaimToken, failure: &Failure, backoff: Delay, ) -> Result<(), MutationError>
Retries one claim for an explicitly named tenant.
Sourcepub async fn release(
&self,
tenant_id: TenantId,
row_id: RowId,
claim_token: &ClaimToken,
delay: Delay,
) -> Result<(), MutationError>
pub async fn release( &self, tenant_id: TenantId, row_id: RowId, claim_token: &ClaimToken, delay: Delay, ) -> Result<(), MutationError>
Releases one claim for an explicitly named tenant.
Sourcepub async fn quarantine(
&self,
tenant_id: TenantId,
row_id: RowId,
claim_token: &ClaimToken,
reason: &QuarantineReason,
) -> Result<(), MutationError>
pub async fn quarantine( &self, tenant_id: TenantId, row_id: RowId, claim_token: &ClaimToken, reason: &QuarantineReason, ) -> Result<(), MutationError>
Quarantines one claim for an explicitly named tenant.
Trait Implementations§
Source§impl Clone for AdminDovecote
impl Clone for AdminDovecote
Source§fn clone(&self) -> AdminDovecote
fn clone(&self) -> AdminDovecote
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for AdminDovecote
impl !UnwindSafe for AdminDovecote
impl Freeze for AdminDovecote
impl Send for AdminDovecote
impl Sync for AdminDovecote
impl Unpin for AdminDovecote
impl UnsafeUnpin for AdminDovecote
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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