appender

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const CHAN_SIZE = 4096
View Source
const MAX_LATE_WRITE = 59 * 3600 * 1000 // max late arrival of 59min
View Source
const MAX_WRITE_RETRY = 2

Variables

This section is empty.

Functions

func NewChunkStore

func NewChunkStore() *chunkStore

create a chunk store with two chunks (current, previous)

Types

type MetricState

type MetricState struct {
	sync.RWMutex
	Lset utils.LabelsIfc
	// contains filtered or unexported fields
}

to add, rollups policy (cnt, sum, min/max, sum^2) + interval , or policy in per name lable

func (*MetricState) Err

func (m *MetricState) Err() error

type MetricsCache

type MetricsCache struct {
	NameLabelMap map[string]bool // temp store all lable names
	// contains filtered or unexported fields
}

store the state and metadata for all the metrics

func NewMetricsCache

func NewMetricsCache(container *v3io.Container, logger logger.Logger, cfg *config.V3ioConfig,
	partMngr *partmgr.PartitionManager) *MetricsCache

func (*MetricsCache) Add

func (mc *MetricsCache) Add(lset utils.LabelsIfc, t int64, v interface{}) (uint64, error)

First time add time & value to metric (by label set)

func (*MetricsCache) AddFast

func (mc *MetricsCache) AddFast(ref uint64, t int64, v interface{}) error

fast Add to metric (by refId)

func (*MetricsCache) StartIfNeeded

func (mc *MetricsCache) StartIfNeeded() error

func (*MetricsCache) WaitForReady

func (mc *MetricsCache) WaitForReady(ref uint64) error

Jump to

Keyboard shortcuts

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