gc

package
v2.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultAuditGCBatchSize is the default batch size for deleting jobs.
	DefaultAuditGCBatchSize = 5000

	// DefaultAuditGCInterval is the default interval for running audit GC.
	DefaultAuditGCInterval = time.Hour * 6

	// DefaultAuditGCTimeout is the default timeout for running audit GC.
	DefaultAuditGCTimeout = time.Hour * 2

	// AuditGCTaskID is the ID of the audit GC task.
	AuditGCTaskID = "audit"
)
View Source
const (
	// DefaultJobGCBatchSize is the default batch size for deleting jobs.
	DefaultJobGCBatchSize = 5000

	// DefaultJobGCInterval is the default interval for running job GC.
	DefaultJobGCInterval = time.Hour * 3

	// DefaultJobGCTimeout is the default timeout for running job GC.
	DefaultJobGCTimeout = time.Hour * 1

	// JohGCTaskID is the ID of the job GC task.
	JobGCTaskID = "job"
)
View Source
const (
	// GCJobType indicates the gc task is completed successfully.
	GCJobType = "gc"

	// GCStateSuccess indicates the gc task is completed successfully.
	GCStateSuccess = "SUCCESS"

	// GCStateFailure indicates the gc task is completed with failure.
	GCStateFailure = "FAILURE"
)
View Source
const (
	// DefaultSchedulerGCBatchSize is the default batch size for deleting schedulers.
	DefaultSchedulerGCBatchSize = 5000

	// DefaultSchedulerTTL is the default TTL for scheduler.
	DefaultSchedulerGCTTL = time.Minute * 30

	// DefaultSchedulerGCInterval is the default interval for running scheduler GC.
	DefaultSchedulerGCInterval = time.Hour * 1

	// DefaultSchedulerGCTimeout is the default timeout for running scheduler GC.
	DefaultSchedulerGCTimeout = time.Hour * 1

	// SchedulerGCTaskID is the ID of the scheduler GC task.
	SchedulerGCTaskID = "scheduler"
)
View Source
const (
	// DefaultSeedPeerGCBatchSize is the default batch size for deleting seed peers.
	DefaultSeedPeerGCBatchSize = 5000

	// DefaultSeedPeerTTL is the default TTL for seed peer.
	DefaultSeedPeerGCTTL = time.Minute * 30

	// DefaultSeedPeerGCInterval is the default interval for running seed peer GC.
	DefaultSeedPeerGCInterval = time.Hour * 1

	// DefaultSeedPeerGCTimeout is the default timeout for running seed peer GC.
	DefaultSeedPeerGCTimeout = time.Hour * 1

	// SeedPeerGCTaskID is the ID of the seed peer GC task.
	SeedPeerGCTaskID = "seed_peer"
)

Variables

This section is empty.

Functions

func NewAuditGCTask

func NewAuditGCTask(db *gorm.DB) pkggc.Task

NewAuditGCTask returns a new audit GC task.

func NewJobGCTask

func NewJobGCTask(db *gorm.DB) pkggc.Task

func NewSchedulerGCTask added in v2.3.1

func NewSchedulerGCTask(db *gorm.DB) pkggc.Task

NewSchedulerGCTask returns a new scheduler GC task.

func NewSeedPeerGCTask added in v2.3.1

func NewSeedPeerGCTask(db *gorm.DB) pkggc.Task

NewSeedPeerGCTask returns a new seed peer GC task.

Types

type Result

type Result struct {
	Error  error
	Purged int64
}

Jump to

Keyboard shortcuts

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