cleaning

package
v1.1.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleanup

func Cleanup(options CleanupOptions) error

func GCRImageRemove

func GCRImageRemove(image docker_registry.RepoImage, options CommonRepoOptions) error

func HostCleanup

func HostCleanup(options HostCleanupOptions) error

func HostPurge

func HostPurge(options HostPurgeOptions) error

func ImagesCleanup

func ImagesCleanup(options ImagesCleanupOptions) error

func ImagesPurge

func ImagesPurge(options ImagesPurgeOptions) error

func Purge

func Purge(options PurgeOptions) error

func StagesCleanup

func StagesCleanup(options StagesCleanupOptions) error

func StagesPurge

func StagesPurge(options StagesPurgeOptions) error

Types

type CleanupOptions

type CleanupOptions struct {
	ImagesCleanupOptions ImagesCleanupOptions
	StagesCleanupOptions StagesCleanupOptions
}

type CommonOptions

type CommonOptions struct {
	DryRun                        bool
	RmForce                       bool
	RmiForce                      bool
	SkipUsedImages                bool
	RmContainersThatUseWerfImages bool
}

type CommonProjectOptions

type CommonProjectOptions struct {
	ProjectName   string
	CommonOptions CommonOptions
}

type CommonRepoOptions

type CommonRepoOptions struct {
	StagesStorage     string
	ImagesRepoManager ImagesRepoManager
	ImagesNames       []string
	DryRun            bool
}

type GitRepo

type GitRepo interface {
	IsCommitExists(commit string) (bool, error)
	TagsList() ([]string, error)
	RemoteBranchesList() ([]string, error)
}

type HostCleanupOptions

type HostCleanupOptions struct {
	DryRun bool
}

type HostPurgeOptions

type HostPurgeOptions struct {
	DryRun                        bool
	RmContainersThatUseWerfImages bool
}

type ImagesCleanupOptions

type ImagesCleanupOptions struct {
	CommonRepoOptions         CommonRepoOptions
	LocalGit                  GitRepo
	KubernetesContextsClients map[string]kubernetes.Interface
	WithoutKube               bool
	Policies                  ImagesCleanupPolicies
}

type ImagesCleanupPolicies

type ImagesCleanupPolicies struct {
	GitTagStrategyHasLimit bool // No limit by default!
	GitTagStrategyLimit    int64

	GitTagStrategyHasExpiryPeriod bool // No expiration by default!
	GitTagStrategyExpiryPeriod    time.Duration

	GitCommitStrategyHasLimit bool // No limit by default!
	GitCommitStrategyLimit    int64

	GitCommitStrategyHasExpiryPeriod bool // No expiration by default!
	GitCommitStrategyExpiryPeriod    time.Duration
}

type ImagesPurgeOptions

type ImagesPurgeOptions struct {
	ImagesRepoManager ImagesRepoManager
	ImagesNames       []string
	DryRun            bool
}

type ImagesRepoManager

type ImagesRepoManager interface {
	ImagesRepo() string
	ImageRepo(imageName string) string
	ImageRepoWithTag(imageName, tag string) string
	IsMonorepo() bool
}

type PurgeOptions

type PurgeOptions struct {
	ImagesPurgeOptions
	StagesPurgeOptions
}

type StagesCleanupOptions

type StagesCleanupOptions struct {
	ProjectName       string
	ImagesRepoManager ImagesRepoManager
	StagesStorage     string
	ImagesNames       []string
	DryRun            bool
}

type StagesPurgeOptions

type StagesPurgeOptions struct {
	ProjectName                   string
	DryRun                        bool
	RmContainersThatUseWerfImages bool
}

Jump to

Keyboard shortcuts

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