pub struct AuditBatch { /* private fields */ }Expand description
The batch owner. Constructed once per configured EventStore; every
dispatch-audit call site routes its row through AuditBatch::submit
instead of taking its own writer-task acquisition.
Implementations§
Source§impl AuditBatch
impl AuditBatch
pub fn new(store: Arc<dyn EventStore>, config: AuditBatchConfig) -> Arc<Self> ⓘ
Sourcepub fn health_metrics(&self) -> AuditBatchHealthMetrics
pub fn health_metrics(&self) -> AuditBatchHealthMetrics
Process-lifetime audit-batch health counters, for the registry/
runtime owner to feed into db_diagnostics (D8’s operator surface).
Unlike test_internals::AuditBatchSnapshot::metrics_snapshot,
which is test-only (the module is cfg-gated and invisible to the
default doc build, so an intra-doc link cannot resolve), this is
always available.
Trait Implementations§
Source§impl AuditBatchControl for AuditBatch
impl AuditBatchControl for AuditBatch
fn submit<'life0, 'async_trait>(
&'life0 self,
row: PreparedAuditRow,
) -> Pin<Box<dyn Future<Output = Result<AuditCommitOutcome, AuditTerminalReason>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn quiesce<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), AuditTerminalReason>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close_and_drain<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), AuditTerminalReason>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl !Freeze for AuditBatch
impl !RefUnwindSafe for AuditBatch
impl !UnwindSafe for AuditBatch
impl Forget for AuditBatch
impl Move for AuditBatch
impl Send for AuditBatchwhere
Arc<Inner>: Send,
Arc<dyn EventStore>: Send,
Arc<AuditBatchConfig>: Send,
Mutex<RawMutex, Option<JoinHandle<()>>>: Send,
impl Sync for AuditBatchwhere
Arc<Inner>: Sync,
Arc<dyn EventStore>: Sync,
Arc<AuditBatchConfig>: Sync,
Mutex<RawMutex, Option<JoinHandle<()>>>: Sync,
impl Unpin for AuditBatchwhere
Arc<Inner>: Unpin,
Arc<dyn EventStore>: Unpin,
Arc<AuditBatchConfig>: Unpin,
Align1<u8>: Unpin,
JoinHandle<()>: Unpin,
impl UnsafeUnpin for AuditBatchwhere
*const ArcInner<Inner> is !null: UnsafeUnpin,
PhantomData<ArcInner<Inner>>: UnsafeUnpin,
*const ArcInner<dyn EventStore> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn EventStore>>: UnsafeUnpin,
*const ArcInner<AuditBatchConfig> is !null: UnsafeUnpin,
PhantomData<ArcInner<AuditBatchConfig>>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const Header is !null: UnsafeUnpin,
PhantomData<()>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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