Documentation ¶
Index ¶
- func MarshalYAMLWithInlineConfigs(in interface{}) (interface{}, error)
- func Name(n string) func(*Manager)
- func RegisterConfig(config discovery.Config)
- func RegisterMetrics()
- func UnmarshalYAMLWithInlineConfigs(out interface{}, unmarshal func(interface{}) error) error
- type Manager
- type StaticProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalYAMLWithInlineConfigs ¶
func MarshalYAMLWithInlineConfigs(in interface{}) (interface{}, error)
MarshalYAMLWithInlineConfigs helps implement yaml.Marshal for structs that have a Configs field that should be inlined.
func RegisterConfig ¶
RegisterConfig registers the given Config type for YAML marshaling and unmarshaling.
func RegisterMetrics ¶
func RegisterMetrics()
func UnmarshalYAMLWithInlineConfigs ¶
UnmarshalYAMLWithInlineConfigs helps implement yaml.Unmarshal for structs that have a Configs field that should be inlined.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager maintains a set of discovery providers and sends each update to a map channel. Targets are grouped by the target set name.
func NewManager ¶
NewManager is the Discovery Manager constructor.
func (*Manager) ApplyConfig ¶
ApplyConfig removes all running discovery providers and starts new ones using the provided config.
func (*Manager) StartCustomProvider ¶
func (m *Manager) StartCustomProvider(ctx context.Context, name string, worker discovery.Discoverer)
StartCustomProvider is used for sdtool. Only use this if you know what you're doing.
type StaticProvider ¶
type StaticProvider struct {
TargetGroups []*targetgroup.Group
}
StaticProvider holds a list of target groups that never change.
func (*StaticProvider) Run ¶
func (sd *StaticProvider) Run(ctx context.Context, ch chan<- []*targetgroup.Group)
Run implements the Worker interface.