Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultEC2SDConfig = EC2SDConfig{ Port: 80, RefreshInterval: 60 * time.Second, }
DefaultEC2SDConfig is the default EC2 SD configuration.
Functions ¶
This section is empty.
Types ¶
type EC2Discovery ¶
EC2Discovery periodically performs EC2-SD requests. It implements the Discoverer interface.
func NewEC2Discovery ¶
func NewEC2Discovery(conf *EC2SDConfig, logger logrus.FieldLogger) *EC2Discovery
NewEC2Discovery returns a new EC2Discovery which periodically refreshes its targets.
type EC2SDConfig ¶
type EC2SDConfig struct { Endpoint string `yaml:"endpoint"` Region string `yaml:"region"` AccessKey string `yaml:"access-key,omitempty"` SecretKey string `yaml:"secret-key,omitempty"` Profile string `yaml:"profile,omitempty"` RoleARN string `yaml:"role-arn,omitempty"` Application string `yaml:"application,omitempty"` RefreshInterval time.Duration `yaml:"refresh-interval,omitempty"` Port int `yaml:"port"` Filters []*EC2Filter `yaml:"filters"` }
EC2SDConfig is the configuration for EC2 based service discovery.
func (*EC2SDConfig) Name ¶
func (*EC2SDConfig) Name() string
Name returns the name of the EC2 Config.
func (*EC2SDConfig) NewDiscoverer ¶
func (c *EC2SDConfig) NewDiscoverer(opts discovery.DiscovererOptions) (discovery.Discoverer, error)
NewDiscoverer returns a Discoverer for the EC2 Config.
func (*EC2SDConfig) UnmarshalYAML ¶
func (c *EC2SDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the yaml.Unmarshaler interface for the EC2 Config.
Click to show internal directories.
Click to hide internal directories.