logretention

package
v0.38.0-rc4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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.

Types

type Scheduler

type Scheduler struct {

	// TestingOnlySynchronizationHelper is used for testing purposes to wait for the log retention scheduler to finish.
	TestingOnlySynchronizationHelper *sync.WaitGroup
	// contains filtered or unexported fields
}

Scheduler is a thin wrapper around gocron.Scheduler adds some functionality for testing.

func NewScheduler

func NewScheduler(opts ...gocron.SchedulerOption) (*Scheduler, error)

NewScheduler creates a new scheduler with the provided options.

func (*Scheduler) Schedule

func (s *Scheduler) Schedule(config model.LogRetentionPolicy) error

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

func (*Scheduler) Shutdown

func (s *Scheduler) Shutdown() error

Shutdown stops the internal gocron.Scheduler.

Jump to

Keyboard shortcuts

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