cache

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2020 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Types

type History

type History struct {
	sync.RWMutex
	Data map[string]dataobj.MetricValue
}
var MetricHistory *History

func NewHistory

func NewHistory() *History

func (*History) Clean

func (h *History) Clean()

func (*History) Get

func (h *History) Get(key string) (dataobj.MetricValue, bool)

func (*History) Set

func (h *History) Set(key string, item dataobj.MetricValue)

type ProcessCache added in v1.4.0

type ProcessCache struct {
	sync.RWMutex
	Data map[int32]*process.Process
}
var ProcsCache *ProcessCache

func NewProcsCache added in v1.4.0

func NewProcsCache() *ProcessCache

func (*ProcessCache) Clean added in v1.4.0

func (pc *ProcessCache) Clean()

func (*ProcessCache) Get added in v1.4.0

func (pc *ProcessCache) Get(pid int32) (*process.Process, bool)

func (*ProcessCache) Set added in v1.4.0

func (pc *ProcessCache) Set(pid int32, p *process.Process)

Jump to

Keyboard shortcuts

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