Documentation ¶
Index ¶
- type Label
- type Metric
- type Querier
- type QuerierBuilder
- type QuerierParams
- type Type
- type VMStorage
- func (s *VMStorage) ApplyParams(params QuerierParams) *VMStorage
- func (s *VMStorage) BuildWithParams(params QuerierParams) Querier
- func (s *VMStorage) Clone() *VMStorage
- func (s *VMStorage) Query(ctx context.Context, query string) ([]Metric, error)
- func (s *VMStorage) QueryRange(ctx context.Context, query string, start, end time.Time) ([]Metric, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metric ¶ added in v1.34.4
Metric is the basic entity which should be return by datasource
type Querier ¶ added in v1.34.8
type Querier interface { Query(ctx context.Context, query string) ([]Metric, error) QueryRange(ctx context.Context, query string, from, to time.Time) ([]Metric, error) }
Querier interface wraps Query and QueryRange methods
type QuerierBuilder ¶ added in v1.59.0
type QuerierBuilder interface {
BuildWithParams(params QuerierParams) Querier
}
QuerierBuilder builds Querier with given params.
func Init ¶ added in v1.37.4
func Init() (QuerierBuilder, error)
Init creates a Querier from provided flag values.
type QuerierParams ¶ added in v1.59.0
type QuerierParams struct { DataSourceType *Type EvaluationInterval time.Duration // see https://docs.victoriametrics.com/#prometheus-querying-api-enhancements ExtraLabels map[string]string }
QuerierParams params for Querier.
type Type ¶ added in v1.53.0
type Type struct {
// contains filtered or unexported fields
}
Type represents data source type
func NewGraphiteType ¶ added in v1.53.0
func NewGraphiteType() Type
NewGraphiteType returns graphite datasource type
func NewPrometheusType ¶ added in v1.53.0
func NewPrometheusType() Type
NewPrometheusType returns prometheus datasource type
func NewRawType ¶ added in v1.53.0
NewRawType returns datasource type from raw string without validation.
func (Type) MarshalYAML ¶ added in v1.53.0
MarshalYAML implements the yaml.Unmarshaler interface.
func (*Type) UnmarshalYAML ¶ added in v1.53.0
UnmarshalYAML implements the yaml.Unmarshaler interface.
func (*Type) ValidateExpr ¶ added in v1.53.0
ValidateExpr validates query expression with datasource ql.
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, lookBack time.Duration, queryStep time.Duration, appendTypePrefix bool, c *http.Client) *VMStorage
NewVMStorage is a constructor for VMStorage
func (*VMStorage) ApplyParams ¶ added in v1.59.0
func (s *VMStorage) ApplyParams(params QuerierParams) *VMStorage
ApplyParams - changes given querier params.
func (*VMStorage) BuildWithParams ¶ added in v1.59.0
func (s *VMStorage) BuildWithParams(params QuerierParams) Querier
BuildWithParams - implements interface.
func (*VMStorage) QueryRange ¶ added in v1.61.0
func (s *VMStorage) QueryRange(ctx context.Context, query string, start, end time.Time) ([]Metric, error)
QueryRange executes the given query on the given time range. For Prometheus type see https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries Graphite type isn't supported.