discovery

package
v0.0.0-...-95bd64c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2015 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ConsuleNodeLabel is the name for the label containing a target's node name.
	ConsulNodeLabel = clientmodel.MetaLabelPrefix + "consul_node"
	// ConsulTagsLabel is the name of the label containing the tags assigned to the target.
	ConsulTagsLabel = clientmodel.MetaLabelPrefix + "consul_tags"
	// ConsulServiceLabel is the name of the label containing the service name.
	ConsulServiceLabel = clientmodel.MetaLabelPrefix + "consul_service"
	// ConsulDCLabel is the name of the label containing the datacenter ID.
	ConsulDCLabel = clientmodel.MetaLabelPrefix + "consul_dc"
)
View Source
const (
	DNSNameLabel = clientmodel.MetaLabelPrefix + "dns_srv_name"
)
View Source
const FileSDFilepathLabel = clientmodel.MetaLabelPrefix + "filepath"

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsulDiscovery

type ConsulDiscovery struct {
	// contains filtered or unexported fields
}

ConsulDiscovery retrieves target information from a Consul server and updates them via watches.

func NewConsulDiscovery

func NewConsulDiscovery(conf *config.ConsulSDConfig) *ConsulDiscovery

NewConsulDiscovery returns a new ConsulDiscovery for the given config.

func (*ConsulDiscovery) Run

func (cd *ConsulDiscovery) Run(ch chan<- *config.TargetGroup)

Run implements the TargetProvider interface.

func (*ConsulDiscovery) Sources

func (cd *ConsulDiscovery) Sources() []string

Sources implements the TargetProvider interface.

func (*ConsulDiscovery) Stop

func (cd *ConsulDiscovery) Stop()

Stop implements the TargetProvider interface.

type DNSDiscovery

type DNSDiscovery struct {
	// contains filtered or unexported fields
}

DNSDiscovery periodically performs DNS-SD requests. It implements the TargetProvider interface.

func NewDNSDiscovery

func NewDNSDiscovery(conf *config.DNSSDConfig) *DNSDiscovery

NewDNSDiscovery returns a new DNSDiscovery which periodically refreshes its targets.

func (*DNSDiscovery) Run

func (dd *DNSDiscovery) Run(ch chan<- *config.TargetGroup)

Run implements the TargetProvider interface.

func (*DNSDiscovery) Sources

func (dd *DNSDiscovery) Sources() []string

Sources implements the TargetProvider interface.

func (*DNSDiscovery) Stop

func (dd *DNSDiscovery) Stop()

Stop implements the TargetProvider interface.

type FileDiscovery

type FileDiscovery struct {
	// contains filtered or unexported fields
}

FileDiscovery provides service discovery functionality based on files that contain target groups in JSON or YAML format. Refreshing happens using file watches and periodic refreshes.

func NewFileDiscovery

func NewFileDiscovery(conf *config.FileSDConfig) *FileDiscovery

NewFileDiscovery returns a new file discovery for the given paths.

func (*FileDiscovery) Run

func (fd *FileDiscovery) Run(ch chan<- *config.TargetGroup)

Run implements the TargetProvider interface.

func (*FileDiscovery) Sources

func (fd *FileDiscovery) Sources() []string

Sources implements the TargetProvider interface.

func (*FileDiscovery) Stop

func (fd *FileDiscovery) Stop()

Stop implements the TargetProvider interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL