pub struct AuditSystem { /* private fields */ }Expand description
Main audit system that manages target lifecycle and audit log dispatch
Implementations§
Source§impl AuditSystem
impl AuditSystem
Sourcepub async fn start(&self, config: Config) -> AuditResult<()>
pub async fn start(&self, config: Config) -> AuditResult<()>
Sourcepub async fn pause(&self) -> AuditResult<()>
pub async fn pause(&self) -> AuditResult<()>
Sourcepub async fn resume(&self) -> AuditResult<()>
pub async fn resume(&self) -> AuditResult<()>
Sourcepub async fn close(&self) -> AuditResult<()>
pub async fn close(&self) -> AuditResult<()>
Stops the audit system and closes all targets
§Returns
AuditResult<()>- Result indicating success or failure
Sourcepub async fn get_state(&self) -> AuditSystemState
pub async fn get_state(&self) -> AuditSystemState
Gets the current state of the audit system
Sourcepub async fn is_running(&self) -> bool
pub async fn is_running(&self) -> bool
Sourcepub async fn dispatch(&self, entry: Arc<AuditEntry>) -> AuditResult<()>
pub async fn dispatch(&self, entry: Arc<AuditEntry>) -> AuditResult<()>
Sourcepub async fn dispatch_batch(
&self,
entries: Vec<Arc<AuditEntry>>,
) -> AuditResult<()>
pub async fn dispatch_batch( &self, entries: Vec<Arc<AuditEntry>>, ) -> AuditResult<()>
Sourcepub async fn enable_target(&self, target_id: &str) -> AuditResult<()>
pub async fn enable_target(&self, target_id: &str) -> AuditResult<()>
Sourcepub async fn disable_target(&self, target_id: &str) -> AuditResult<()>
pub async fn disable_target(&self, target_id: &str) -> AuditResult<()>
Sourcepub async fn remove_target(&self, target_id: &str) -> AuditResult<()>
pub async fn remove_target(&self, target_id: &str) -> AuditResult<()>
Sourcepub async fn upsert_target(
&self,
target_id: String,
target: Box<dyn Target<AuditEntry> + Send + Sync>,
) -> AuditResult<()>
pub async fn upsert_target( &self, target_id: String, target: Box<dyn Target<AuditEntry> + Send + Sync>, ) -> AuditResult<()>
Sourcepub async fn list_targets(&self) -> Vec<String>
pub async fn list_targets(&self) -> Vec<String>
Sourcepub async fn get_target_values(&self) -> Vec<SharedTarget<AuditEntry>> ⓘ
pub async fn get_target_values(&self) -> Vec<SharedTarget<AuditEntry>> ⓘ
Returns cloned target values for read-only runtime inspection.
Sourcepub async fn snapshot_target_metrics(&self) -> Vec<AuditTargetMetricSnapshot>
pub async fn snapshot_target_metrics(&self) -> Vec<AuditTargetMetricSnapshot>
Returns per-target delivery metrics for Prometheus collection.
pub async fn snapshot_target_health(&self) -> Vec<RuntimeTargetHealthSnapshot>
pub async fn runtime_status_snapshot(&self) -> RuntimeStatusSnapshot
Sourcepub async fn get_target(&self, target_id: &str) -> Option<String>
pub async fn get_target(&self, target_id: &str) -> Option<String>
Sourcepub async fn reload_config(&self, new_config: Config) -> AuditResult<()>
pub async fn reload_config(&self, new_config: Config) -> AuditResult<()>
Sourcepub async fn get_metrics(&self) -> AuditMetricsReport
pub async fn get_metrics(&self) -> AuditMetricsReport
Sourcepub async fn validate_performance(&self) -> PerformanceValidation
pub async fn validate_performance(&self) -> PerformanceValidation
Validates system performance against requirements
§Returns
PerformanceValidation- Performance validation results
Sourcepub async fn reset_metrics(&self)
pub async fn reset_metrics(&self)
Resets all metrics to initial state
Trait Implementations§
Source§impl Clone for AuditSystem
impl Clone for AuditSystem
Source§fn clone(&self) -> AuditSystem
fn clone(&self) -> AuditSystem
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for AuditSystem
impl !UnwindSafe for AuditSystem
impl Freeze for AuditSystem
impl Send for AuditSystem
impl Sync for AuditSystem
impl Unpin for AuditSystem
impl UnsafeUnpin for AuditSystem
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request