cloudwatch

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: Apache-2.0 Imports: 19 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReader

func NewReader(meta *reader.Meta, conf conf.MapConf) (reader.Reader, error)

func SelectMetrics

func SelectMetrics(c *Reader) ([]*cloudwatch.Metric, error)

Types

type CredentialConfig

type CredentialConfig struct {
	Region    string
	AccessKey string
	SecretKey string
	RoleARN   string
	Profile   string
	Filename  string
	Token     string
}

func (*CredentialConfig) Credentials

func (c *CredentialConfig) Credentials() (client.ConfigProvider, error)

type Dimension

type Dimension struct {
	Name  string
	Value string
}

type Metric

type Metric struct {
	MetricNames []string
	Dimensions  []*Dimension
}

type MetricCache

type MetricCache struct {
	TTL     time.Duration
	Fetched time.Time
	Metrics []*cloudwatch.Metric
}

func (*MetricCache) IsValid

func (c *MetricCache) IsValid() bool

* Check Metric Cache validity

type Reader added in v1.5.2

type Reader struct {
	Region          string
	CollectInterval time.Duration
	Period          time.Duration
	Delay           time.Duration
	Namespace       string
	Metrics         []*Metric
	CacheTTL        time.Duration
	RateLimit       int64
	// contains filtered or unexported fields
}

func (*Reader) Close added in v1.5.2

func (r *Reader) Close() error

func (*Reader) Gather added in v1.5.2

func (r *Reader) Gather() error

func (*Reader) Name added in v1.5.2

func (r *Reader) Name() string

func (*Reader) ReadData added in v1.5.2

func (r *Reader) ReadData() (Data, int64, error)

func (*Reader) ReadLine added in v1.5.2

func (r *Reader) ReadLine() (string, error)

func (*Reader) SetMode added in v1.5.2

func (r *Reader) SetMode(mode string, v interface{}) error

func (*Reader) Source added in v1.5.2

func (r *Reader) Source() string

func (*Reader) Start added in v1.5.2

func (r *Reader) Start() error

func (*Reader) SyncMeta added in v1.5.2

func (*Reader) SyncMeta()

Jump to

Keyboard shortcuts

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