Skip to content

Commit 53ae1ab

Browse files
committed
feat: add SetAuditContext and ClearAuditContext functions for process-level audit metadata management
1 parent 0b137c0 commit 53ae1ab

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

core/cli_wrappers.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,16 @@ func DefaultKeyGenerator() KeyGenerator { return sshKeyGen{} }
9696
// SetDefaultKeyManager so callers don't need to import `core/db`.
9797
func SetDefaultKeyManager(m KeyManager) { db.SetDefaultKeyManager(m) }
9898

99+
// SetAuditContext sets process-level audit metadata for subsequent writes.
100+
func SetAuditContext(clientImplementation, referrer string) {
101+
db.SetAuditContext(clientImplementation, referrer)
102+
}
103+
104+
// ClearAuditContext clears process-level audit metadata for subsequent writes.
105+
func ClearAuditContext() {
106+
db.ClearAuditContext()
107+
}
108+
99109
// (SetDefaultAccountManager is implemented in defaults_db.go and also
100110
// delegates to the DB package; no duplicate implementation here.)
101111

0 commit comments

Comments
 (0)