metrics

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AwsPayloadLimit is the maximum quality for a data-set to contain
	// before AWS will reject the payload.
	AwsPayloadLimit = 20
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	CloudWatch cloudwatchclient.ClientInterface
	Namespace  string
	Data       []types.MetricDatum
	DryRun     bool
}

Client for pushing metrics to CloudWatch.

func New

func New(cloudwatch cloudwatchclient.ClientInterface, namespace string, dryRun bool) (*Client, error)

New client for pushing metrics to CloudWatch.

func (*Client) Add

func (c *Client) Add(data types.MetricDatum) error

Add metrics to Client.

func (*Client) Flush

func (c *Client) Flush() error

Flush metrics to CloudWatch.

type ClientInterface

type ClientInterface interface {
	Add(datum types.MetricDatum) error
	Flush() error
}

ClientInterface for pushing metrics to CloudWatch.

Jump to

Keyboard shortcuts

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