metrics

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 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

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

func (*DataPoint) String

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

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

func (q *QueryRange) String() string

func (*QueryRange) Validate

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