MCPcopy Index your code
hub / github.com/coder/coder / DeleteOldAuditLogs

Method DeleteOldAuditLogs

coderd/database/querier.go:165–165  ·  view source on GitHub ↗

Deletes old audit logs based on retention policy, excluding deprecated connection events (connect, disconnect, open, close) which are handled separately by DeleteOldAuditLogConnectionEvents.

(ctx context.Context, arg DeleteOldAuditLogsParams)

Source from the content-addressed store, hash-verified

163 // connection events (connect, disconnect, open, close) which are handled
164 // separately by DeleteOldAuditLogConnectionEvents.
165 DeleteOldAuditLogs(ctx context.Context, arg DeleteOldAuditLogsParams) (int64, error)
166 // Deletes boundary logs older than the given time, bounded by a row limit
167 // to avoid long-running transactions.
168 DeleteOldBoundaryLogs(ctx context.Context, arg DeleteOldBoundaryLogsParams) (int64, error)

Callers 4

DeleteOldAuditLogsMethod · 0.65
purgeTickMethod · 0.65
DeleteOldAuditLogsMethod · 0.65
TestAuditLogsMethod · 0.65

Implementers 5

sqlQueriercoderd/database/db.go
queryMetricsStorecoderd/database/dbmetrics/querymetrics
queriercoderd/database/dbauthz/dbauthz.go
MockStorecoderd/database/dbmock/dbmock.go
MockStoreMockRecordercoderd/database/dbmock/dbmock.go

Calls

no outgoing calls

Tested by 1

TestAuditLogsMethod · 0.52