ingester

package
v0.0.0-...-fad9a50 Latest Latest
Warning

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

Go to latest
Published: May 17, 2018 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrOutOfOrderSample is returned if a sample has a timestamp before the latest
	// timestamp in the series it is appended to.
	ErrOutOfOrderSample = fmt.Errorf("sample timestamp out of order")
	// ErrDuplicateSampleForTimestamp is returned if a sample has the same
	// timestamp as the latest sample in the series it is appended to but a
	// different value. (Appending an identical sample is a no-op and does
	// not cause an error.)
	ErrDuplicateSampleForTimestamp = fmt.Errorf("sample with repeated timestamp but different value")
)

Functions

This section is empty.

Types

type ChunkStore

type ChunkStore interface {
	Put(model.Metric, []*prom_chunk.Desc) error
}

A ChunkStore writes Prometheus chunks to a backing store.

type Config

type Config struct {
	FlushCheckPeriod     time.Duration
	MaxChunkAge          time.Duration
	MaxConcurrentFlushes int
	CheckpointFile       string
	CheckpointInterval   time.Duration
	FlushOnShutdown      bool
}

Config configures an Ingester.

type Ingester

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

An Ingester batches up samples for multiple series and stores them as chunks in a ChunkStore.

func NewIngester

func NewIngester(cfg Config, chunkStore ChunkStore) (*Ingester, error)

NewIngester constructs a new Ingester.

func (*Ingester) Append

func (i *Ingester) Append(sample *model.Sample) error

Append implements storage.SampleAppender.

func (*Ingester) Collect

func (i *Ingester) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector.

func (*Ingester) Describe

func (i *Ingester) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector.

func (*Ingester) NeedsThrottling

func (*Ingester) NeedsThrottling() bool

NeedsThrottling implements storage.SampleAppender.

func (*Ingester) Stop

func (i *Ingester) Stop()

Stop stops the Ingester.

Jump to

Keyboard shortcuts

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