cleaner

package
v0.0.0-...-ecf4119 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cleaner

type Cleaner interface {
	Start()
	Close()
}

func NewDbCleaner

func NewDbCleaner(cfg CleanerConfig) Cleaner

type CleanerConfig

type CleanerConfig struct {
	WorkerCount      int
	CleanerBatchSize uint64
	Repo             RepoEventCleaner
	CleanerChannel   <-chan PackageCleanerEvent
	CleanupInterval  time.Duration
	GaugeSubFunc     func(float64)
}

type PackageCleanerEvent

type PackageCleanerEvent struct {
	Status  SenderStatus
	EventID uint64
}

type RepoEventCleaner

type RepoEventCleaner interface {
	Unlock(eventIDs []uint64) error
	Remove(eventIDs []uint64) error
}

type SenderStatus

type SenderStatus uint8
const (
	Ok SenderStatus = iota
	Fail
)

Jump to

Keyboard shortcuts

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