Versions in this module Expand all Collapse all v1 v1.4.0 Jun 13, 2020 Changes in this version type EndpointIndexMap + func (e *EndpointIndexMap) DelByEndpoint(endpoint string) v1.3.3 Apr 25, 2020 v1.3.0 Apr 14, 2020 v1.2.4 Apr 13, 2020 v1.2.3 Apr 13, 2020 v1.2.2 Apr 10, 2020 v1.2.1 Apr 8, 2020 v1.2.0 Apr 2, 2020 v1.1.0 Mar 29, 2020 v1.0.3 Mar 27, 2020 v1.0.2 Mar 25, 2020 v1.0.1 Mar 19, 2020 v1.0.0 Mar 16, 2020 Changes in this version + var NewEndpoints *list.SafeListLimited + func GetAllCounter(tags []*TagPair) []string + func IndexList() []*model.Instance + func InitDB(cfg CacheSection) + func OverMaxLimit(tagMap map[string][]string, limit int) bool + func Persist(mode string) error + func Rebuild(persistenceDir string, concurrency int) + func RebuildFromDisk(indexFileDir string, concurrency int) error + func ReportEndpoint() + func StartCleaner(interval int, cacheDuration int) + func StartPersist(interval int) + func TagPairToMap(tagPairs []*TagPair) map[string][]string + func WriteIndexToFile(indexDir, endpoint string) error + type CacheSection struct + CacheDuration int + CleanInterval int + MaxQueryCount int + PersistDir string + PersistInterval int + RebuildWorker int + ReportEndpoint bool + var Config CacheSection + type CounterTsMap struct + M map[string]int64 + func NewCounterTsMap() *CounterTsMap + func (c *CounterTsMap) Clean(now, timeDuration int64, endpoint, metric string) + func (c *CounterTsMap) GetCounters() map[string]int64 + func (c *CounterTsMap) Len() int + func (c *CounterTsMap) Set(counter string, ts int64) + type EndpointIndexMap struct + M map[string]*MetricIndexMap + var IndexDB *EndpointIndexMap + func (e *EndpointIndexMap) Clean(timeDuration int64) + func (e *EndpointIndexMap) GetEndpoints() []string + func (e *EndpointIndexMap) GetIndexByClude(endpoint, metric string, include, exclude []*TagPair) ([]string, error) + func (e *EndpointIndexMap) GetMetricIndex(endpoint, metric string) (*MetricIndex, bool) + func (e *EndpointIndexMap) GetMetricIndexMap(endpoint string) (*MetricIndexMap, bool) + func (e *EndpointIndexMap) GetMetricsBy(endpoint string) []string + func (e *EndpointIndexMap) Push(item dataobj.IndexModel, now int64) + func (e *EndpointIndexMap) SetMetricIndexMap(endpoint string, metricIndex *MetricIndexMap) + type MetricIndex struct + CounterMap *CounterTsMap + DsType string + Metric string + Step int + TagkvMap *TagkvIndex + Ts int64 + func NewMetricIndex(item dataobj.IndexModel, counter string, now int64) *MetricIndex + func (m *MetricIndex) Set(item dataobj.IndexModel, counter string, now int64) + type MetricIndexMap struct + Data map[string]*MetricIndex + Reported bool + func ReadIndexFromFile(indexDir, endpoint string) (*MetricIndexMap, error) + func (m *MetricIndexMap) Clean(now, timeDuration int64, endpoint string) + func (m *MetricIndexMap) DelMetric(metric string) + func (m *MetricIndexMap) GetMetricIndex(metric string) (*MetricIndex, bool) + func (m *MetricIndexMap) GetMetrics() []string + func (m *MetricIndexMap) IsReported() bool + func (m *MetricIndexMap) Len() int + func (m *MetricIndexMap) SetMetricIndex(metric string, metricIndex *MetricIndex) + func (m *MetricIndexMap) SetReported() + type TagPair struct + Key string + Values []string + func GetSortTags(tagMap map[string][]string) []*TagPair + type TagPairs []*TagPair + func (t TagPairs) Len() int + func (t TagPairs) Less(i, j int) bool + func (t TagPairs) Swap(i, j int) + type TagkvIndex struct + Tagkv map[string]map[string]int64 + func NewTagkvIndex() *TagkvIndex + func (t *TagkvIndex) Clean(now, timeDuration int64) + func (t *TagkvIndex) DelTag(tagk, tagv string) + func (t *TagkvIndex) GetTagkv() []*TagPair + func (t *TagkvIndex) GetTagkvMap() map[string][]string + func (t *TagkvIndex) Len() int + func (t *TagkvIndex) Set(tagk, tagv string, now int64)