env

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuildEnvIncludelist = []string{
	"CNB_STACK_ID",
	"HOSTNAME",
	"HOME",
	"HTTPS_PROXY",
	"https_proxy",
	"HTTP_PROXY",
	"http_proxy",
	"NO_PROXY",
	"no_proxy",
}
View Source
var LaunchEnvExcludelist = []string{
	"CNB_LAYERS_DIR",
	"CNB_APP_DIR",
	"CNB_PROCESS_TYPE",
	"CNB_PLATFORM_API",
	"CNB_DEPRECATION_MODE",
}
View Source
var POSIXBuildEnv = map[string][]string{
	"bin": {
		"PATH",
	},
	"lib": {
		"LD_LIBRARY_PATH",
		"LIBRARY_PATH",
	},
	"include": {
		"CPATH",
	},
	"pkgconfig": {
		"PKG_CONFIG_PATH",
	},
}
View Source
var POSIXLaunchEnv = map[string][]string{
	"bin": {"PATH"},
	"lib": {"LD_LIBRARY_PATH"},
}

Functions

This section is empty.

Types

type Env

type Env struct {
	RootDirMap map[string][]string
	Vars       *Vars
}

func NewBuildEnv

func NewBuildEnv(environ []string) *Env

func NewLaunchEnv

func NewLaunchEnv(environ []string, processDir string, lifecycleDir string) *Env

NewLaunchEnv returns an Env for process launch from the given environ.

Keys in the LaunchEnvExcludelist shall be removed. processDir will be removed from the beginning of PATH if present.

func (*Env) AddEnvDir

func (p *Env) AddEnvDir(envDir string) error

func (*Env) AddRootDir

func (p *Env) AddRootDir(baseDir string) error

func (*Env) Get added in v0.7.1

func (p *Env) Get(k string) string

Get returns the value for the given key

func (*Env) List

func (p *Env) List() []string

func (*Env) WithPlatform

func (p *Env) WithPlatform(platformDir string) (out []string, err error)

type Vars added in v0.9.0

type Vars struct {
	// contains filtered or unexported fields
}

func NewVars added in v0.9.0

func NewVars(vars map[string]string, ignoreCase bool) *Vars

func (*Vars) Get added in v0.9.0

func (s *Vars) Get(key string) string

func (*Vars) List added in v0.9.0

func (s *Vars) List() []string

func (*Vars) Set added in v0.9.0

func (s *Vars) Set(key, value string)

Jump to

Keyboard shortcuts

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