metricq

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const InfluxQL = "influxql"

InfluxQL tsql

Variables

This section is empty.

Functions

This section is empty.

Types

type Metricq added in v1.4.0

type Metricq struct {
	query.Queryer
	// contains filtered or unexported fields
}

func (*Metricq) Charts added in v1.4.0

func (q *Metricq) Charts(langCodes i18n.LanguageCodes, typ string) []*chartmeta.ChartMeta

Charts .

func (*Metricq) Client added in v1.4.0

func (q *Metricq) Client() *elastic.Client

Client .

func (*Metricq) GetSingleAggregationMeta added in v1.4.0

func (q *Metricq) GetSingleAggregationMeta(langCodes i18n.LanguageCodes, mode, name string) (*pb.Aggregation, error)

func (*Metricq) GetSingleMetricsMeta added in v1.4.0

func (q *Metricq) GetSingleMetricsMeta(langCodes i18n.LanguageCodes, scope, scopeID, metric string) (*pb.MetricMeta, error)

func (*Metricq) Handle added in v1.4.0

func (q *Metricq) Handle(r *http.Request) interface{}

Handle .

func (*Metricq) HandleV1 added in v1.4.0

func (q *Metricq) HandleV1(r *http.Request, params *QueryParams) interface{}

HandleV1 .

func (*Metricq) Indices added in v1.4.0

func (q *Metricq) Indices(metrics []string, clusters []string, start, end int64) []string

Indices .

func (*Metricq) MetricGroup added in v1.4.0

func (q *Metricq) MetricGroup(langCodes i18n.LanguageCodes, scope, scopeID, group, mode, format string, appendTags bool) (*pb.MetricGroup, error)

MetricGroup .

func (*Metricq) MetricGroups added in v1.4.0

func (q *Metricq) MetricGroups(langCodes i18n.LanguageCodes, scope, scopeID, mode string) ([]*pb.Group, error)

MetricGroups .

func (*Metricq) MetricMeta added in v1.4.0

func (q *Metricq) MetricMeta(langCodes i18n.LanguageCodes, scope, scopeID string, metrics ...string) ([]*pb.MetricMeta, error)

MetricMeta .

func (*Metricq) MetricNames added in v1.4.0

func (q *Metricq) MetricNames(langCodes i18n.LanguageCodes, scope, scopeID string) ([]*pb.NameDefine, error)

MetricMeta .

func (*Metricq) QueryWithFormatV1 added in v1.4.0

func (q *Metricq) QueryWithFormatV1(qlang, statement, format string, langCodes i18n.LanguageCodes) (*queryv1.Response, error)

func (*Metricq) RegeistMetricMeta added in v1.4.0

func (q *Metricq) RegeistMetricMeta(scope, scopeID, group string, metrics ...*pb.MetricMeta) error

RegeistMetricMeta .

func (*Metricq) UnregeistMetricMeta added in v1.4.0

func (q *Metricq) UnregeistMetricMeta(scope, scopeID, group string, metrics ...string) error

UnregeistMetricMeta .

type QueryParams

type QueryParams struct {
	Scope     string `param:"scope"`
	Aggregate string `param:"aggregate"`
	Format    string `query:"format"`
	Query     string `query:"q"`
	QL        string `query:"ql"`
}

QueryParams .

type Queryer

type Queryer interface {
	query.Queryer

	Client() *elastic.Client
	Indices(metrics []string, clusters []string, start, end int64) []string
	Handle(r *http.Request) interface{}
	MetricNames(langCodes i18n.LanguageCodes, scope, scopeID string) ([]*pb.NameDefine, error)
	MetricMeta(langCodes i18n.LanguageCodes, scope, scopeID string, pb ...string) ([]*pb.MetricMeta, error)
	GetSingleMetricsMeta(langCodes i18n.LanguageCodes, scope, scopeID, metric string) (*pb.MetricMeta, error)
	GetSingleAggregationMeta(langCodes i18n.LanguageCodes, mode, name string) (*pb.Aggregation, error)
	RegeistMetricMeta(scope, scopeID, group string, metrics ...*pb.MetricMeta) error
	UnregeistMetricMeta(scope, scopeID, group string, metrics ...string) error
	MetricGroups(langCodes i18n.LanguageCodes, scope, scopeID, mode string) ([]*pb.Group, error)
	MetricGroup(langCodes i18n.LanguageCodes, scope, scopeID, group, mode, format string, appendTags bool) (*pb.MetricGroup, error)

	// v1
	queryv1.Queryer
	HandleV1(r *http.Request, params *QueryParams) interface{}
	Charts(langCodes i18n.LanguageCodes, typ string) []*chartmeta.ChartMeta
}

Queryer .

var Q Queryer

Q Queryer .

Jump to

Keyboard shortcuts

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