Documentation
¶
Overview ¶
Package apmconfig provides an API for watching agent config changes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Change ¶
type Change struct {
// Err holds an error that occurred while querying agent config.
Err error
// Attrs holds the agent's configuration. May be empty.
Attrs map[string]string
}
Change holds an agent configuration change: an error or the new config attributes.
type WatchParams ¶
type WatchParams struct {
// Service holds the name and optionally environment name used
// for filtering the config to watch.
Service struct {
Name string
Environment string
}
}
WatchParams holds parameters for watching for config changes.
type Watcher ¶
type Watcher interface {
// WatchConfig subscribes to changes to configuration for the agent,
// which must match the given ConfigSelector.
//
// If the watcher experiences an unexpected error fetching config,
// it will surface this in a Change with the Err field set.
//
// If the provided context is cancelled, or the watcher experiences
// a fatal condition, the returned channel will be closed.
WatchConfig(context.Context, WatchParams) <-chan Change
}
Watcher provides an interface for watching config changes.
Click to show internal directories.
Click to hide internal directories.