metrics

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoDataFound = errors.New("no data found")
)

Functions

This section is empty.

Types

type DataPoint added in v0.15.2

type DataPoint struct {
	// Unix timestamp in seconds.
	Timestamp int64
	Value     float64
}

func (*DataPoint) String added in v0.16.2

func (d *DataPoint) String() string

type Provider

type Provider interface {
	Type() string
	// QueryPoints gives back data points within the given range.
	QueryPoints(ctx context.Context, query string, queryRange QueryRange) (points []DataPoint, err error)
}

Provider represents a client for metrics provider which provides metrics for analysis.

type QueryRange added in v0.9.8

type QueryRange struct {
	// Required: Start of the queried time period
	From time.Time
	// End of the queried time period. Defaults to the current time.
	To time.Time
}

QueryRange represents a sliced time range.

func (*QueryRange) String added in v0.20.0

func (q *QueryRange) String() string

func (*QueryRange) Validate added in v0.9.8

func (q *QueryRange) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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