cleaning

package
v1.1.27 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: Apache-2.0 Imports: 28 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleanup

func Cleanup(ctx context.Context, projectName string, storageManager *manager.StorageManager, storageLockManager storage.LockManager, options CleanupOptions) error

func ImagesCleanup

func ImagesCleanup(ctx context.Context, projectName string, storageManager *manager.StorageManager, storageLockManager storage.LockManager, options ImagesCleanupOptions) error

func ImagesPurge

func ImagesPurge(ctx context.Context, projectName string, storageManager *manager.StorageManager, storageLockManager storage.LockManager, options ImagesPurgeOptions) error

func Purge

func Purge(ctx context.Context, projectName string, storageManager *manager.StorageManager, storageLockManager storage.LockManager, options PurgeOptions) error

func StagesCleanup

func StagesCleanup(ctx context.Context, projectName string, storageManager *manager.StorageManager, storageLockManager storage.LockManager, options StagesCleanupOptions) error

func StagesPurge

func StagesPurge(ctx context.Context, projectName string, storageLockManager storage.LockManager, storageManager *manager.StorageManager, options StagesPurgeOptions) error

Types

type CleanupOptions

type CleanupOptions struct {
	ImagesCleanupOptions
	StagesCleanupOptions
}

type GitRepo

type GitRepo interface {
	PlainOpen() (*git.Repository, error)
	IsCommitExists(ctx context.Context, commit string) (bool, error)
	TagsList(ctx context.Context) ([]string, error)
	RemoteBranchesList(ctx context.Context) ([]string, error)
}

type ImagesCleanupOptions

type ImagesCleanupOptions struct {
	ImageNameList                           []string
	LocalGit                                GitRepo
	KubernetesContextClients                []*kube.ContextClient
	KubernetesNamespaceRestrictionByContext map[string]string
	WithoutKube                             bool
	Policies                                ImagesCleanupPolicies
	GitHistoryBasedCleanup                  bool
	GitHistoryBasedCleanupV12               bool
	GitHistoryBasedCleanupOptions           config.MetaCleanup
	DryRun                                  bool
}

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

	StagesSignatureStrategyHasLimit bool // No limit by default!
	StagesSignatureStrategyLimit    int64

	StagesSignatureStrategyHasExpiryPeriod bool // No expiration by default!
	StagesSignatureStrategyExpiryPeriod    time.Duration
}

type ImagesPurgeOptions

type ImagesPurgeOptions struct {
	ImageNameList []string
	DryRun        bool
}

type PurgeOptions

type PurgeOptions struct {
	ImagesPurgeOptions
	StagesPurgeOptions
}

type StagesCleanupOptions

type StagesCleanupOptions struct {
	ImageNameList []string
	DryRun        bool
}

type StagesPurgeOptions

type StagesPurgeOptions struct {
	RmContainersThatUseWerfImages bool
	DryRun                        bool
}

Jump to

Keyboard shortcuts

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