Skip to main content

audit_component

Function audit_component 

Source
pub fn audit_component<T, StartFn, StartFut, ShutdownFn, ShutdownFut, FlushFn, FlushFut>(
    resources: T,
    record_server_start: StartFn,
    record_server_shutdown: ShutdownFn,
    flush_audit_manager: FlushFn,
) -> RuntimeComponentBundleRegistration<impl RuntimeComponentBundle>
where T: Clone + Send + 'static, StartFn: FnOnce(T) -> StartFut + Send + Sync + 'static, StartFut: Future<Output = Result<(), String>> + Send + 'static, ShutdownFn: FnOnce(T) -> ShutdownFut + Send + Sync + 'static, ShutdownFut: Future<Output = Result<(), String>> + Send + 'static, FlushFn: FnOnce(()) -> FlushFut + Send + Sync + 'static, FlushFut: Future<Output = Result<(), String>> + Send + 'static,
Expand description

Creates the full audit lifecycle component bundle used by product entrypoints.

resources is product-defined. It commonly contains a database connection and runtime config snapshot. record_server_start and record_server_shutdown record the product’s own lifecycle audit entries. flush_audit_manager drains the product’s buffered audit writer. With the mail-outbox-dependency feature enabled, the shutdown audit phase automatically runs after the mail outbox drain component.