reaper

package
v0.0.0-...-9b4d37b Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 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 Config

type Config struct {
	// KeepMax is the maximum age of resources, older resources are deleted.
	KeepMax time.Duration
	// Backend is the kubedock backend object.
	Backend backend.Backend
}

Config is the configuration to be used for the Reaper proces.

type Reaper

type Reaper struct {
	// contains filtered or unexported fields
}

Reaper is the object handles reaping of resources.

func New

func New(cfg Config) (*Reaper, error)

New will create return the singleton Reaper instance.

func (*Reaper) CleanContainers

func (in *Reaper) CleanContainers() error

CleanContainers will clean all lingering containers that are older than the configured keepMax duration, and stored locally in the in memory database.

func (*Reaper) CleanContainersKubernetes

func (in *Reaper) CleanContainersKubernetes() error

CleanContainersKubernetes will clean all lingering containers that are older than the configured keepMax duration, and stored not stored in the local in memory database.

func (*Reaper) CleanExecs

func (in *Reaper) CleanExecs() error

CleanExecs will clean all lingering execs that are older than 5 minutes.

func (*Reaper) Start

func (in *Reaper) Start()

Start will start the reaper background process.

func (*Reaper) Stop

func (in *Reaper) Stop()

Stop will stop the reaper process.

Jump to

Keyboard shortcuts

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