cache

package
v0.0.0-...-b6b44b4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

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

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

func NewProcsCache

func NewProcsCache() *ProcessCache

func (*ProcessCache) Clean

func (pc *ProcessCache) Clean()

func (*ProcessCache) Get

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

func (*ProcessCache) Set

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