gc

package
v4.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2018 License: Apache-2.0 Imports: 12 Imported by: 62

Documentation

Index

Constants

View Source
const HijackedContainerTimeout = 5 * time.Minute

Variables

This section is empty.

Functions

func NewBuildCollector

func NewBuildCollector(buildFactory buildFactory) *buildCollector

Types

type BuildLogRetentionCalculator

type BuildLogRetentionCalculator interface {
	BuildLogsToRetain(db.Job) int
}

func NewBuildLogRetentionCalculator

func NewBuildLogRetentionCalculator(
	defaultBuildLogsToRetain uint64,
	maxBuildLogsToRetain uint64,
) BuildLogRetentionCalculator

type Collector

type Collector interface {
	Run(context.Context) error
}

func NewBuildLogCollector

func NewBuildLogCollector(
	pipelineFactory db.PipelineFactory,
	batchSize int,
	buildLogRetentionCalculator BuildLogRetentionCalculator,
	drainerConfigured bool,
) Collector

func NewCollector

func NewCollector(
	buildCollector Collector,
	workers Collector,
	resourceCacheUses Collector,
	resourceConfigs Collector,
	resourceCaches Collector,
	volumes Collector,
	containers Collector,
	resourceConfigCheckSessionCollector Collector,
) Collector

func NewContainerCollector

func NewContainerCollector(
	containerRepository db.ContainerRepository,
	jobRunner WorkerJobRunner,
) Collector

func NewResourceCacheCollector

func NewResourceCacheCollector(cacheLifecycle db.ResourceCacheLifecycle) Collector

func NewResourceCacheUseCollector

func NewResourceCacheUseCollector(cacheLifecycle db.ResourceCacheLifecycle) Collector

func NewResourceConfigCheckSessionCollector

func NewResourceConfigCheckSessionCollector(
	configCheckSessionLifecycle db.ResourceConfigCheckSessionLifecycle,
) Collector

func NewResourceConfigCollector

func NewResourceConfigCollector(configFactory db.ResourceConfigFactory) Collector

func NewVolumeCollector

func NewVolumeCollector(volumeRepository db.VolumeRepository) Collector

func NewWorkerCollector

func NewWorkerCollector(workerLifecycle db.WorkerLifecycle) Collector

type Destroyer

type Destroyer interface {
	FindDestroyingVolumesForGc(workerName string) ([]string, error)
	DestroyContainers(workerName string, handles []string) error
	DestroyVolumes(workerName string, handles []string) error
}

Destroyer allows the caller to remove containers and volumes

func NewDestroyer

func NewDestroyer(
	logger lager.Logger,
	containerRepository db.ContainerRepository,
	volumeRepository db.VolumeRepository,
) Destroyer

NewDestroyer provides a constructor for a Destroyer interface implementation

type Job

type Job interface {
	Name() string
	Run(worker.Worker)
}

type JobFunc

type JobFunc func(worker.Worker)

func (JobFunc) Name

func (f JobFunc) Name() string

func (JobFunc) Run

func (f JobFunc) Run(workerClient worker.Worker)

type WorkerJobRunner

type WorkerJobRunner interface {
	Try(lager.Logger, string, Job)
}

func NewWorkerJobRunner

func NewWorkerJobRunner(
	logger lager.Logger,
	workerProvider worker.WorkerProvider,
	workersSyncInterval time.Duration,
) WorkerJobRunner

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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