stats

package
v2.28.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendItem

type BackendItem struct {
	timeline.Backend
	Type          StorageType
	CycleDuration funks.Duration
	AddHostTag    bool
	CommonTags    map[string]string
}

BackendItem - one backend configuration

type Configuration

type Configuration struct {
	Backends         []BackendItem
	HashingAlgorithm hashing.Algorithm
	HashSize         int
	DataTTL          funks.Duration
	timeline.OpenTSDBTransportConfig
}

Configuration - configuration

type StorageType

type StorageType string

StorageType - the storage type constante

const (
	// Normal - normal storage backend
	Normal StorageType = "normal"

	// Archive - archive storage backend
	Archive StorageType = "archive"
)

type TimelineManager

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

TimelineManager - manages the configured number of timeline manager instances

func New

func New(configuration *Configuration) (*TimelineManager, error)

New - creates a new instance

func (*TimelineManager) AccumulateCustomHashN

func (tm *TimelineManager) AccumulateCustomHashN(hash string) (bool, error)

AccumulateCustomHashN - calls the accumulate function using normal storage

func (*TimelineManager) AccumulateHashedData

func (tm *TimelineManager) AccumulateHashedData(stype StorageType, hash string) (bool, error)

AccumulateHashedData - accumulates a hashed data

func (*TimelineManager) Flatten

func (tm *TimelineManager) Flatten(caller string, stype StorageType, op timeline.FlatOperation, value float64, metric string, tags ...interface{})

Flatten - performs a flatten operation

func (*TimelineManager) FlattenAvgN

func (tm *TimelineManager) FlattenAvgN(caller string, value float64, metric string, tags ...interface{})

FlattenAvgN - calls the Flatten function using normal storage and average operation

func (*TimelineManager) FlattenCountIncA

func (tm *TimelineManager) FlattenCountIncA(caller string, metric string, tags ...interface{})

FlattenCountIncA - calls the Flatten function using archive storage and count operation (adds 1 to the value)

func (*TimelineManager) FlattenCountIncN

func (tm *TimelineManager) FlattenCountIncN(caller string, metric string, tags ...interface{})

FlattenCountIncN - calls the Flatten function using normal storage and count operation (adds 1 to the value)

func (*TimelineManager) FlattenCountN

func (tm *TimelineManager) FlattenCountN(caller string, value float64, metric string, tags ...interface{})

FlattenCountN - calls the Flatten function using normal storage and count operation

func (*TimelineManager) FlattenMaxN

func (tm *TimelineManager) FlattenMaxN(caller string, value float64, metric string, tags ...interface{})

FlattenMaxN - calls the Flatten function using normal storage and maximum operation

func (*TimelineManager) FlattenMinN

func (tm *TimelineManager) FlattenMinN(caller string, value float64, metric string, tags ...interface{})

FlattenMinN - calls the Flatten function using normal storage and minimum operation

func (*TimelineManager) Shutdown

func (tm *TimelineManager) Shutdown()

Shutdown - shuts down the timeline manager

func (*TimelineManager) Start

func (tm *TimelineManager) Start() error

Start - starts the timeline manager

func (*TimelineManager) StoreCustomHashN

func (tm *TimelineManager) StoreCustomHashN(hash string, metric string, tags ...interface{}) error

StoreCustomHashN - calls the store hash function using normal storage

func (*TimelineManager) StoreHashedData

func (tm *TimelineManager) StoreHashedData(stype StorageType, hash string, ttl time.Duration, metric string, tags ...interface{}) error

StoreHashedData - stores the hashed data

func (*TimelineManager) StoreNoTTLCustomHashN

func (tm *TimelineManager) StoreNoTTLCustomHashN(hash string, metric string, tags ...interface{}) error

StoreNoTTLCustomHashN - calls the store hash function using normal storage with no ttl

Jump to

Keyboard shortcuts

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