Documentation ¶
Index ¶
- Variables
- type Discovery
- type DockerDiscovery
- type DockerSDConfig
- func (*DockerSDConfig) Name() string
- func (c *DockerSDConfig) NewDiscoverer(opts discovery.DiscovererOptions) (discovery.Discoverer, error)
- func (*DockerSDConfig) NewDiscovererMetrics(_ prometheus.Registerer, rmi discovery.RefreshMetricsInstantiator) discovery.DiscovererMetrics
- func (c *DockerSDConfig) SetDirectory(dir string)
- func (c *DockerSDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
- type DockerSwarmSDConfig
- func (*DockerSwarmSDConfig) Name() string
- func (c *DockerSwarmSDConfig) NewDiscoverer(opts discovery.DiscovererOptions) (discovery.Discoverer, error)
- func (*DockerSwarmSDConfig) NewDiscovererMetrics(reg prometheus.Registerer, rmi discovery.RefreshMetricsInstantiator) discovery.DiscovererMetrics
- func (c *DockerSwarmSDConfig) SetDirectory(dir string)
- func (c *DockerSwarmSDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
- type Filter
Constants ¶
This section is empty.
Variables ¶
var DefaultDockerSDConfig = DockerSDConfig{ RefreshInterval: model.Duration(60 * time.Second), Port: 80, Filters: []Filter{}, HostNetworkingHost: "localhost", HTTPClientConfig: config.DefaultHTTPClientConfig, }
DefaultDockerSDConfig is the default Docker SD configuration.
var DefaultDockerSwarmSDConfig = DockerSwarmSDConfig{ RefreshInterval: model.Duration(60 * time.Second), Port: 80, Filters: []Filter{}, HTTPClientConfig: config.DefaultHTTPClientConfig, }
DefaultDockerSwarmSDConfig is the default Docker Swarm SD configuration.
Functions ¶
This section is empty.
Types ¶
type Discovery ¶
Discovery periodically performs Docker Swarm requests. It implements the Discoverer interface.
func NewDiscovery ¶
func NewDiscovery(conf *DockerSwarmSDConfig, logger log.Logger, metrics discovery.DiscovererMetrics) (*Discovery, error)
NewDiscovery returns a new Discovery which periodically refreshes its targets.
type DockerDiscovery ¶
func NewDockerDiscovery ¶
func NewDockerDiscovery(conf *DockerSDConfig, logger log.Logger, metrics discovery.DiscovererMetrics) (*DockerDiscovery, error)
NewDockerDiscovery returns a new DockerDiscovery which periodically refreshes its targets.
type DockerSDConfig ¶
type DockerSDConfig struct { HTTPClientConfig config.HTTPClientConfig `yaml:",inline"` Host string `yaml:"host"` Port int `yaml:"port"` Filters []Filter `yaml:"filters"` HostNetworkingHost string `yaml:"host_networking_host"` RefreshInterval model.Duration `yaml:"refresh_interval"` }
DockerSDConfig is the configuration for Docker (non-swarm) based service discovery.
func (*DockerSDConfig) Name ¶
func (*DockerSDConfig) Name() string
Name returns the name of the Config.
func (*DockerSDConfig) NewDiscoverer ¶
func (c *DockerSDConfig) NewDiscoverer(opts discovery.DiscovererOptions) (discovery.Discoverer, error)
NewDiscoverer returns a Discoverer for the Config.
func (*DockerSDConfig) NewDiscovererMetrics ¶ added in v0.50.0
func (*DockerSDConfig) NewDiscovererMetrics(_ prometheus.Registerer, rmi discovery.RefreshMetricsInstantiator) discovery.DiscovererMetrics
NewDiscovererMetrics implements discovery.Config.
func (*DockerSDConfig) SetDirectory ¶
func (c *DockerSDConfig) SetDirectory(dir string)
SetDirectory joins any relative file paths with dir.
func (*DockerSDConfig) UnmarshalYAML ¶
func (c *DockerSDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
type DockerSwarmSDConfig ¶
type DockerSwarmSDConfig struct { HTTPClientConfig config.HTTPClientConfig `yaml:",inline"` Host string `yaml:"host"` Role string `yaml:"role"` Port int `yaml:"port"` Filters []Filter `yaml:"filters"` RefreshInterval model.Duration `yaml:"refresh_interval"` }
DockerSwarmSDConfig is the configuration for Docker Swarm based service discovery.
func (*DockerSwarmSDConfig) Name ¶
func (*DockerSwarmSDConfig) Name() string
Name returns the name of the Config.
func (*DockerSwarmSDConfig) NewDiscoverer ¶
func (c *DockerSwarmSDConfig) NewDiscoverer(opts discovery.DiscovererOptions) (discovery.Discoverer, error)
NewDiscoverer returns a Discoverer for the Config.
func (*DockerSwarmSDConfig) NewDiscovererMetrics ¶ added in v0.50.0
func (*DockerSwarmSDConfig) NewDiscovererMetrics(reg prometheus.Registerer, rmi discovery.RefreshMetricsInstantiator) discovery.DiscovererMetrics
NewDiscovererMetrics implements discovery.Config.
func (*DockerSwarmSDConfig) SetDirectory ¶
func (c *DockerSwarmSDConfig) SetDirectory(dir string)
SetDirectory joins any relative file paths with dir.
func (*DockerSwarmSDConfig) UnmarshalYAML ¶
func (c *DockerSwarmSDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the yaml.Unmarshaler interface.