pack

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cleanup

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

Cleanup implements garbage collection for packages

func New

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

New creates a new package vacuum cleaner

func (*Cleanup) Prune

func (r *Cleanup) Prune(context.Context) error

Prune removes unused packages from the configured package service. It uses the direct application dependencies to determine the set of packages that are still required, and sweeps the rest. It will not remove packages from repositories other than the defaults.SystemAccountOrg unless it can tell if a package is safe to remove.

type Config

type Config struct {
	// Config specifies the common pruner configuration
	prune.Config
	// App specifies the cluster application
	App *storage.Application
	// Apps lists other cluster applications.
	// There might be several applications meaningful for the cluster
	// if it's an Ops Center and has been connected with multiple remote
	// clusters.
	Apps []storage.Application
	// Packages specifies the package service to prune
	Packages packageService
}

Config describes configuration for the cleaner of unused packages

Jump to

Keyboard shortcuts

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