Documentation ¶
Index ¶
- type BackendItem
- type Configuration
- type StorageType
- type TimelineManager
- func (tm *TimelineManager) AccumulateCustomHashN(hash string) (bool, error)
- func (tm *TimelineManager) AccumulateHashedData(stype StorageType, hash string) (bool, error)
- func (tm *TimelineManager) Flatten(caller string, stype StorageType, op timeline.FlatOperation, value float64, ...)
- func (tm *TimelineManager) FlattenAvgN(caller string, value float64, metric string, tags ...interface{})
- func (tm *TimelineManager) FlattenCountIncA(caller string, metric string, tags ...interface{})
- func (tm *TimelineManager) FlattenCountIncN(caller string, metric string, tags ...interface{})
- func (tm *TimelineManager) FlattenCountN(caller string, value float64, metric string, tags ...interface{})
- func (tm *TimelineManager) FlattenMaxN(caller string, value float64, metric string, tags ...interface{})
- func (tm *TimelineManager) FlattenMinN(caller string, value float64, metric string, tags ...interface{})
- func (tm *TimelineManager) Shutdown()
- func (tm *TimelineManager) Start() error
- func (tm *TimelineManager) StoreCustomHashN(hash string, metric string, tags ...interface{}) error
- func (tm *TimelineManager) StoreHashedData(stype StorageType, hash string, ttl time.Duration, metric string, ...) error
- func (tm *TimelineManager) StoreNoTTLCustomHashN(hash string, metric string, tags ...interface{}) error
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