metric

package
v0.0.0-...-056aa66 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: MIT Imports: 5 Imported by: 1

Documentation

Overview

Package metric provides a custom CloudWatch metric for filesystem storage.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingName      = errors.New("missing metric name")
	ErrMissingNamespace = errors.New("missing metric namespace")
	ErrMissingRegion    = errors.New("missing metric region")
)

Functions

This section is empty.

Types

type Identifier

type Identifier struct {
	Filesystem string
	InstanceID string
}

Identifier represents the identity of a datapoint.

type Metric

type Metric struct {
	Name      string
	Namespace string
	Region    string
	// contains filtered or unexported fields
}

Metric represents a CloudWatch metric.

func New

func New(name, namespace, region string) (*Metric, error)

New creates and returns a metric.

func (*Metric) Publish

func (m *Metric) Publish(identifier *Identifier) (uint64, error)

Publish publishes a datapoint to a metric.

Jump to

Keyboard shortcuts

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