metrics

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DatadogAPIKeyHeaderKey = "DD-API-KEY"

	DatadogApplicationKeyHeaderKey = "DD-APPLICATION-KEY"
)

https://docs.datadoghq.com/api/

Variables

View Source
var (
	ErrNoValuesFound = errors.New("no values found")
)

Functions

This section is empty.

Types

type CloudWatch

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

func NewCloudWatchProvider

func NewCloudWatchProvider(client cloudwatchiface.CloudWatchAPI, provider ProviderOpts) *CloudWatch

func (*CloudWatch) Execute

func (p *CloudWatch) Execute(query string) (float64, error)

type Datadog

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

func NewDatadogProvider

func NewDatadogProvider(
	provider ProviderOpts,
	credentials DatadogOpts) (*Datadog, error)

func (*Datadog) Execute

func (p *Datadog) Execute(query string) (float64, error)

Execute executes the datadog query against Datadog.metricsQueryEndpoint and returns the the first result as float64

type DatadogOpts

type DatadogOpts struct {
	APIKey         string
	ApplicationKey string
}

type ProviderOpts

type ProviderOpts struct {
	Address  string
	Interval time.Duration
}

Jump to

Keyboard shortcuts

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