logqlmodel

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const PackedEntryKey = "_entry"

PackedEntryKey is a special JSON key used by the pack promtail stage and unpack parser

View Source
const ValueTypeStreams = "streams"

ValueTypeStreams promql.ValueType for log streams

Variables

View Source
var (
	ErrParse    = errors.New("failed to parse the log query")
	ErrPipeline = errors.New("failed execute pipeline")
	ErrLimit    = errors.New("limit reached while evaluating the query")
	ErrorLabel  = "__error__"
)

Those errors are useful for comparing error returned by the engine. e.g. errors.Is(err,logqlmodel.ErrParse) let you know if this is a ast parsing error.

Functions

This section is empty.

Types

type LimitError

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

func NewSeriesLimitError

func NewSeriesLimitError(limit int) *LimitError

func (LimitError) Is

func (e LimitError) Is(target error) bool

Is allows to use errors.Is(err,ErrLimit) on this error.

type ParseError

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

ParseError is what is returned when we failed to parse.

func NewParseError

func NewParseError(msg string, line, col int) ParseError

func NewStageError

func NewStageError(expr string, err error) ParseError

func (ParseError) Error

func (p ParseError) Error() string

func (ParseError) Is

func (p ParseError) Is(target error) bool

Is allows to use errors.Is(err,ErrParse) on this error.

type PipelineError

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

func NewPipelineErr

func NewPipelineErr(metric labels.Labels) *PipelineError

func (PipelineError) Error

func (e PipelineError) Error() string

func (PipelineError) Is

func (e PipelineError) Is(target error) bool

Is allows to use errors.Is(err,ErrPipeline) on this error.

type Result

type Result struct {
	Data       parser.Value
	Statistics stats.Result
}

Result is the result of a query execution.

type Streams

type Streams []logproto.Stream

Streams is promql.Value

func (Streams) Len

func (streams Streams) Len() int

func (Streams) Less

func (streams Streams) Less(i, j int) bool

func (Streams) Lines

func (streams Streams) Lines() int64

func (Streams) String

func (Streams) String() string

String implements `promql.Value`

func (Streams) Swap

func (streams Streams) Swap(i, j int)

func (Streams) Type

func (Streams) Type() parser.ValueType

Type implements `promql.Value`

Directories

Path Synopsis
Package stats provides primitives for recording metrics across the query path.
Package stats provides primitives for recording metrics across the query path.

Jump to

Keyboard shortcuts

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