Documentation ¶
Index ¶
- Constants
- type QueryCommandRunner
- func (receiver *QueryCommandRunner) ApplyOpts(opts QueryCommandRunnerOpts)
- func (receiver *QueryCommandRunner) InfluxLiteralToPromQLValue(result influxql.Literal, cmd command.Command) (value parser.Value, resultType string)
- func (receiver *QueryCommandRunner) InfluxResultToPromQLValue(results []influxdb.Result, expr parser.Expr, cmd command.Command) (value parser.Value, resultType string, err error)
- func (receiver *QueryCommandRunner) InfluxResultToStringSlice(results []influxdb.Result, dest *[]string, expr parser.Expr, ...) error
- func (receiver *QueryCommandRunner) Recycle()
- func (receiver *QueryCommandRunner) Run(ctx context.Context, cmd command.Command) (interface{}, error)
- type QueryCommandRunnerConfig
- type QueryCommandRunnerFactory
- type QueryCommandRunnerOpts
- type RunResult
Constants ¶
const (
PROMQL_DIALECT command.DialectType = "promql"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QueryCommandRunner ¶
type QueryCommandRunner struct { Cfg QueryCommandRunnerConfig Client influxdb.Client Factory *QueryCommandRunnerFactory }
QueryCommandRunner is a query engine that implements command.ICommandRunner to run command.Command It also implements command.IReusableCommandRunner to put itself back to the factory from which it was born
func (*QueryCommandRunner) ApplyOpts ¶
func (receiver *QueryCommandRunner) ApplyOpts(opts QueryCommandRunnerOpts)
func (*QueryCommandRunner) InfluxLiteralToPromQLValue ¶
func (receiver *QueryCommandRunner) InfluxLiteralToPromQLValue(result influxql.Literal, cmd command.Command) (value parser.Value, resultType string)
InfluxLiteralToPromQLValue converts influxql.Literal expression to parser.Value of Prometheus
func (*QueryCommandRunner) InfluxResultToPromQLValue ¶
func (receiver *QueryCommandRunner) InfluxResultToPromQLValue(results []influxdb.Result, expr parser.Expr, cmd command.Command) (value parser.Value, resultType string, err error)
InfluxResultToPromQLValue converts influxdb.Result slice to parser.Value of Prometheus
func (*QueryCommandRunner) InfluxResultToStringSlice ¶
func (receiver *QueryCommandRunner) InfluxResultToStringSlice(results []influxdb.Result, dest *[]string, expr parser.Expr, cmd command.Command) error
InfluxResultToStringSlice converts influxdb.Result slice to string slice
func (*QueryCommandRunner) Recycle ¶
func (receiver *QueryCommandRunner) Recycle()
Recycle puts callee back to its factory
type QueryCommandRunnerFactory ¶
type QueryCommandRunnerFactory struct {
// contains filtered or unexported fields
}
QueryCommandRunnerFactory is a concrete struct that implementing command.ICommandRunnerFactory in charge of create command.ICommandRunner instances. it wraps
func NewQueryCommandRunnerFactory ¶
func NewQueryCommandRunnerFactory() *QueryCommandRunnerFactory
NewQueryCommandRunnerFactory creates a package-level factory method for creating *QueryCommandRunner
func (*QueryCommandRunnerFactory) Build ¶
func (receiver *QueryCommandRunnerFactory) Build(client influxdb.Client, cfg config.Config) command.ICommandRunner
Build returns a command.ICommandRunner instance
func (*QueryCommandRunnerFactory) Recycle ¶
func (receiver *QueryCommandRunnerFactory) Recycle(runner *QueryCommandRunner)
Recycle puts *QueryCommandRunner back to object pool
type QueryCommandRunnerOpts ¶
type QueryCommandRunnerOpts struct { Cfg QueryCommandRunnerConfig Client influxdb.Client Factory *QueryCommandRunnerFactory }
Directories ¶
Path | Synopsis |
---|---|
Package testinghelper only for testing purpose
|
Package testinghelper only for testing purpose |