cache

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2019 License: MIT Imports: 9 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheManager

type CacheManager interface {
	SearchStats() SearchStatsCache
	Close()
}

func NewCacheManagerImpl

func NewCacheManagerImpl(mdb *sql.DB, refreshIntervals map[string]time.Duration) CacheManager

type CacheManagerImpl

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

func (*CacheManagerImpl) Close

func (cm *CacheManagerImpl) Close()

func (*CacheManagerImpl) SearchStats

func (cm *CacheManagerImpl) SearchStats() SearchStatsCache

type ClassByTypeStats

type ClassByTypeStats map[string]Histogram

type Histogram

type Histogram map[string]int

func (Histogram) Increment

func (h Histogram) Increment(k string, v int)

func (Histogram) Merge

func (h Histogram) Merge(other Histogram)

type Provider

type Provider interface {
	Refreshable
	String() string
}

type Refreshable

type Refreshable interface {
	Refresh() error
}

type SearchStatsCache

type SearchStatsCache interface {
	Provider
	IsTagWithUnits(uid string, cts ...string) bool
	IsTagWithEnoughUnits(uid string, count int, cts ...string) bool
	IsSourceWithUnits(uid string, cts ...string) bool
	IsSourceWithEnoughUnits(uid string, count int, cts ...string) bool
}

func NewSearchStatsCacheImpl

func NewSearchStatsCacheImpl(mdb *sql.DB) SearchStatsCache

type SearchStatsCacheImpl

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

func (*SearchStatsCacheImpl) IsSourceWithEnoughUnits added in v1.5.2

func (ssc *SearchStatsCacheImpl) IsSourceWithEnoughUnits(uid string, count int, cts ...string) bool

func (*SearchStatsCacheImpl) IsSourceWithUnits

func (ssc *SearchStatsCacheImpl) IsSourceWithUnits(uid string, cts ...string) bool

func (*SearchStatsCacheImpl) IsTagWithEnoughUnits added in v1.5.2

func (ssc *SearchStatsCacheImpl) IsTagWithEnoughUnits(uid string, count int, cts ...string) bool

func (*SearchStatsCacheImpl) IsTagWithUnits

func (ssc *SearchStatsCacheImpl) IsTagWithUnits(uid string, cts ...string) bool

func (*SearchStatsCacheImpl) Refresh

func (ssc *SearchStatsCacheImpl) Refresh() error

func (*SearchStatsCacheImpl) String

func (ssc *SearchStatsCacheImpl) String() string

type StatsNode

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

type StatsTree

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

func NewStatsTree

func NewStatsTree() *StatsTree

Jump to

Keyboard shortcuts

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