watcher

package
v0.14.2-alpha Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Options(
	fx.Provide(
		fx.Annotate(
			func(cfg *config.Configuration, logger zerolog.Logger) (Watcher, error) {
				if cfg.SecretsReloadEnabled {
					return newWatcher(logger)
				}

				return &noopWatcher{}, nil
			},

			fx.OnStart(func(ctx context.Context, w Watcher) error {
				w.(controller).start(ctx)

				return nil
			}),

			fx.OnStop(func(ctx context.Context, w Watcher) error { return w.(controller).stop(ctx) }),
		),
	),
)

Module is used on app bootstrap. nolint: gochecknoglobals

Functions

This section is empty.

Types

type ChangeListener

type ChangeListener interface {
	OnChanged(logger zerolog.Logger)
}

type Watcher

type Watcher interface {
	Add(path string, cl ChangeListener) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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