Skip to content

Commit

Permalink
add more env keys
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme committed Jun 2, 2023
1 parent 177e1b1 commit 35657e3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion common/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@ type EnvKeyType string
// gopsutil relies on to perform calls against the OS.
// Example of use:
//
// ctx := context.WithValue(context.Background(), common.EnvKey, EnvMap{"HOST_PROC": "/myproc"})
// ctx := context.WithValue(context.Background(), common.EnvKey, EnvMap{common.HostProcEnvKey: "/myproc"})
// avg, err := load.AvgWithContext(ctx)
var EnvKey = EnvKeyType("env")

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 map[EnvKeyType]string

0 comments on commit 35657e3

Please sign in to comment.