Skip to main content

audit_component_with_writer

Function audit_component_with_writer 

Source
pub fn audit_component_with_writer<T, StartFn, StartFut, ShutdownFn, ShutdownFut>(
    resources: T,
    writer: Arc<AuditWriter>,
    drain_timeout: Duration,
    record_server_start: StartFn,
    record_server_shutdown: ShutdownFn,
) -> 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,
Expand description

Composes owned writer startup, product lifecycle hooks, and mandatory shutdown drain.

Unlike a manual collection of hooks, this bundle always registers writer startup first. Lifecycle records keep their product-defined semantics and error policy. With mail-outbox-dependency, mail drain finishes before the shutdown record is admitted. Do not also register audit_component/audit_manager_component, which own the same phase.