ec2

package
v1.4.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster added in v1.4.0

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

func NewCluster added in v1.4.0

func NewCluster(c Config, d Diagnostic) (*Cluster, error)

func (*Cluster) Client added in v1.4.0

func (s *Cluster) Client() (client.Client, error)

func (*Cluster) Close added in v1.4.0

func (s *Cluster) Close() error

func (*Cluster) Open added in v1.4.0

func (s *Cluster) Open() error

func (*Cluster) Test added in v1.4.0

func (s *Cluster) Test() error

func (*Cluster) Update added in v1.4.0

func (s *Cluster) Update(c Config) error

type Config

type Config struct {
	Enabled         bool          `toml:"enabled" override:"enabled"`
	ID              string        `toml:"id" override:"id"`
	Region          string        `toml:"region" override:"region"`
	AccessKey       string        `toml:"access-key" override:"access-key"`
	SecretKey       string        `toml:"secret-key" override:"secret-key,redact"`
	Profile         string        `toml:"profile" override:"profile"`
	RefreshInterval toml.Duration `toml:"refresh-interval" override:"refresh-interval"`
	Port            int           `toml:"port" override:"port"`
}

Config is EC2 service discovery configuration

func (Config) ClientConfig added in v1.4.0

func (c Config) ClientConfig() (client.Config, error)

func (*Config) Init

func (e *Config) Init()

Init adds default values to EC2 configuration

func (Config) Prom

func (e Config) Prom(c *config.ScrapeConfig)

Prom writes the prometheus configuration for discoverer into ScrapeConfig

func (Config) PromConfig

func (e Config) PromConfig() *config.EC2SDConfig

PromConfig returns the prometheus configuration for this discoverer

func (Config) Service

func (e Config) Service() string

Service return discoverer type

func (Config) ServiceID

func (e Config) ServiceID() string

ServiceID returns the discoverers name

func (Config) Validate

func (e Config) Validate() error

Validate validates the EC2 configuration values

type Diagnostic added in v1.4.0

type Diagnostic interface {
	scraper.Diagnostic
	WithClusterContext(region string) Diagnostic
}

type Service

type Service struct {
	Configs []Config
	// contains filtered or unexported fields
}

Service is the ec2 discovery and autoscale service

func NewService

func NewService(c []Config, r scraper.Registry, d Diagnostic) (*Service, error)

NewService creates a new unopened service

func (*Service) Client added in v1.4.0

func (s *Service) Client(id string) (client.Client, error)

func (*Service) Close

func (s *Service) Close() error

Close stops the service

func (*Service) Open

func (s *Service) Open() error

Open starts the service

func (*Service) Test

func (s *Service) Test(options interface{}) error

Test a service with the provided options.

func (*Service) TestOptions

func (s *Service) TestOptions() interface{}

TestOptions returns an object that is in turn passed to Test.

func (*Service) Update

func (s *Service) Update(newConfigs []interface{}) error

Update updates configuration while running

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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