Documentation ¶
Index ¶
- Variables
- func NewDiscovery(conf *SDConfig, logger log.Logger, metrics discovery.DiscovererMetrics) (*refresh.Discovery, error)
- type Discovery
- type SDConfig
- func (c SDConfig) Name() string
- func (c SDConfig) NewDiscoverer(options discovery.DiscovererOptions) (discovery.Discoverer, error)
- func (*SDConfig) NewDiscovererMetrics(reg prometheus.Registerer, rmi discovery.RefreshMetricsInstantiator) discovery.DiscovererMetrics
- func (c *SDConfig) SetDirectory(dir string)
- func (c *SDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSDConfig = SDConfig{ Port: 80, RefreshInterval: model.Duration(60 * time.Second), HTTPClientConfig: config.DefaultHTTPClientConfig, Zone: scw.ZoneFrPar1.String(), APIURL: "https://api.scaleway.com", }
DefaultSDConfig is the default Scaleway Service Discovery configuration.
Functions ¶
func NewDiscovery ¶
Types ¶
type Discovery ¶
type Discovery struct{}
Discovery periodically performs Scaleway requests. It implements the Discoverer interface.
type SDConfig ¶
type SDConfig struct { // Project: The Scaleway Project ID used to filter discovery on. Project string `yaml:"project_id"` // APIURL: URL of the Scaleway API to use. APIURL string `yaml:"api_url,omitempty"` // Zone: The zone of the scrape targets. // If you need to configure multiple zones use multiple scaleway_sd_configs Zone string `yaml:"zone"` // AccessKey used to authenticate on Scaleway APIs. AccessKey string `yaml:"access_key"` // SecretKey used to authenticate on Scaleway APIs. SecretKey config.Secret `yaml:"secret_key"` // SecretKey used to authenticate on Scaleway APIs. SecretKeyFile string `yaml:"secret_key_file"` // NameFilter to filter on during the ListServers. NameFilter string `yaml:"name_filter,omitempty"` // TagsFilter to filter on during the ListServers. TagsFilter []string `yaml:"tags_filter,omitempty"` HTTPClientConfig config.HTTPClientConfig `yaml:",inline"` RefreshInterval model.Duration `yaml:"refresh_interval"` Port int `yaml:"port"` // Role can be either instance or baremetal Role role `yaml:"role"` }
func (SDConfig) NewDiscoverer ¶
func (c SDConfig) NewDiscoverer(options discovery.DiscovererOptions) (discovery.Discoverer, error)
func (*SDConfig) NewDiscovererMetrics ¶
func (*SDConfig) NewDiscovererMetrics(reg prometheus.Registerer, rmi discovery.RefreshMetricsInstantiator) discovery.DiscovererMetrics
NewDiscovererMetrics implements discovery.Config.
func (*SDConfig) SetDirectory ¶
SetDirectory joins any relative file paths with dir.
func (*SDConfig) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.