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
Source Files
¶
- blob_item.go
- cleaner.go
- config.go
Click to show internal directories.
Click to hide internal directories.