gcscleaner

package
v0.0.0-...-a4b4531 Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelableContext

type CancelableContext struct {
	context.Context
	Cancel func()
}

CancelableContext contains both context and it's Cancel function

func NewCancelableContext

func NewCancelableContext(ctx context.Context) CancelableContext

NewCancelableContext creates new CancelableContext

type Cleaner

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

Cleaner cleans GCP buckets

func NewCleaner

func NewCleaner(client storage.Client, cfg Config) Cleaner

NewCleaner creates cleaner

func (Cleaner) DeleteOldBuckets

func (r Cleaner) DeleteOldBuckets(rootCtx context.Context) error

DeleteOldBuckets deletes old buckets within GCP project

type Config

type Config struct {
	ProjectName               string
	BucketLifespanDuration    time.Duration
	ExcludedBucketNames       []string
	IsDryRun                  bool
	BucketNameRegexp          *regexp.Regexp
	BucketObjectWorkersNumber int
	LogLevel                  logrus.Level
}

Config cleaner configuration

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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