Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Enabled bool `toml:"enabled" override:"enabled"` ID string `toml:"id" override:"id"` Address string `toml:"address" override:"address"` Token string `toml:"token" override:"token,redact"` Datacenter string `toml:"datacenter" override:"datacenter"` TagSeparator string `toml:"tag-separator" override:"tag-separator"` Scheme string `toml:"scheme" override:"scheme"` Username string `toml:"username" override:"username"` Password string `toml:"password" override:"password,redact"` Services []string `toml:"services" override:"services"` // Path to CA file SSLCA string `toml:"ssl-ca" override:"ssl-ca"` // Path to host cert file SSLCert string `toml:"ssl-cert" override:"ssl-cert"` // Path to cert key file SSLKey string `toml:"ssl-key" override:"ssl-key"` // SSLServerName is used to verify the hostname for the targets. SSLServerName string `toml:"ssl-server-name" override:"ssl-server-name"` // Use SSL but skip chain & host verification InsecureSkipVerify bool `toml:"insecure-skip-verify" override:"insecure-skip-verify"` }
Config is a Consul service discovery configuration
func (Config) Prom ¶
func (c Config) Prom(conf *config.ScrapeConfig)
Prom writes the prometheus configuration for discoverer into ScrapeConfig
func (Config) PromConfig ¶
PromConfig returns the prometheus configuration for this discoverer
type Diagnostic ¶ added in v1.4.0
type Diagnostic scraper.Diagnostic
type Service ¶
type Service struct { Configs []Config // contains filtered or unexported fields }
Service is the consul discovery service
func NewService ¶
func NewService(c []Config, r scraper.Registry, d Diagnostic) *Service
NewService creates a new unopened service
func (*Service) TestOptions ¶
func (s *Service) TestOptions() interface{}
TestOptions returns an object that is in turn passed to Test.
Click to show internal directories.
Click to hide internal directories.