Documentation
¶
Index ¶
- Constants
- Variables
- type BackendItem
- type Configuration
- type CustomJSONMapping
- type HTTPTransportConfigExt
- type Instance
- func (tm *Instance) AccumulateCustomHashN(hash string) (bool, error)
- func (tm *Instance) AccumulateHashedData(stype StorageType, hash string) (bool, error)
- func (tm *Instance) FlattenAvgN(caller string, value float64, metric string, tags ...interface{})
- func (tm *Instance) FlattenCountIncA(caller string, metric string, tags ...interface{})
- func (tm *Instance) FlattenCountIncN(caller string, metric string, tags ...interface{})
- func (tm *Instance) FlattenCountN(caller string, value float64, metric string, tags ...interface{})
- func (tm *Instance) FlattenMaxN(caller string, value float64, metric string, tags ...interface{})
- func (tm *Instance) FlattenMinN(caller string, value float64, metric string, tags ...interface{})
- func (tm *Instance) GetConfiguredDataTTL() time.Duration
- func (tm *Instance) Send(caller string, stype StorageType, op timeline.FlatOperation, value float64, ...) error
- func (tm *Instance) SendCustomJSON(caller string, stype StorageType, mappingName string, variables ...interface{}) error
- func (tm *Instance) SendT(caller string, stype StorageType, op timeline.FlatOperation, value float64, ...) error
- func (tm *Instance) SendText(caller string, stype StorageType, value, metric string, tags ...interface{}) error
- func (tm *Instance) SendTextT(caller string, stype StorageType, value, metric string, timestamp int64, ...) error
- func (tm *Instance) Shutdown()
- func (tm *Instance) Start() error
- func (tm *Instance) StoreCustomHashN(hash string, metric string, tags ...interface{}) error
- func (tm *Instance) StoreDefaultTTLCustomHash(storage StorageType, hash string, metric string, tags ...interface{}) error
- func (tm *Instance) StoreHashedData(stype StorageType, hash string, ttl time.Duration, metric string, ...) error
- func (tm *Instance) StoreNoTTLCustomHashN(hash string, metric string, tags ...interface{}) error
- type OpenTSDBTransportConfigExt
- type SerializerType
- type StorageType
- type TransportExt
- type TransportType
- type UDPTransportConfigExt
Constants ¶
const ( // NormalStorage - normal storage backend NormalStorage StorageType = "normal" // ArchiveStorage - archive storage backend ArchiveStorage StorageType = "archive" // HTTPTransport - http transport type HTTPTransport TransportType = "http" // OpenTSDBTransport - opentsdb transport type OpenTSDBTransport TransportType = "opentsdb" // UDPTransport - udp transport type UDPTransport TransportType = "udp" // JSONSerializer - json serializer type JSONSerializer SerializerType = "json" // OpenTSDBSerializer - opentsdb serializer type OpenTSDBSerializer SerializerType = "opentsdb" )
const ( // RawJSON - defines a no flattened operation RawJSON timeline.FlatOperation = 100 // RawOpenTSDB - defines a no flattened operation RawOpenTSDB timeline.FlatOperation = 101 )
Variables ¶
var ErrStorageNotFound error = fmt.Errorf("storage type not found")
ErrStorageNotFound - raised when a storage type was not found
var ErrTransportNotSupported error = fmt.Errorf("transport not supported")
ErrTransportNotSupported - raised when a transport is not supported for the specified storage
Functions ¶
This section is empty.
Types ¶
type BackendItem ¶
type BackendItem struct {
timeline.Backend
Storage StorageType `json:"storage,omitempty"`
CycleDuration funks.Duration `json:"cycleDuration,omitempty"`
AddHostTag bool `json:"addHostTag,omitempty"`
CommonTags map[string]string `json:"commonTags,omitempty"`
Transport string `json:"transport,omitempty"`
// contains filtered or unexported fields
}
BackendItem - one backend configuration
type Configuration ¶
type Configuration struct {
Backends []BackendItem `json:"backends,omitempty"`
HashingAlgorithm hashing.Algorithm `json:"hashingAlgorithm,omitempty"`
HashSize int `json:"hashSize,omitempty"`
DataTTL funks.Duration `json:"dataTTL,omitempty"`
timeline.DefaultTransportConfig
OpenTSDBTransports map[string]OpenTSDBTransportConfigExt `json:"openTSDBTransports,omitempty"`
HTTPTransports map[string]HTTPTransportConfigExt `json:"httpTransports,omitempty"`
UDPTransports map[string]UDPTransportConfigExt `json:"udpTransports,omitempty"`
}
Configuration - configuration
func (*Configuration) Validate ¶ added in v1.2.1
func (c *Configuration) Validate() error
Validate - validates the configuration
type CustomJSONMapping ¶ added in v1.4.1
type CustomJSONMapping struct {
MappingName string `json:"mappingName,omitempty"`
Instance interface{} `json:"instance,omitempty"`
Variables []string `json:"variables,omitempty"`
}
CustomJSONMapping - a custom json mapping to be added
type HTTPTransportConfigExt ¶ added in v1.4.1
type HTTPTransportConfigExt struct {
TransportExt
timeline.HTTPTransportConfig
}
HTTPTransportConfigExt - an extension to the timeline.HTTPTransportConfig
type Instance ¶ added in v1.2.0
type Instance struct {
// contains filtered or unexported fields
}
Instance - manages the configured number of timeline manager instances
func (*Instance) AccumulateCustomHashN ¶ added in v1.2.0
AccumulateCustomHashN - calls the accumulate function using normal storage
func (*Instance) AccumulateHashedData ¶ added in v1.2.0
func (tm *Instance) AccumulateHashedData(stype StorageType, hash string) (bool, error)
AccumulateHashedData - accumulates a hashed data
func (*Instance) FlattenAvgN ¶ added in v1.2.0
FlattenAvgN - calls the Flatten function using normal storage and average operation
func (*Instance) FlattenCountIncA ¶ added in v1.2.0
FlattenCountIncA - calls the Flatten function using archive storage and count operation (adds 1 to the value)
func (*Instance) FlattenCountIncN ¶ added in v1.2.0
FlattenCountIncN - calls the Flatten function using normal storage and count operation (adds 1 to the value)
func (*Instance) FlattenCountN ¶ added in v1.2.0
FlattenCountN - calls the Flatten function using normal storage and count operation
func (*Instance) FlattenMaxN ¶ added in v1.2.0
FlattenMaxN - calls the Flatten function using normal storage and maximum operation
func (*Instance) FlattenMinN ¶ added in v1.2.0
FlattenMinN - calls the Flatten function using normal storage and minimum operation
func (*Instance) GetConfiguredDataTTL ¶ added in v1.2.0
GetConfiguredDataTTL - returns the configured data ttl
func (*Instance) Send ¶ added in v1.2.0
func (tm *Instance) Send(caller string, stype StorageType, op timeline.FlatOperation, value float64, metric string, tags ...interface{}) error
Send - send a point or do a flatten operation
func (*Instance) SendCustomJSON ¶ added in v1.4.1
func (tm *Instance) SendCustomJSON(caller string, stype StorageType, mappingName string, variables ...interface{}) error
SendCustomJSON - send a custom json point
func (*Instance) SendT ¶ added in v1.6.2
func (tm *Instance) SendT(caller string, stype StorageType, op timeline.FlatOperation, value float64, metric string, timestamp int64, tags ...interface{}) error
SendT - send a point or do a flatten operation with specific timestamp
func (*Instance) SendText ¶ added in v1.2.0
func (tm *Instance) SendText(caller string, stype StorageType, value, metric string, tags ...interface{}) error
SendText - send a text point
func (*Instance) SendTextT ¶ added in v1.6.2
func (tm *Instance) SendTextT(caller string, stype StorageType, value, metric string, timestamp int64, tags ...interface{}) error
SendTextT - send a text point with specific timestamp
func (*Instance) Shutdown ¶ added in v1.2.0
func (tm *Instance) Shutdown()
Shutdown - shuts down the timeline manager
func (*Instance) StoreCustomHashN ¶ added in v1.2.0
StoreCustomHashN - calls the store hash function using normal storage
func (*Instance) StoreDefaultTTLCustomHash ¶ added in v1.2.0
func (tm *Instance) StoreDefaultTTLCustomHash(storage StorageType, hash string, metric string, tags ...interface{}) error
StoreDefaultTTLCustomHash - stores with default configured ttl
func (*Instance) StoreHashedData ¶ added in v1.2.0
func (tm *Instance) StoreHashedData(stype StorageType, hash string, ttl time.Duration, metric string, tags ...interface{}) error
StoreHashedData - stores the hashed data
type OpenTSDBTransportConfigExt ¶ added in v1.5.0
type OpenTSDBTransportConfigExt struct {
timeline.OpenTSDBTransportConfig
}
OpenTSDBTransportConfigExt - an extension to the timeline.OpenTSDBTransportConfig
type SerializerType ¶ added in v1.6.0
type SerializerType string
SerializerType - the serializer type constant
type TransportExt ¶ added in v1.5.0
type TransportExt struct {
Serializer SerializerType `json:"serializer,omitempty"`
JSONMappings []CustomJSONMapping `json:"jsonMappings,omitempty"`
}
TransportExt - an transport extension
type TransportType ¶ added in v1.2.0
type TransportType string
TransportType - the transport type constant
type UDPTransportConfigExt ¶ added in v1.6.0
type UDPTransportConfigExt struct {
TransportExt
timeline.UDPTransportConfig
}
UDPTransportConfigExt - an extension to the timeline.UDPTransportConfig