cacheutil

package
v0.0.0-...-771c5c2 Latest Latest
Warning

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

Go to latest
Published: May 25, 2018 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 ...

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) GenrateSampleData

func (cs *CacheServer) GenrateSampleData(key string, itemCount int, datatype incoming.DataTypeInterface)

GenrateSampleData ....

func (*CacheServer) GetCache

func (cs *CacheServer) GetCache() *IncomingDataCache

GetCache Get All hosts

func (*CacheServer) Put

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

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 Get All hosts

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(ch chan<- prometheus.Metric) bool

FlushPrometheusMetric generate Prometheus metrics

func (*ShardedIncomingDataCache) GetData

func (shard *ShardedIncomingDataCache) GetData(pluginname string) incoming.DataTypeInterface

GetData ..

func (*ShardedIncomingDataCache) GetLastAccess

func (shard *ShardedIncomingDataCache) GetLastAccess() int64

GetLastAccess ..Get last access time ...

func (*ShardedIncomingDataCache) SetData

SetData TODO : add generic

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