pub struct PostgresSessionStore { /* private fields */ }Implementations§
Source§impl PostgresSessionStore
impl PostgresSessionStore
pub fn unbound(storage: &PostgresStorage) -> Self
Trait Implementations§
§impl AttachmentManifest for PostgresSessionStore
impl AttachmentManifest for PostgresSessionStore
fn record_intent(&self, intent: AttachmentIntent) -> Result<(), StoreError>
§fn commit_refs(
&self,
session_id: &str,
attachment_ids: &[AttachmentId],
) -> Result<(), StoreError>
fn commit_refs( &self, session_id: &str, attachment_ids: &[AttachmentId], ) -> Result<(), StoreError>
Mark a set of attachment ids as committed (i.e. now referenced
by a durable session-graph commit). Backends that store
commits and manifest in the same database stamp this inside
the commit transaction; the trait-level method is the
out-of-band entry point for hosts that want to commit an id
outside the normal turn-commit flow.
§fn list_uncommitted(
&self,
older_than_epoch_ms: u64,
) -> Result<Vec<AttachmentManifestEntry>, StoreError>
fn list_uncommitted( &self, older_than_epoch_ms: u64, ) -> Result<Vec<AttachmentManifestEntry>, StoreError>
Return manifest entries whose intent has aged past
older_than_epoch_ms without ever being committed. Hosts run
this periodically to find orphans left by crashes between
record_intent and the next turn commit.§fn forget(&self, attachment_id: &AttachmentId) -> Result<(), StoreError>
fn forget(&self, attachment_id: &AttachmentId) -> Result<(), StoreError>
Remove a manifest row entirely. Called by the GC coordinator
after the corresponding bytes have been removed from the
backing
AttachmentStore.Source§impl Clone for PostgresSessionStore
impl Clone for PostgresSessionStore
Source§fn clone(&self) -> PostgresSessionStore
fn clone(&self) -> PostgresSessionStore
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 more§impl RuntimePersistence for PostgresSessionStore
impl RuntimePersistence for PostgresSessionStore
§fn durability_tier(&self) -> DurabilityTier
fn durability_tier(&self) -> DurabilityTier
Durability tier this session store provides; defaults to
[
DurabilityTier::Inline].fn load_session<'life0, 'async_trait>(
&'life0 self,
scope: SessionReadScope,
) -> Pin<Box<dyn Future<Output = Result<Option<PersistedSessionRead>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_node<'life0, 'life1, 'async_trait>(
&'life0 self,
node_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionNodeRecord>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn commit_runtime_state<'life0, 'async_trait>(
&'life0 self,
commit: RuntimeCommit,
) -> Pin<Box<dyn Future<Output = Result<RuntimeCommitResult, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
§fn enqueue_queued_work<'life0, 'async_trait>(
&'life0 self,
batch: QueuedWorkBatchDraft,
) -> Pin<Box<dyn Future<Output = Result<QueuedWorkBatch, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn enqueue_queued_work<'life0, 'async_trait>(
&'life0 self,
batch: QueuedWorkBatchDraft,
) -> Pin<Box<dyn Future<Output = Result<QueuedWorkBatch, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Persist a queued-work batch for later claiming. Read more
§fn claim_ready_queued_work<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
owner_id: &'life2 str,
boundary: QueuedWorkClaimBoundary,
lease_ttl_ms: u64,
max_batches: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<QueuedWorkClaim>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn claim_ready_queued_work<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
owner_id: &'life2 str,
boundary: QueuedWorkClaimBoundary,
lease_ttl_ms: u64,
max_batches: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<QueuedWorkClaim>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Claim the next ready queued-work group for
owner_id. Read more§fn renew_queued_work_claim<'life0, 'life1, 'async_trait>(
&'life0 self,
claim: &'life1 QueuedWorkClaim,
lease_ttl_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<QueuedWorkClaim, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn renew_queued_work_claim<'life0, 'life1, 'async_trait>(
&'life0 self,
claim: &'life1 QueuedWorkClaim,
lease_ttl_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<QueuedWorkClaim, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Extend the lease on a held queued-work claim. Read more
§fn abandon_queued_work_claim<'life0, 'life1, 'async_trait>(
&'life0 self,
claim: &'life1 QueuedWorkClaim,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn abandon_queued_work_claim<'life0, 'life1, 'async_trait>(
&'life0 self,
claim: &'life1 QueuedWorkClaim,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Release a held queued-work claim without completing it. Read more
§fn cancel_queued_work_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
batch_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<QueuedWorkBatch>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn cancel_queued_work_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
batch_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<QueuedWorkBatch>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Remove an unclaimed queued-work batch from durable ingress. Read more
§fn list_queued_work<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<QueuedWorkBatch>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_queued_work<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<QueuedWorkBatch>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List all queued-work batches for a session. Read more
§fn list_pending_queued_work<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<QueuedWorkBatch>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_pending_queued_work<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<QueuedWorkBatch>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List queued-work batches that are still pending presentation/editing. Read more
fn save_session_meta<'life0, 'async_trait>(
&'life0 self,
meta: SessionMeta,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_session_meta<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionMeta>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn tombstone_nodes<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn vacuum<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<VacuumReport, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn gc_unreachable<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<GcReport, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn claim_ready_queued_work_by_batch_ids<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
owner_id: &'life2 str,
boundary: QueuedWorkClaimBoundary,
lease_ttl_ms: u64,
batch_ids: &'life3 [String],
) -> Pin<Box<dyn Future<Output = Result<Option<QueuedWorkClaim>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn claim_ready_queued_work_by_batch_ids<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
owner_id: &'life2 str,
boundary: QueuedWorkClaimBoundary,
lease_ttl_ms: u64,
batch_ids: &'life3 [String],
) -> Pin<Box<dyn Future<Output = Result<Option<QueuedWorkClaim>, StoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Claim a specific ready batch set selected from the durable queue. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for PostgresSessionStore
impl !UnwindSafe for PostgresSessionStore
impl Freeze for PostgresSessionStore
impl Send for PostgresSessionStore
impl Sync for PostgresSessionStore
impl Unpin for PostgresSessionStore
impl UnsafeUnpin for PostgresSessionStore
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