query

package
v2.6.2 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: AGPL-3.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const SchemaConfigFilename = "schemaconfig.yaml"

Variables

This section is empty.

Functions

func GetObjectClient

func GetObjectClient(conf loki.Config, cm storage.ClientMetrics) (chunk.ObjectClient, error)

func LoadSchemaUsingObjectClient

func LoadSchemaUsingObjectClient(oc chunk.ObjectClient, name string) (*config.SchemaConfig, error)

Types

type Query

type Query struct {
	QueryString            string
	Start                  time.Time
	End                    time.Time
	Limit                  int
	BatchSize              int
	Forward                bool
	Step                   time.Duration
	Interval               time.Duration
	Quiet                  bool
	NoLabels               bool
	IgnoreLabelsKey        []string
	ShowLabelsKey          []string
	FixedLabelsLen         int
	ColoredOutput          bool
	LocalConfig            string
	FetchSchemaFromStorage bool
}

Query contains all necessary fields to execute instant and range queries and print the results.

func (*Query) DoLocalQuery

func (q *Query) DoLocalQuery(out output.LogOutput, statistics bool, orgID string, useRemoteSchema bool) error

DoLocalQuery executes the query against the local store using a Loki configuration file.

func (*Query) DoQuery

func (q *Query) DoQuery(c client.Client, out output.LogOutput, statistics bool)

DoQuery executes the query and prints out the results

func (*Query) SetInstant

func (q *Query) SetInstant(time time.Time)

SetInstant makes the Query an instant type

func (*Query) TailQuery

func (q *Query) TailQuery(delayFor time.Duration, c client.Client, out output.LogOutput)

TailQuery connects to the Loki websocket endpoint and tails logs

Jump to

Keyboard shortcuts

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