package
Version:
v1.47.0
Opens a new window with list of versions in this module.
Published: Jul 10, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 24
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
View Source
const (
Base = 10
Bitwise = 30
Duration = "0s"
GB = "GB"
Milli = 1000
Current = "."
Parent = ".."
Root = "/"
Dev = "/dev/"
Home = "/home"
)
type Entry struct {
Name string `json:"name"`
IsDir bool `json:"isDir"`
Size int64 `json:"size"`
Time string `json:"time"`
User string `json:"user"`
Group string `json:"group"`
Mode string `json:"mode"`
}
type Glance interface {
Init(context.Context) error
Deinit(context.Context) error
Dir(context.Context, string) ([]Entry, error)
File(context.Context, string, int64) (string, bool, error)
Sys(context.Context) (Resource, Resource, Stats, Stats, Stats, []Process, string, string, error)
}
type Process struct {
Process Thread `json:"process"`
Threads []Thread `json:"threads"`
}
type Resource struct {
MilliCPU int64 `json:"milliCPU"`
Memory int64 `json:"memory"`
Storage int64 `json:"storage"`
}
type Stats struct {
Total string `json:"total"`
Used string `json:"used"`
}
type Thread struct {
Name string `json:"name"`
Cmdline string `json:"cmdline"`
Memory int64 `json:"memory"`
Time float64 `json:"time"`
Pid int64 `json:"pid"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.