cacheutil

package
v2.0.0-beta1+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MAXTTL int64 = 300

MAXTTL to remove plugin is stale for 5

Functions

func AddHeartBeat

func AddHeartBeat(instance string, value float64, ch chan<- prometheus.Metric)

AddHeartBeat ...

func AddMetricsByHostCount

func AddMetricsByHostCount(instance string, value float64, ch chan<- prometheus.Metric)

AddMetricsByHostCount ...

Types

type ApplicationHealthCache

type ApplicationHealthCache struct {
	QpidRouterState    int
	ElasticSearchState int
	LastAccess         int64 //timestamp in seconds
}

ApplicationHealthCache ...

func NewApplicationHealthCache

func NewApplicationHealthCache() *ApplicationHealthCache

NewApplicationHealthCache ..

type CacheServer

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

CacheServer ..

func NewCacheServer

func NewCacheServer(maxTTL int64, debug bool) *CacheServer

NewCacheServer ...

func (*CacheServer) GetCache

func (cs *CacheServer) GetCache() *IncomingDataCache

GetCache Get All hosts

func (*CacheServer) Put

func (cs *CacheServer) Put(incomingData incoming.MetricDataFormat)

Put ..

type IncomingBuffer

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

IncomingBuffer this is inut data send to cache server IncomingBuffer ..its of type collectd or anything else

type IncomingDataCache

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

IncomingDataCache cache server converts it into this

func NewCache

func NewCache(maxttl int64) IncomingDataCache

NewCache .. .

func (*IncomingDataCache) FlushAll

func (i *IncomingDataCache) FlushAll()

FlushAll Flush raw meterics data

func (IncomingDataCache) GetHosts

GetHosts locks the cache and returns the whole cache together with the lock. Caller needs to explicitly unlocks after the operation is done.

func (IncomingDataCache) GetShard

GetShard ..

func (IncomingDataCache) Put

func (i IncomingDataCache) Put(key string)

Put ..

func (IncomingDataCache) Size

func (i IncomingDataCache) Size() int

Size no of plugin per shard

type ShardedIncomingDataCache

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

ShardedIncomingDataCache types of sharded cache collectd, influxdb etc ShardedIncomingDataCache ..

func NewShardedIncomingDataCache

func NewShardedIncomingDataCache(maxttl int64) *ShardedIncomingDataCache

NewShardedIncomingDataCache .

func (*ShardedIncomingDataCache) Expired

func (shard *ShardedIncomingDataCache) Expired() bool

Expired ... add expired test

func (*ShardedIncomingDataCache) FlushAllMetrics

func (shard *ShardedIncomingDataCache) FlushAllMetrics()

FlushAllMetrics Generic Flushing metrics not used.. used only for testing

func (*ShardedIncomingDataCache) FlushPrometheusMetric

func (shard *ShardedIncomingDataCache) FlushPrometheusMetric(usetimestamp bool, ch chan<- prometheus.Metric) int

FlushPrometheusMetric generate Prometheus metrics

func (*ShardedIncomingDataCache) GetData

func (shard *ShardedIncomingDataCache) GetData(itemKey string) incoming.MetricDataFormat

GetData ...

func (*ShardedIncomingDataCache) GetLastAccess

func (shard *ShardedIncomingDataCache) GetLastAccess() int64

GetLastAccess ..Get last access time ...

func (*ShardedIncomingDataCache) SetData

SetData ... TODO : add generic TODO(mmagr): either don't export or maybe make sure data.Host has the same value as is saved under in DataCache

func (*ShardedIncomingDataCache) Size

func (shard *ShardedIncomingDataCache) Size() int

Size no of plugin per shard

Jump to

Keyboard shortcuts

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