upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/grasp-audit/src/audit.rs
diff options
context:
space:
mode:
Diffstat (limited to 'grasp-audit/src/audit.rs')
-rw-r--r--grasp-audit/src/audit.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/grasp-audit/src/audit.rs b/grasp-audit/src/audit.rs
index 5fb6904..a0ff53c 100644
--- a/grasp-audit/src/audit.rs
+++ b/grasp-audit/src/audit.rs
@@ -68,6 +68,20 @@ impl AuditConfig {
68 } 68 }
69 } 69 }
70 70
71 /// Create config for probe/smoke test mode
72 ///
73 /// Identical to `isolated()` but uses a `probe-` prefix for the run ID,
74 /// making probe events easy to distinguish from regular audit events.
75 pub fn probe() -> Self {
76 let run_id = format!("probe-{}", &uuid::Uuid::new_v4().to_string()[..8]);
77 Self {
78 run_id,
79 mode: AuditMode::Isolated,
80 cleanup_after: Timestamp::now() + 3600, // 1 hour from now
81 read_only: false,
82 }
83 }
84
71 /// Create config with custom run ID 85 /// Create config with custom run ID
72 pub fn with_run_id(run_id: String, mode: AuditMode) -> Self { 86 pub fn with_run_id(run_id: String, mode: AuditMode) -> Self {
73 Self { 87 Self {