Documentation
¶
Index ¶
- Constants
- Variables
- func HostPurge(ctx context.Context, backend container_backend.ContainerBackend, ...) error
- func PopAutoCleanupNotice(_ context.Context, werfServiceDir string) (string, bool, error)
- func RunAutoHostCleanup(ctx context.Context, backend container_backend.ContainerBackend, ...) error
- func RunHostCleanup(ctx context.Context, backend container_backend.ContainerBackend, ...) error
- type AutoHostCleanupOptions
- type CommonOptions
- type HostCleanupOptions
- type HostPurgeOptions
- type LocalBackendCleaner
- type RunAutoGCOptions
- type RunGCOptions
- type RunGCReport
Constants ¶
View Source
const ( DefaultAllowedBackendStorageVolumeUsagePercentage uint64 = 70 DefaultAllowedBackendStorageVolumeUsageMarginPercentage uint64 = 5 DefaultAllowedLocalCacheVolumeUsagePercentage uint64 = 70 DefaultAllowedLocalCacheVolumeUsageMarginPercentage uint64 = 5 )
Variables ¶
View Source
var ErrUnsupportedContainerBackend = errors.New("unsupported container backend")
Functions ¶
func HostPurge ¶
func HostPurge(ctx context.Context, backend container_backend.ContainerBackend, options HostPurgeOptions) error
func PopAutoCleanupNotice ¶
PopAutoCleanupNotice returns a message about the last auto host cleanup run and whether it requires the user's attention, then forgets the run, so the user is notified about it only once. An empty message means there is nothing to notify about.
func RunAutoHostCleanup ¶
func RunAutoHostCleanup(ctx context.Context, backend container_backend.ContainerBackend, options AutoHostCleanupOptions) error
func RunHostCleanup ¶
func RunHostCleanup(ctx context.Context, backend container_backend.ContainerBackend, options HostCleanupOptions) error
Types ¶
type AutoHostCleanupOptions ¶
type AutoHostCleanupOptions struct {
HostCleanupOptions
TmpDir *string
HomeDir *string
ProjectName *string
}
type CommonOptions ¶
type HostCleanupOptions ¶
type HostPurgeOptions ¶
type LocalBackendCleaner ¶
type LocalBackendCleaner struct {
// contains filtered or unexported fields
}
func NewLocalBackendCleaner ¶
func NewLocalBackendCleaner(backend container_backend.ContainerBackend, locker lockgate.Locker) (*LocalBackendCleaner, error)
func (*LocalBackendCleaner) BackendName ¶
func (cleaner *LocalBackendCleaner) BackendName() string
func (*LocalBackendCleaner) RunGC ¶
func (cleaner *LocalBackendCleaner) RunGC(ctx context.Context, options RunGCOptions) (RunGCReport, error)
func (*LocalBackendCleaner) ShouldRunAutoGC ¶
func (cleaner *LocalBackendCleaner) ShouldRunAutoGC(ctx context.Context, options RunAutoGCOptions) (bool, error)
type RunAutoGCOptions ¶
type RunGCOptions ¶
type RunGCReport ¶
type RunGCReport struct {
// ImagesDeleted counts the werf images removed by their IDs. Images removed by backend pruning
// are not counted: backends report deleted layers and untagged references there, not images.
ImagesDeleted int
SpaceReclaimed uint64
UsedBytes uint64
TotalBytes uint64
AllowedBytes uint64
StoragePath string
}
RunGCReport describes what the backend storage GC did and the storage state it left behind.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.