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: 0

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

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

func (r *Reader) Close() error

func (*Reader) Gather

func (r *Reader) Gather() error

func (*Reader) Name

func (r *Reader) Name() string

func (*Reader) ReadData

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

func (*Reader) ReadLine

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

func (*Reader) SetMode

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

func (*Reader) Source

func (r *Reader) Source() string

func (*Reader) Start

func (r *Reader) Start() error

func (*Reader) SyncMeta

func (*Reader) SyncMeta()

Jump to

Keyboard shortcuts

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