logql

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const CLOSE_BRACE = 57355
View Source
const COMMA = 57356
View Source
const DOT = 57357
View Source
const EQ = 57350
View Source
const IDENTIFIER = 57346
View Source
const LABELS = 57349
View Source
const MATCHERS = 57348
View Source
const NEQ = 57351
View Source
const NRE = 57353
View Source
const OPEN_BRACE = 57354
View Source
const PIPE_EXACT = 57359
View Source
const PIPE_MATCH = 57358
View Source
const RE = 57352
View Source
const STRING = 57347

Variables

This section is empty.

Functions

func ParseMatchers

func ParseMatchers(input string) ([]*labels.Matcher, error)

ParseMatchers parses a string and returns labels matchers, if the expression contains anything else it will return an error.

Types

type Expr

type Expr interface {
	Eval(Querier) (iter.EntryIterator, error)
	Matchers() []*labels.Matcher
}

Expr is a LogQL expression.

func NewFilterExpr

func NewFilterExpr(left Expr, ty labels.MatchType, match string) Expr

NewFilterExpr wraps an existing Expr with a next filter expression.

func ParseExpr

func ParseExpr(input string) (Expr, error)

ParseExpr parses a string and returns an Expr.

type Filter added in v1.0.1

type Filter func([]byte) bool

Filter is a line filter sent to a querier to filter out log line.

type ParseError

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

ParseError is what is returned when we failed to parse.

func (ParseError) Error

func (p ParseError) Error() string

type Querier

type Querier interface {
	Query([]*labels.Matcher, Filter) (iter.EntryIterator, error)
}

Querier allows a LogQL expression to fetch an EntryIterator for a set of matchers.

type QuerierFunc

type QuerierFunc func([]*labels.Matcher, Filter) (iter.EntryIterator, error)

QuerierFunc implements Querier.

func (QuerierFunc) Query

func (q QuerierFunc) Query(ms []*labels.Matcher, entryFilter Filter) (iter.EntryIterator, error)

Query implements Querier.

Jump to

Keyboard shortcuts

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