ingester

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStreamMissing = errors.New("Stream missing")
)

Errors returned on Query.

Functions

This section is empty.

Types

type ChunkStore

type ChunkStore interface {
	Put(ctx context.Context, chunks []chunk.Chunk) error
}

ChunkStore is the interface we need to store chunks.

type Config

type Config struct {
	LifecyclerConfig ring.LifecyclerConfig `yaml:"lifecycler,omitempty"`

	ConcurrentFlushes int           `yaml:"concurrent_flushes"`
	FlushCheckPeriod  time.Duration `yaml:"flush_check_period"`
	FlushOpTimeout    time.Duration `yaml:"flush_op_timeout"`
	RetainPeriod      time.Duration `yaml:"chunk_retain_period"`
	MaxChunkIdle      time.Duration `yaml:"chunk_idle_period"`
	BlockSize         int           `yaml:"chunk_block_size"`
}

Config for an ingester.

func (*Config) RegisterFlags

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

RegisterFlags registers the flags.

type Ingester

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

Ingester builds chunks for incoming log streams.

func New

func New(cfg Config, store ChunkStore) (*Ingester, error)

New makes a new Ingester.

func (*Ingester) Check

Check implements grpc_health_v1.HealthCheck.

func (*Ingester) Flush

func (i *Ingester) Flush()

Flush triggers a flush of all the chunks and closes the flush queues. Called from the Lifecycler as part of the ingester shutdown.

func (*Ingester) FlushHandler

func (i *Ingester) FlushHandler(w http.ResponseWriter, _ *http.Request)

FlushHandler triggers a flush of all in memory chunks. Mainly used for local testing.

func (*Ingester) Label

Label returns the set of labels for the stream this ingester knows about.

func (*Ingester) Push

Push implements logproto.Pusher.

func (*Ingester) Query

func (i *Ingester) Query(req *logproto.QueryRequest, queryServer logproto.Querier_QueryServer) error

Query the ingests for log streams matching a set of matchers.

func (*Ingester) ReadinessHandler

func (i *Ingester) ReadinessHandler(w http.ResponseWriter, r *http.Request)

ReadinessHandler is used to indicate to k8s when the ingesters are ready for the addition removal of another ingester. Returns 200 when the ingester is ready, 500 otherwise.

func (*Ingester) Shutdown

func (i *Ingester) Shutdown()

Shutdown stops the ingester.

func (*Ingester) StopIncomingRequests

func (i *Ingester) StopIncomingRequests()

StopIncomingRequests implements ring.Lifecycler.

func (*Ingester) Stopping

func (i *Ingester) Stopping()

Stopping helps cleaning up resources before actual shutdown

func (*Ingester) Tail

func (i *Ingester) Tail(req *logproto.TailRequest, queryServer logproto.Querier_TailServer) error

Tail logs matching given query

func (*Ingester) TransferOut

func (i *Ingester) TransferOut(context.Context) error

TransferOut implements ring.Lifecycler.

func (*Ingester) Watch

Watch implements grpc_health_v1.HealthCheck.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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