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.
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.
Click to show internal directories.
Click to hide internal directories.