gc

package
v7.0.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package gc implements the garbage collection logic for Purity.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clean

func Clean(url, instanceName, tokenFile string, tls, dryRun bool) error

Clean cleans any build actions referencing missing blobs from the server.

func Delete

func Delete(url, instanceName, tokenFile string, tls bool, hashes []string) error

Delete deletes a series of build actions from the remote server.

func Run

func Run(url, instanceName, tokenFile string, tls bool, minAge time.Duration, dryRun bool) error

Run runs once against the remote servers and triggers a GC if needed.

func RunForever

func RunForever(url, instanceName, tokenFile string, tls bool, minAge, frequency time.Duration)

RunForever runs indefinitely, periodically hitting the remote server and possibly GC'ing it.

Types

type Action

type Action struct {
	pb.Digest
	InputSize, OutputSize int
}

An Action is a convenience type returned from Sizes.

func Sizes

func Sizes(url, instanceName, tokenFile string, tls bool, n int) ([]Action, error)

Sizes returns the sizes of the top N actions.

Jump to

Keyboard shortcuts

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