Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultDockerSDConfig = DockerSDConfig{ RefreshInterval: model.Duration(60 * time.Second), Port: 80, Filters: []Filter{}, 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) (*Discovery, error)
NewDiscovery returns a new Discovery which periodically refreshes its targets.
type DockerDiscovery ¶
func NewDockerDiscovery ¶
func NewDockerDiscovery(conf *DockerSDConfig, logger log.Logger) (*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"` 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) 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) 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.