datasource

package
v1.35.0-cluster Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2020 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Label added in v1.34.4

type Label struct {
	Name  string
	Value string
}

Label represents metric's label

type Metric added in v1.34.4

type Metric struct {
	Labels    []Label
	Timestamp int64
	Value     float64
}

Metric is the basic entity which should be return by datasource It represents single data point with full list of labels

type Querier added in v1.34.8

type Querier interface {
	Query(ctx context.Context, query string) ([]Metric, error)
}

Querier interface wraps Query method which executes given query and returns list of Metrics as result

type VMStorage

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

VMStorage represents vmstorage entity with ability to read and write metrics

func NewVMStorage added in v1.34.4

func NewVMStorage(baseURL, basicAuthUser, basicAuthPass string, c *http.Client) *VMStorage

NewVMStorage is a constructor for VMStorage

func (*VMStorage) Query

func (s *VMStorage) Query(ctx context.Context, query string) ([]Metric, error)

Query reads metrics from datasource by given query

Jump to

Keyboard shortcuts

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