Documentation
¶
Index ¶
- Constants
- type APIKeysArgs
- type AlertArgs
- type AlertLogArgs
- type AlertLogLFWArgs
- type DB
- func (db *DB) CleanupAPIKeys(ctx context.Context, j *river.Job[APIKeysArgs]) error
- func (db *DB) CleanupAlertLogs(ctx context.Context, j *river.Job[AlertLogArgs]) error
- func (db *DB) CleanupAlerts(ctx context.Context, j *river.Job[AlertArgs]) error
- func (db *DB) CleanupScheduleData(ctx context.Context, j *river.Job[SchedDataArgs]) error
- func (db *DB) CleanupShifts(ctx context.Context, j *river.Job[ShiftArgs]) error
- func (db *DB) LookForWorkAlertLogs(ctx context.Context, j *river.Job[AlertLogLFWArgs]) error
- func (db *DB) LookForWorkScheduleData(ctx context.Context, j *river.Job[SchedDataLFW]) error
- func (db *DB) Name() string
- func (db *DB) Setup(ctx context.Context, args processinglock.SetupArgs) error
- type SchedDataArgs
- type SchedDataLFW
- type ShiftArgs
Constants ¶
const ( PriorityAlertCleanup = 1 PrioritySchedHistory = 1 PriorityAPICleanup = 1 PriorityTempSchedLFW = 2 PriorityAlertLogsLFW = 2 PriorityTempSched = 3 PriorityAlertLogs = 4 )
const QueueName = "cleanup-manager"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKeysArgs ¶ added in v0.34.0
type APIKeysArgs struct{}
func (APIKeysArgs) Kind ¶ added in v0.34.0
func (APIKeysArgs) Kind() string
type AlertLogArgs ¶ added in v0.34.0
func (AlertLogArgs) Kind ¶ added in v0.34.0
func (AlertLogArgs) Kind() string
type AlertLogLFWArgs ¶ added in v0.34.0
type AlertLogLFWArgs struct{}
func (AlertLogLFWArgs) Kind ¶ added in v0.34.0
func (AlertLogLFWArgs) Kind() string
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB handles updating escalation policies.
func (*DB) CleanupAPIKeys ¶ added in v0.34.0
CleanupAPIKeys will revoke access to the API from unused tokens, including both user sessions and calendar subscriptions.
func (*DB) CleanupAlertLogs ¶ added in v0.34.0
CleanupAlertLogs will remove alert log entries for deleted alerts.
func (*DB) CleanupAlerts ¶ added in v0.34.0
CleanupAlerts will automatically close and delete old alerts.
func (*DB) CleanupScheduleData ¶ added in v0.34.0
CleanupScheduleData will automatically cleanup schedule data. - Remove temporary-schedule shifts for users that no longer exist. - Remove temporary-schedule shifts that occur in the past.
func (*DB) CleanupShifts ¶ added in v0.34.0
CleanupShifts will automatically cleanup old shift and override records.
func (*DB) LookForWorkAlertLogs ¶ added in v0.34.0
LookForWorkAlertLogs will schedule alert log cleanup jobs for blocks of alert log IDs.
The strategy here is to look for the minimum and maximum alert log IDs in the database, then schedule jobs for each `blockSize` block of IDs, and those jobs will then cleanup the alert logs in that range `batchSize` at a time.
func (*DB) LookForWorkScheduleData ¶ added in v0.34.0
LookForWorkScheduleData will automatically look for schedules that need their JSON data cleaned up and insert them into the queue.
type SchedDataArgs ¶ added in v0.34.0
func (SchedDataArgs) Kind ¶ added in v0.34.0
func (SchedDataArgs) Kind() string
type SchedDataLFW ¶ added in v0.34.0
type SchedDataLFW struct{}
func (SchedDataLFW) Kind ¶ added in v0.34.0
func (SchedDataLFW) Kind() string