metric

package
v0.0.5-0...-3bd4ab3 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: CC0-1.0 Imports: 9 Imported by: 0

Documentation

Overview

Package metric provides functions and filters to test AWS CloudWatch Metrics

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metric

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

Metric contains the necessary properties for testing *cloudwatch.Metric objects

func New

func New(client client.ConfigProvider) *Metric

New returns a new *Metric

func (*Metric) Alarm

func (r *Metric) Alarm() *alarm.Alarm

Alarm returns a new *alarm.Alarm

func (*Metric) Assert

func (r *Metric) Assert(t *testing.T, metrics ...*cloudwatch.Metric) *Metric

Assert applies all filters that have been called, resets the list of filters, fails the test if there is not exactly one match, and stores the matched metric if metrics is not provided, *cloudwatch.Metric objects will be retreived from AWS

func (*Metric) Filter

func (r *Metric) Filter(filter shared.Filter) *Metric

Filter adds the 'filter' provided to the filter list

func (*Metric) First

func (r *Metric) First(t *testing.T, metrics ...*cloudwatch.Metric) *Metric

First applies all filters that have been called, resets the list of filters, fails the test if there are no matches, and stores the first match if metrics is not provided, *cloudwatch.Metric objects will be retreived from AWS

func (*Metric) MetricName

func (r *Metric) MetricName(name string) *Metric

MetricName adds the MetricName filter to the filter list the MetricName filter: filters metrics by MetricName where 'name' provided is the expected MetricName value

func (*Metric) Name

func (r *Metric) Name(name string) *Metric

Name adds the Name filter as an alias to the MetricName filter

func (*Metric) Namespace

func (r *Metric) Namespace(name string) *Metric

Namespace adds the Namespace filter to the filter list the Namespace filter: filters metrics by Namespace where 'name' provided is the expected Namespace value

func (*Metric) Selected

func (r *Metric) Selected() *cloudwatch.Metric

Selected returns the currently selected *cloudwatch.Metric

Directories

Path Synopsis
Package alarm the necessary properties for testing *cloudwatch.MetricAlarm objects
Package alarm the necessary properties for testing *cloudwatch.MetricAlarm objects

Jump to

Keyboard shortcuts

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