Documentation ¶
Index ¶
- Variables
- func GetMemInfo(f io.ReadSeeker) (uint64, uint64, error)
- func NewCPULazy(done chan struct{}, conf rescommon.ResourceConfiger, dur time.Duration) (rescommon.ResourceViewer, error)
- func NewCPUSimple() (rescommon.ResourceViewer, error)
- func NewMemLazy(done chan struct{}, conf rescommon.ResourceConfiger, dur time.Duration) (rescommon.ResourceViewer, error)
- func NewMemSimple() (rescommon.ResourceViewer, error)
- type CPUOSLazy
- type CPUOSSimple
- type MemOSLazy
- type MemOSSimple
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotOSCPU = errors.New("not contain cpu") ErrOSCPUParseErrNoInfo = errors.New("stat does not contain cpu info") )
View Source
var ( ErrUnknownScanErr = errors.New("scan failed") ErrNoMemInfoFile = errors.New("not /proc/meminfo file") )
Functions ¶
func GetMemInfo ¶ added in v0.1.5
func GetMemInfo(f io.ReadSeeker) (uint64, uint64, error)
func NewCPULazy ¶
func NewCPULazy( done chan struct{}, conf rescommon.ResourceConfiger, dur time.Duration, ) (rescommon.ResourceViewer, error)
func NewCPUSimple ¶
func NewCPUSimple() (rescommon.ResourceViewer, error)
func NewMemLazy ¶
func NewMemLazy( done chan struct{}, conf rescommon.ResourceConfiger, dur time.Duration, ) (rescommon.ResourceViewer, error)
func NewMemSimple ¶
func NewMemSimple() (rescommon.ResourceViewer, error)
Types ¶
type CPUOSSimple ¶
type CPUOSSimple struct {
// contains filtered or unexported fields
}
func (*CPUOSSimple) Used ¶
func (cpu *CPUOSSimple) Used() float64
type MemOSSimple ¶
type MemOSSimple struct{}
func (*MemOSSimple) Used ¶
func (mem *MemOSSimple) Used() float64
Click to show internal directories.
Click to hide internal directories.