cloudwatch

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package cloudwatch provides a session and a client for publishing metrics to cloudwatch metrics

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultSessionConfig

func DefaultSessionConfig() *aws.Config

DefaultSessionConfig creates a Session configuration based on our custom defaults

Types

type CloudWatch

type CloudWatch struct {
	Session *cloudwatch.CloudWatch
}

CloudCloudWatch provides a Session to the CloudWatch API

func NewSession

func NewSession(config *aws.Config) *CloudWatch

NewSession creates and returns a cloudwatch Session session

type Metric

type Metric struct {

	// Data of the metric to be posted
	Data *cloudwatch.PutMetricDataInput
	// contains filtered or unexported fields
}

Metric is used to represent a cloudwatch metric

func NewMetric

func NewMetric(config *MetricConfig) *Metric

NewMetric returns a new metric

func (*Metric) Put

Put posts to cloudwatch the metric defined

type MetricConfig

type MetricConfig struct {
	// Name of the metric
	Name string
	// Namespace of the metric
	Namespace string
	// Service representation for the dimension
	Service *Service
	// Value of the metric that will be posted
	Value float64
}

MetricConfig is used to represent a cloudwatch metric configuration data

func DefaultMetricConfig

func DefaultMetricConfig() *MetricConfig

DefaultClientConfig sets the default metric configuration

type Service

type Service struct {
	// Name of the service
	Name string
	// Env of the service, could also be represented by the Consul tag
	Env string
}

Service is used to represent a service

Jump to

Keyboard shortcuts

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