pub enum DbCommand {
RecordScan {
workspace_path: String,
workspace_name: String,
last_scan_ts: String,
scan_duration_ms: i64,
asset_count: i64,
fs_mtime_at_scan: i64,
},
RecordGateResult {
gate_name: String,
status: String,
exit_code: Option<i32>,
duration_ms: i64,
timestamp: String,
catalog_hash: String,
output_excerpt: Option<String>,
},
RecordDrift {
workspace_path: String,
asset_id: String,
drift_type: String,
first_detected: String,
expected_hash: String,
actual_hash: String,
},
RecordCoverageScore {
workspace_path: String,
workspace_name: String,
coverage_score: f64,
computed_at: String,
},
AppendAudit(AuditEntry),
UpdateContentHash {
path: String,
hash: String,
},
Flush(Sender<()>),
Shutdown,
}Expand description
Commands dispatched to the single-writer SQLite task.
Variants§
RecordScan
Upsert a workspace-level scan summary row.
Fields
RecordGateResult
Record the result of a gate execution.
Fields
RecordDrift
Append a drift-detection record to drift_history (Req 10.x).
Fields
RecordCoverageScore
Upsert a per-workspace coverage score into coverage_cache (Req 3.6).
AppendAudit(AuditEntry)
Append a pre-computed audit entry (hash chain already linked).
UpdateContentHash
Upsert a content-hash cache entry.
Flush(Sender<()>)
Flush all pending work; reply on ack when done.
Shutdown
Graceful shutdown: drain the queue then exit the task.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DbCommand
impl !UnwindSafe for DbCommand
impl Freeze for DbCommand
impl Send for DbCommand
impl Sync for DbCommand
impl Unpin for DbCommand
impl UnsafeUnpin for DbCommand
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
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 more