cleaner

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBlobsLimitNumberExceeded = errors.Errorf("Container contains more than %d blobs.", maxAllowedQueriesForSegment*maxResultInSingleQuery)

ErrBlobsLimitNumberExceeded means that in given container is more blobs than expected. It's used to ensure that application will not load too much blobs in RAM

Functions

This section is empty.

Types

type AzureCleaner

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

AzureCleaner removes old backup files from given ABS

func NewAzure

func NewAzure(cfg Config, blobCli azureBlobClient, log logrus.FieldLogger) *AzureCleaner

NewAzure returns new instance of AzureCleaner

func (*AzureCleaner) Clean

func (c *AzureCleaner) Clean(stopCh <-chan struct{}, blobPrefix string) error

Clean removes from ABS old backup files

type Config

type Config struct {
	// LeaveMinNewestBackupBlobs defines the number of blobs which should not be deleted even
	// if they are treated as expired.
	LeaveMinNewestBackupBlobs int64

	// ExpirationBlobTime defines delta which is used to check if blob should be deleted
	// if blob.LastModified < (timeNow - expirationBlobTime)  then blob will be removed
	ExpirationBlobTime time.Duration
}

Config holds AzureCleaner configuration

Directories

Path Synopsis
Code generated by mockery v1.0.0
Code generated by mockery v1.0.0

Jump to

Keyboard shortcuts

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