tail

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package tail adapts ClickHouse to Loki's tail.Querier: one in-process "ingester" whose tail client polls for new rows.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ingester

type Ingester struct {
	Q        *chstore.Querier
	Poll     time.Duration // default 1s
	Lookback time.Duration // default 10s
	// contains filtered or unexported fields
}

Ingester implements tail.Ingester with a single in-process "ingester". Its tail client polls ClickHouse for rows newer than the previous poll (minus a lookback for late arrivals) and deduplicates them.

func (*Ingester) Tail

Tail starts a tail query and returns a map of address to tail client.

func (*Ingester) TailDisconnectedIngesters

func (i *Ingester) TailDisconnectedIngesters(ctx context.Context, req *logproto.TailRequest, connected []string) (map[string]logproto.Querier_TailClient, error)

TailDisconnectedIngesters handles tail requests for disconnected ingesters.

func (*Ingester) TailersCount

func (i *Ingester) TailersCount(context.Context) ([]uint32, error)

TailersCount returns the number of active tailers.

Jump to

Keyboard shortcuts

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