cloudwatch

package
v0.0.0-...-860a04e Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2013 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudWatch

type CloudWatch struct {
	Service aws.AWSService
	// contains filtered or unexported fields
}

The CloudWatch type encapsulates all the CloudWatch operations in a region.

func NewCloudWatch

func NewCloudWatch(auth aws.Auth, region aws.ServiceInfo, namespace string) (*CloudWatch, error)

Create a new CloudWatch object for a given namespace

func (*CloudWatch) GetMetricStatistics

func (c *CloudWatch) GetMetricStatistics(req *GetMetricStatisticsRequest) (result *GetMetricStatisticsResponse, err error)

Get statistics for specified metric

If the arguments are invalid or the server returns an error, the error will be set and the other values undefined.

func (*CloudWatch) PutMetricData

func (c *CloudWatch) PutMetricData(metrics []MetricDatum) (result *aws.BaseResponse, err error)

type Datapoint

type Datapoint struct {
	Average     float64
	Maximum     float64
	Minimum     float64
	SampleCount float64
	Sum         float64
	Timestamp   time.Time
	Unit        string
}

type Dimension

type Dimension struct {
	Name  string
	Value string
}

type GetMetricStatisticsRequest

type GetMetricStatisticsRequest struct {
	Dimensions []Dimension
	EndTime    time.Time
	StartTime  time.Time
	MetricName string
	Unit       string
	Period     int
	Statistics []string
}

type GetMetricStatisticsResponse

type GetMetricStatisticsResponse struct {
	GetMetricStatisticsResult GetMetricStatisticsResult
	ResponseMetadata          aws.ResponseMetadata
}

type GetMetricStatisticsResult

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

type MetricDatum

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

type StatisticSet

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

Jump to

Keyboard shortcuts

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