common

package
v3.0.0-...-69e43c1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EnvKey = EnvKeyType("env")

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)

Functions

This section is empty.

Types

type EnvKeyType

type EnvKeyType string
const (
	HostProcEnvKey EnvKeyType = "HOST_PROC"
	HostSysEnvKey  EnvKeyType = "HOST_SYS"
	HostEtcEnvKey  EnvKeyType = "HOST_ETC"
	HostVarEnvKey  EnvKeyType = "HOST_VAR"
	HostRunEnvKey  EnvKeyType = "HOST_RUN"
	HostDevEnvKey  EnvKeyType = "HOST_DEV"
	HostRootEnvKey EnvKeyType = "HOST_ROOT"
)

type EnvMap

type EnvMap map[EnvKeyType]string

Jump to

Keyboard shortcuts

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