cloudwatch

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2020 License: MIT Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudWatch

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

CloudWatch has CloudWatch client.

func New

func New(conf config.Config) (*CloudWatch, error)

New returns initialized *CloudWatch.

func (*CloudWatch) DoGetMetricStatistics

func (svc *CloudWatch) DoGetMetricStatistics(in *SDK.GetMetricStatisticsInput) (*SDK.GetMetricStatisticsOutput, error)

DoGetMetricStatistics executes GetMetricStatistics operation.

func (*CloudWatch) DoPutMetricData added in v1.11.1

func (svc *CloudWatch) DoPutMetricData(in *SDK.PutMetricDataInput) error

DoPutMetricData executes PutMetricData operation.

func (*CloudWatch) Errorf

func (svc *CloudWatch) Errorf(format string, v ...interface{})

Errorf logging error information.

func (*CloudWatch) GetMetricStatistics

func (svc *CloudWatch) GetMetricStatistics(in MetricStatisticsInput) (*MetricStatisticsResponse, error)

GetMetricStatistics executes GetMetricStatistics operation.

func (*CloudWatch) Infof

func (svc *CloudWatch) Infof(format string, v ...interface{})

Infof logging information.

func (*CloudWatch) PutMetricData added in v1.11.1

func (svc *CloudWatch) PutMetricData(in PutMetricDataInput) error

PutMetricData executes PutMetricData operation.

func (*CloudWatch) SetLogger

func (svc *CloudWatch) SetLogger(logger log.Logger)

SetLogger sets logger.

type Datapoint

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

func NewDatapoint

func NewDatapoint(d *SDK.Datapoint) Datapoint

type Dimension

type Dimension struct {
	Name  string
	Value string
}

type MetricDatum added in v1.11.1

type MetricDatum struct {
	MetricName        string
	Unit              string
	StorageResolution int64
	Value             float64
	HasValue          bool // use as true when value == 0
	Values            []float64
	Counts            []float64
	Timestamp         time.Time

	StatisticValues StatisticSet
	Dimensions      []Dimension
}

func (MetricDatum) ToSDKValue added in v1.11.1

func (d MetricDatum) ToSDKValue() *SDK.MetricDatum

type MetricStatisticsInput

type MetricStatisticsInput struct {
	StartTime          time.Time
	EndTime            time.Time
	Period             int64
	MetricName         string
	Namespace          string
	Unit               string
	Statistics         []string
	ExtendedStatistics []string

	Dimensions []Dimension
	// Key: Dimension.Name, Value: Dimension.Value.
	// If you use same key and differenct values, then use Dimensions.
	DimensionsMap map[string]string
}

func (MetricStatisticsInput) ToInput

type MetricStatisticsResponse

type MetricStatisticsResponse struct {
	Datapoints []Datapoint
	Label      string
}

type PutMetricDataInput added in v1.11.1

type PutMetricDataInput struct {
	MetricData []MetricDatum
	Namespace  string
}

func (*PutMetricDataInput) AddMetric added in v1.11.1

func (o *PutMetricDataInput) AddMetric(d MetricDatum)

func (PutMetricDataInput) ToInput added in v1.11.1

type StatisticSet added in v1.11.1

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

	// use as true when value == 0
	HasMaximum     bool
	HasMinimum     bool
	HasSampleCount bool
	HasSum         bool
}

func (StatisticSet) ToSDKValue added in v1.11.1

func (d StatisticSet) ToSDKValue() *SDK.StatisticSet

Jump to

Keyboard shortcuts

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