pub enum OperatorEvent {
Show 16 variants
ReplicationBroken {
peer: String,
reason: String,
},
Divergence {
peer: String,
leader_lsn: u64,
follower_lsn: u64,
},
WalFsyncFailed {
path: String,
error: String,
},
DiskSpaceCritical {
path: String,
available_bytes: u64,
threshold_bytes: u64,
},
AuthBypass {
principal: String,
resource: String,
detail: String,
},
AdminCapabilityGranted {
granted_to: String,
capability: String,
granted_by: String,
},
SecretRotationFailed {
secret_ref: String,
error: String,
},
ConfigChanged {
key: String,
old_value: String,
new_value: String,
changed_by: String,
},
StartupFailed {
phase: String,
error: String,
},
ShutdownForced {
reason: String,
},
SchemaCorruption {
collection: String,
detail: String,
},
CheckpointFailed {
lsn: u64,
error: String,
},
DanglingAdminIntent {
id: Uuid,
op: IntentOp,
started_at_ms: u64,
last_phase: IntentPhase,
},
ConfigChangeRequiresRestart {
fields_changed: String,
},
SubscriptionSchemaChange {
collection: String,
subscription_names: String,
fields_added: String,
fields_removed: String,
lsn: u64,
},
OutboxDlqActivated {
queue: String,
dlq: String,
reason: String,
},
}Expand description
High-severity system conditions that require operator attention.
Every variant carries typed crate::runtime::audit_log::AuditValue
fields so adversarial bytes (CRLF, NUL, quote, non-UTF-8) are
escape-safe at the audit boundary (ADR 0010).
Variants§
ReplicationBroken
A replication stream to a follower/replica broke unexpectedly.
Divergence
Replication state diverged: the follower’s committed LSN or checksum disagrees with the leader.
WalFsyncFailed
The WAL fsync call failed. Data may be at risk on the current host.
DiskSpaceCritical
Available disk space fell below the configured critical threshold.
AuthBypass
An authentication bypass was detected (e.g. auth gate returned
allow for a request that should have been rejected).
AdminCapabilityGranted
An admin capability was granted to a principal at runtime.
SecretRotationFailed
Secret rotation failed; the current secret may be stale.
ConfigChanged
A runtime configuration change was applied to a live instance.
StartupFailed
The server process failed to start cleanly.
ShutdownForced
The server process was forced to shut down (e.g. OOM killer, SIGKILL, unrecoverable error).
SchemaCorruption
On-disk schema metadata is corrupt or inconsistent.
CheckpointFailed
A scheduled or triggered checkpoint failed to complete.
DanglingAdminIntent
An admin intent that was started but never reached a terminal phase
(completed or aborted). Emitted by super::admin_intent_log::AdminIntentLog::scan_and_report
at startup so operators can investigate interrupted operations.
Fields
last_phase: IntentPhaseConfigChangeRequiresRestart
A config-file change was detected but one or more changed fields require a full server restart to take effect. The change was NOT applied; the operator must restart to pick it up.
SubscriptionSchemaChange
An ALTER TABLE on a collection with active event subscriptions
added or removed columns. Downstream consumers may see a different
payload shape starting at lsn.
Fields
OutboxDlqActivated
An event could not be delivered to its target queue after all retry attempts, and was routed to the dead-letter queue instead.
Implementations§
Source§impl OperatorEvent
impl OperatorEvent
Sourcepub fn all_variant_names() -> &'static [&'static str]
pub fn all_variant_names() -> &'static [&'static str]
All variant names as CamelCase strings, in declaration order.
Sourcepub fn emit_global(self)
pub fn emit_global(self)
Emit the event.
Execution order (per issue #202):
- Persist to
audit— tamper-evident, durable. tracing::warn!breadcrumb — lands inred.log/ stderr.eprintln!fallback — fires only if the audit write fails, ensuring the event is never silently lost.
Emit the event using the process-wide sink installed by the runtime at startup. When no sink is installed (early boot, tests without an audit logger), the tracing breadcrumb and eprintln fallback still fire so the event is never silently lost.
pub fn emit(self, audit: &AuditLogger)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OperatorEvent
impl RefUnwindSafe for OperatorEvent
impl Send for OperatorEvent
impl Sync for OperatorEvent
impl Unpin for OperatorEvent
impl UnsafeUnpin for OperatorEvent
impl UnwindSafe for OperatorEvent
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
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>
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>
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>
T in a tonic::Request