filecleanup

package
v0.0.55 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileCleanup

func FileCleanup(pattern string, options ...FileCleanerOption) error

Types

type EmptyFileCleanerOption

type EmptyFileCleanerOption struct{}

EmptyFileCleanerOption does not alter the configuration. It can be embedded in another structure to build custom options.

This API is EXPERIMENTAL.

type FileCleaner

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

func (*FileCleaner) ApplyOptions

func (o *FileCleaner) ApplyOptions(options ...FileCleanerOption) *FileCleaner

type FileCleanerOption

type FileCleanerOption interface {
	// contains filtered or unexported methods
}

A FileCleanerOption sets options.

func WithMaxAge

func WithMaxAge(maxAge time.Duration) FileCleanerOption

func WithMaxCount

func WithMaxCount(maxCount int64) FileCleanerOption

type FileCleanerOptionFunc

type FileCleanerOptionFunc func(*FileCleaner)

FileCleanerOptionFunc wraps a function that modifies Client into an implementation of the FileCleanerOption interface.

type RotatedFiles added in v0.0.40

type RotatedFiles []string

func (RotatedFiles) Len added in v0.0.40

func (f RotatedFiles) Len() int

func (RotatedFiles) Less added in v0.0.40

func (f RotatedFiles) Less(i, j int) bool

func (RotatedFiles) Swap added in v0.0.40

func (f RotatedFiles) Swap(i, j int)

Jump to

Keyboard shortcuts

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