pub struct AuditLogManager { /* private fields */ }Expand description
Best-effort buffered writer for Forge audit-log rows.
Implementations§
Source§impl AuditLogManager
impl AuditLogManager
Sourcepub fn new(db: DatabaseConnection) -> Self
pub fn new(db: DatabaseConnection) -> Self
Creates a manager with the default buffering policy.
Sourcepub fn with_config(db: DatabaseConnection, config: AuditLogBufferConfig) -> Self
pub fn with_config(db: DatabaseConnection, config: AuditLogBufferConfig) -> Self
Creates a manager with a caller-provided buffering policy.
Sourcepub async fn record(&self, request: AuditLogCreate)
pub async fn record(&self, request: AuditLogCreate)
Queues an audit record, falling back to a direct write if the queue is full.
Sourcepub fn cancel(&self)
pub fn cancel(&self)
Cancels delayed flush tasks. Call AuditLogManager::flush afterwards on shutdown.
Auto Trait Implementations§
impl Freeze for AuditLogManager
impl !RefUnwindSafe for AuditLogManager
impl Send for AuditLogManager
impl Sync for AuditLogManager
impl Unpin for AuditLogManager
impl UnsafeUnpin for AuditLogManager
impl !UnwindSafe for AuditLogManager
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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