downsample

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2018 License: Apache-2.0 Imports: 44 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Downsampler

type Downsampler interface {
	NewMetricsAppender() MetricsAppender
}

Downsampler is a downsampler.

func NewDownsampler

func NewDownsampler(
	opts DownsamplerOptions,
) (Downsampler, error)

NewDownsampler returns a new downsampler.

type DownsamplerOptions

type DownsamplerOptions struct {
	Storage                 storage.Storage
	StorageFlushConcurrency int
	RulesKVStore            kv.Store
	AutoMappingRules        []MappingRule
	NameTag                 string
	ClockOptions            clock.Options
	InstrumentOptions       instrument.Options
	TagEncoderOptions       serialize.TagEncoderOptions
	TagDecoderOptions       serialize.TagDecoderOptions
	TagEncoderPoolOptions   pool.ObjectPoolOptions
	TagDecoderPoolOptions   pool.ObjectPoolOptions
	OpenTimeout             time.Duration
}

DownsamplerOptions is a set of required downsampler options.

type MappingRule added in v0.4.4

type MappingRule struct {
	Aggregations []aggregation.Type
	Policies     policy.StoragePolicies
}

MappingRule is a mapping rule to apply to metrics.

func (MappingRule) StagedMetadatas added in v0.4.4

func (r MappingRule) StagedMetadatas() (metadata.StagedMetadatas, error)

StagedMetadatas returns the corresponding staged metadatas for this mapping rule.

type MetricsAppender

type MetricsAppender interface {
	AddTag(name, value string)
	SamplesAppender() (SamplesAppender, error)
	Reset()
	Finalize()
}

MetricsAppender is a metrics appender that can build a samples appender, only valid to use with a single caller at a time.

type SamplesAppender

type SamplesAppender interface {
	AppendCounterSample(value int64) error
	AppendGaugeSample(value float64) error
}

SamplesAppender is a downsampling samples appender, that can only be called by a single caller at a time.

Jump to

Keyboard shortcuts

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