volume

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTargetsFromFile

func NewTargetsFromFile(opts ...Option) (config.ReadonlyTargets, error)

NewTargetsFromFile initializes the targets config from a file.

Types

type Option

type Option func(*Targets)

Option is the option to load targets.

func WithNotifyChan

func WithNotifyChan(ch chan<- struct{}) Option

WithNotifyChan is the option to notify the given channel when the config cache was updated.

func WithPath

func WithPath(path string) Option

WithPath is the option to load targets from the given path.

type Targets

type Targets struct {
	config.CachedTargets
	// contains filtered or unexported fields
}

Targets implements config.ReadonlyTargets with data loaded from a file. It also watches the file for any changes and will automatically refresh the in memory cache.

Jump to

Keyboard shortcuts

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