cloudwatch

package
Version: v0.0.0-...-b425644 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION = "2010-08-01"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*aws.Client
}

func (*Client) Endpoint

func (client *Client) Endpoint() string

func (*Client) ListMetrics

func (client *Client) ListMetrics(funcs ...ListMetricsOption) (rsp *ListMetricsResponse, e error)

type Datapoint

type Datapoint struct {
	Timestamp   time.Time `xml:"Timestamp,omitempty"`
	Unit        string    `xml:"Unit,omitempty"`
	Sum         float64   `xml:"Sum,omitempty"`
	Average     float64   `xml:"Average,omitempty"`
	Maximum     float64   `xml:"Maximum,omitempty"`
	Minimum     float64   `xml:"Minimum,omitempty"`
	SampleCount float64   `xml:"SampleCount,omitempty"`
}

type Dimension

type Dimension struct {
	Name  string `xml:"Name"`
	Value string `xml:"Value"`
}

type GetMetricStatistics

type GetMetricStatistics struct {
	Dimensions []*Dimension
	EndTime    time.Time
	MetricName string
	Namespace  string
	Period     int // min: 60, multiple of 60
	StartTime  time.Time
	Statistics []string // Average | Sum | SampleCount | Maximum | Minimum
	Unit       string
}

func (*GetMetricStatistics) Execute

func (action *GetMetricStatistics) Execute(client *ec2.Client) (*GetMetricStatisticsResponse, error)

type GetMetricStatisticsResponse

type GetMetricStatisticsResponse struct {
	XMLName                   xml.Name                   `xml:"GetMetricStatisticsResponse"`
	GetMetricStatisticsResult *GetMetricStatisticsResult `xml:"GetMetricStatisticsResult"`
}

type GetMetricStatisticsResult

type GetMetricStatisticsResult struct {
	XMLName    xml.Name     `xml:"GetMetricStatisticsResult"`
	Label      string       `xml:"Label"`
	Datapoints []*Datapoint `xml:"Datapoints>member"`
}

type ListMetrics

type ListMetrics struct {
	Dimensions []*Dimension
	MetricName string
	Namespace  string
	NextToken  string
}

func (*ListMetrics) Execute

func (action *ListMetrics) Execute(client *ec2.Client) (*ListMetricsResponse, error)

type ListMetricsOption

type ListMetricsOption func(*ListMetricsOptions)

func OptNextToken

func OptNextToken(i string) ListMetricsOption

type ListMetricsOptions

type ListMetricsOptions struct {
	NextToken string
}

type ListMetricsResponse

type ListMetricsResponse struct {
	XMLName   xml.Name  `xml:"ListMetricsResponse"`
	Metrics   []*Metric `xml:"ListMetricsResult>Metrics>member"`
	NextToken string    `xml:"ListMetricsResult>NextToken"`
}

type Metric

type Metric struct {
	Dimensions []*Dimension `xml:"Dimensions>member"`
	MetricName string       `xml:"MetricName"`
	Namespace  string       `xml:"Namespace"`
}

type MetricData

type MetricData struct {
	Dimensions      []*Dimension
	MetricName      string
	StatisticValues *StatisticValues
	Timestamp       time.Time
	Unit            string
	Value           float64
}

http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html

type PutMetricData

type PutMetricData struct {
	Namespace  string
	MetricData []*MetricData
}

http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricData.html

func (*PutMetricData) Execute

func (p *PutMetricData) Execute(client *aws.Client) error

type StatisticValues

type StatisticValues struct {
	Maximum     float64
	Minimum     float64
	SampleCount float64
	Sum         float64
}

type Values

type Values map[string]string

func (Values) Add

func (values Values) Add(key, value string)

func (Values) Encode

func (values Values) Encode() string

Jump to

Keyboard shortcuts

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