logretention

package
v0.0.0-...-f54fb7c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// TestingOnlySynchronizationHelper is used for testing purposes to wait for the log retention scheduler to finish.
	TestingOnlySynchronizationHelper *sync.WaitGroup
)

Functions

func DeleteExpiredTaskLogs

func DeleteExpiredTaskLogs(ctx context.Context, days *int16) (int64, error)

DeleteExpiredTaskLogs deletes task logs older than days time when defined and non-negative. Task configured values may override the default provided number of days for retention.

func Schedule

func Schedule(config model.LogRetentionPolicy) error

Schedule begins a log deletion schedule according to the provided LogRetentionPolicy.

func SetupScheduler

func SetupScheduler(opts ...gocron.SchedulerOption)

SetupScheduler creates a new scheduler with the provided options. Should only be called by init() or test functions, and will panic on error.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL