Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileCleanup ¶
func FileCleanup(pattern string, options ...FileCleanerOption) error
Types ¶
type CleanupFiles ¶
type CleanupFiles []string
func (CleanupFiles) Len ¶
func (f CleanupFiles) Len() int
func (CleanupFiles) Less ¶
func (f CleanupFiles) Less(i, j int) bool
func (CleanupFiles) Swap ¶
func (f CleanupFiles) Swap(i, j int)
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.
Click to show internal directories.
Click to hide internal directories.