vacuum

package
v0.0.0-...-3bfe646 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	// Config is the collector's configuration
	Config
}

func New

func New(config Config) (*Collector, error)

New returns new garbage collector for the specified configuration

func (*Collector) Create

func (r *Collector) Create(ctx context.Context) error

Create creates the garbage collection operation but does not start it.

func (*Collector) Run

func (r *Collector) Run(ctx context.Context) error

Run runs the garbage collection.

func (*Collector) RunPhase

func (r *Collector) RunPhase(ctx context.Context, phase string, phaseTimeout time.Duration, force bool) error

RunPhase runs the specified garbage collection phase.

func (*Collector) SetPhase

func (r *Collector) SetPhase(ctx context.Context, phase, state string) error

SetPhase sets the specified phase state without executing it.

type Config

type Config struct {
	// ClusterKey identifies the cluster
	ClusterKey ops.SiteKey
	// App specifies the cluster application
	App *storage.Application
	// RemoteApps lists optional applications from remote clusters
	RemoteApps []storage.Application
	// Apps is the cluster application service
	Apps app.Applications
	// Packages is the cluster package service
	Packages libpack.PackageService
	// LocalPackages is the service for packages local to the node
	LocalPackages libpack.PackageService
	// Operator is the cluster operator service
	Operator ops.Operator
	// Operation references the garbage collection operation to work with
	Operation *ops.SiteOperation
	// Servers is the list of cluster servers
	Servers []storage.Server
	// Runner specifies the runner for remote commands
	Runner rpc.AgentRepository
	// RuntimePath is the path to the runtime container's rootfs
	RuntimePath string
	// FieldLogger is the logger to use
	log.FieldLogger
	// Silent controls whether the process outputs messages to stdout
	localenv.Silent
}

Config describes configuration of the cluster garbage collector

Directories

Path Synopsis
internal
fsm

Jump to

Keyboard shortcuts

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