cleaner

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Module(
	"cleaner",
	fx.Decorate(func(log *zap.Logger) *zap.Logger {
		return log.Named("cleaner")
	}),
	fx.Provide(
		NewFx,
	),
)

Functions

func AsCleanable

func AsCleanable(src any) any

Types

type Cleanable

type Cleanable interface {
	Clean(ctx context.Context) error
}

type Params

type Params struct {
	fx.In

	Cleanables []Cleanable `group:"cleaners"`

	Logger *zap.Logger
}

type Service

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

func New

func New(targets []Cleanable, logger *zap.Logger) *Service

func NewFx

func NewFx(p Params) *Service

func (*Service) Run

func (s *Service) Run(ctx context.Context)

Jump to

Keyboard shortcuts

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