querier

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: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadBatch

func ReadBatch(i iter.EntryIterator, size uint32) (*logproto.QueryResponse, uint32, error)

ReadBatch reads a set of entries off an iterator.

Types

type Config

type Config struct {
	TailMaxDuration time.Duration `yaml:"tail_max_duration"`
	QueryTimeout    time.Duration `yaml:"query_timeout"`
}

Config for a querier.

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(f *flag.FlagSet)

RegisterFlags register flags.

type Querier

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

Querier handlers queries.

func New

func New(cfg Config, clientCfg client.Config, ring ring.ReadRing, store storage.Store) (*Querier, error)

New makes a new Querier.

func (*Querier) Check

Check implements the grpc healthcheck

func (*Querier) Label

Label does the heavy lifting for a Label query.

func (*Querier) LabelHandler

func (q *Querier) LabelHandler(w http.ResponseWriter, r *http.Request)

LabelHandler is a http.HandlerFunc for handling label queries.

func (*Querier) Query

Query does the heavy lifting for an actual query.

func (*Querier) QueryHandler

func (q *Querier) QueryHandler(w http.ResponseWriter, r *http.Request)

QueryHandler is a http.HandlerFunc for queries.

func (*Querier) Tail added in v0.2.0

func (q *Querier) Tail(ctx context.Context, req *logproto.TailRequest) (*Tailer, error)

Tail keeps getting matching logs from all ingesters for given query

func (*Querier) TailHandler

func (q *Querier) TailHandler(w http.ResponseWriter, r *http.Request)

TailHandler is a http.HandlerFunc for handling tail queries.

type TailResponse

type TailResponse struct {
	Streams        []logproto.Stream `json:"streams"`
	DroppedEntries []droppedEntry    `json:"dropped_entries"`
}

TailResponse holds response sent by tailer

type Tailer added in v0.2.0

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

Tailer manages complete lifecycle of a tail request

Jump to

Keyboard shortcuts

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