Documentation ¶
Index ¶
- type Config
- type Querier
- func (*Querier) Check(_ context.Context, _ *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error)
- func (q *Querier) Label(ctx context.Context, req *logproto.LabelRequest) (*logproto.LabelResponse, error)
- func (q *Querier) LabelHandler(w http.ResponseWriter, r *http.Request)
- func (q *Querier) Query(ctx context.Context, req *logproto.QueryRequest) (*logproto.QueryResponse, error)
- func (q *Querier) QueryHandler(w http.ResponseWriter, r *http.Request)
- func (q *Querier) ReadinessHandler(w http.ResponseWriter, r *http.Request)
- func (q *Querier) Tail(ctx context.Context, req *logproto.TailRequest) (*Tailer, error)
- func (q *Querier) TailHandler(w http.ResponseWriter, r *http.Request)
- type TailResponse
- type Tailer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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 ¶
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 ¶
func (*Querier) Check(_ context.Context, _ *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error)
Check implements the grpc healthcheck
func (*Querier) Label ¶
func (q *Querier) Label(ctx context.Context, req *logproto.LabelRequest) (*logproto.LabelResponse, error)
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 ¶
func (q *Querier) Query(ctx context.Context, req *logproto.QueryRequest) (*logproto.QueryResponse, error)
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) ReadinessHandler ¶ added in v0.3.0
func (q *Querier) ReadinessHandler(w http.ResponseWriter, r *http.Request)
ReadinessHandler is used to indicate to k8s when the querier is ready. Returns 200 when the querier is ready, 500 otherwise.
func (*Querier) Tail ¶ added in v0.2.0
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