Documentation ¶
Index ¶
- Variables
- type EC2Discovery
- type EC2Filter
- type EC2SDConfig
- func (*EC2SDConfig) Name() string
- func (c *EC2SDConfig) NewDiscoverer(opts discovery.DiscovererOptions) (discovery.Discoverer, error)
- func (*EC2SDConfig) NewDiscovererMetrics(reg prometheus.Registerer, rmi discovery.RefreshMetricsInstantiator) discovery.DiscovererMetrics
- func (c *EC2SDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
- type LightsailDiscovery
- type LightsailSDConfig
- func (*LightsailSDConfig) Name() string
- func (c *LightsailSDConfig) NewDiscoverer(opts discovery.DiscovererOptions) (discovery.Discoverer, error)
- func (*LightsailSDConfig) NewDiscovererMetrics(reg prometheus.Registerer, rmi discovery.RefreshMetricsInstantiator) discovery.DiscovererMetrics
- func (c *LightsailSDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
Constants ¶
This section is empty.
Variables ¶
var DefaultEC2SDConfig = EC2SDConfig{ Port: 80, RefreshInterval: model.Duration(60 * time.Second), HTTPClientConfig: config.DefaultHTTPClientConfig, }
DefaultEC2SDConfig is the default EC2 SD configuration.
var DefaultLightsailSDConfig = LightsailSDConfig{ Port: 80, RefreshInterval: model.Duration(60 * time.Second), HTTPClientConfig: config.DefaultHTTPClientConfig, }
DefaultLightsailSDConfig is the default Lightsail SD configuration.
Functions ¶
This section is empty.
Types ¶
type EC2Discovery ¶
EC2Discovery periodically performs EC2-SD requests. It implements the Discoverer interface.
func NewEC2Discovery ¶
func NewEC2Discovery(conf *EC2SDConfig, logger log.Logger, metrics discovery.DiscovererMetrics) (*EC2Discovery, error)
NewEC2Discovery returns a new EC2Discovery which periodically refreshes its targets.
type EC2SDConfig ¶
type EC2SDConfig struct { Endpoint string `yaml:"endpoint"` Region string `yaml:"region"` AccessKey string `yaml:"access_key,omitempty"` SecretKey config.Secret `yaml:"secret_key,omitempty"` Profile string `yaml:"profile,omitempty"` RoleARN string `yaml:"role_arn,omitempty"` RefreshInterval model.Duration `yaml:"refresh_interval,omitempty"` Port int `yaml:"port"` Filters []*EC2Filter `yaml:"filters"` HTTPClientConfig config.HTTPClientConfig `yaml:",inline"` }
EC2SDConfig is the configuration for EC2 based service discovery.
func (*EC2SDConfig) Name ¶
func (*EC2SDConfig) Name() string
Name returns the name of the EC2 Config.
func (*EC2SDConfig) NewDiscoverer ¶
func (c *EC2SDConfig) NewDiscoverer(opts discovery.DiscovererOptions) (discovery.Discoverer, error)
NewDiscoverer returns a Discoverer for the EC2 Config.
func (*EC2SDConfig) NewDiscovererMetrics ¶ added in v0.50.0
func (*EC2SDConfig) NewDiscovererMetrics(reg prometheus.Registerer, rmi discovery.RefreshMetricsInstantiator) discovery.DiscovererMetrics
NewDiscovererMetrics implements discovery.Config.
func (*EC2SDConfig) UnmarshalYAML ¶
func (c *EC2SDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the yaml.Unmarshaler interface for the EC2 Config.
type LightsailDiscovery ¶
LightsailDiscovery periodically performs Lightsail-SD requests. It implements the Discoverer interface.
func NewLightsailDiscovery ¶
func NewLightsailDiscovery(conf *LightsailSDConfig, logger log.Logger, metrics discovery.DiscovererMetrics) (*LightsailDiscovery, error)
NewLightsailDiscovery returns a new LightsailDiscovery which periodically refreshes its targets.
type LightsailSDConfig ¶
type LightsailSDConfig struct { Endpoint string `yaml:"endpoint"` Region string `yaml:"region"` AccessKey string `yaml:"access_key,omitempty"` SecretKey config.Secret `yaml:"secret_key,omitempty"` Profile string `yaml:"profile,omitempty"` RoleARN string `yaml:"role_arn,omitempty"` RefreshInterval model.Duration `yaml:"refresh_interval,omitempty"` Port int `yaml:"port"` HTTPClientConfig config.HTTPClientConfig `yaml:",inline"` }
LightsailSDConfig is the configuration for Lightsail based service discovery.
func (*LightsailSDConfig) Name ¶
func (*LightsailSDConfig) Name() string
Name returns the name of the Lightsail Config.
func (*LightsailSDConfig) NewDiscoverer ¶
func (c *LightsailSDConfig) NewDiscoverer(opts discovery.DiscovererOptions) (discovery.Discoverer, error)
NewDiscoverer returns a Discoverer for the Lightsail Config.
func (*LightsailSDConfig) NewDiscovererMetrics ¶ added in v0.50.0
func (*LightsailSDConfig) NewDiscovererMetrics(reg prometheus.Registerer, rmi discovery.RefreshMetricsInstantiator) discovery.DiscovererMetrics
NewDiscovererMetrics implements discovery.Config.
func (*LightsailSDConfig) UnmarshalYAML ¶
func (c *LightsailSDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the yaml.Unmarshaler interface for the Lightsail Config.