package common
Import Path
github.com/shirou/gopsutil/v3/common (on go.dev)
Dependency Relation
imports 0 packages, and imported by one package
Involved Source Files
env.go
Package-Level Type Names (total 2)
var EnvKey
const HostDevEnvKey
const HostEtcEnvKey
const HostProcEnvKey
const HostRootEnvKey
const HostRunEnvKey
const HostSysEnvKey
const HostVarEnvKey
type EnvMap (map)
Package-Level Variables (only one)
EnvKey is a context key that can be used to set programmatically the environment
gopsutil relies on to perform calls against the OS.
Example of use:
ctx := context.WithValue(context.Background(), common.EnvKey, EnvMap{common.HostProcEnvKey: "/myproc"})
avg, err := load.AvgWithContext(ctx)
Package-Level Constants (total 7)
const HostDevEnvKey EnvKeyType = "HOST_DEV" const HostEtcEnvKey EnvKeyType = "HOST_ETC" const HostProcEnvKey EnvKeyType = "HOST_PROC" const HostRootEnvKey EnvKeyType = "HOST_ROOT" const HostRunEnvKey EnvKeyType = "HOST_RUN" const HostSysEnvKey EnvKeyType = "HOST_SYS" const HostVarEnvKey EnvKeyType = "HOST_VAR"![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |