Documentation
¶
Index ¶
- func CustomerEnvironmentVariables() map[string]string
- func SplitEnvironmentVariable(envKeyVal string) (string, string, error)
- type Environment
- func (e *Environment) AgentExecEnv() map[string]string
- func (e *Environment) GetExecutionEnv() string
- func (e *Environment) RuntimeExecEnv() map[string]string
- func (e *Environment) SetExecutionEnv(executionEnv string)
- func (e *Environment) SetHandler(handler string)
- func (e *Environment) SetRuntimeDir(runtimeDir string)
- func (e *Environment) SetTaskRoot(taskRoot string)
- func (e *Environment) StoreEnvironmentVariablesFromCLIOptions(envVars map[string]string)
- func (e *Environment) StoreEnvironmentVariablesFromInit(customerEnv map[string]string, ...)
- func (e *Environment) StoreEnvironmentVariablesFromInitForInitCaching(host string, port int, customerEnv map[string]string, ...)
- func (e *Environment) StoreRuntimeAPIEnvironmentVariable(runtimeAPIAddress string)
- type RapidConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CustomerEnvironmentVariables ¶
CustomerEnvironmentVariables parses all environment variables that are not internal/credential/platform, and must be called before agent bootstrap.
Types ¶
type Environment ¶
type Environment struct {
Customer map[string]string // customer & unreserved platform env vars, set on INIT
// contains filtered or unexported fields
}
Environment holds env vars for runtime, agents, and for internal use, parsed during startup and from START msg
func NewEnvironment ¶
func NewEnvironment() *Environment
NewEnvironment parses environment variables into an Environment object
func (*Environment) AgentExecEnv ¶
func (e *Environment) AgentExecEnv() map[string]string
AgentExecEnv returns the key=value strings of all environment variables passed to agent process on exec()
func (*Environment) GetExecutionEnv ¶
func (e *Environment) GetExecutionEnv() string
GetExecutionEnv returns the current setting for AWS_EXECUTION_ENV
func (*Environment) RuntimeExecEnv ¶
func (e *Environment) RuntimeExecEnv() map[string]string
RuntimeExecEnv returns the key=value strings of all environment variables passed to runtime process on exec()
func (*Environment) SetExecutionEnv ¶
func (e *Environment) SetExecutionEnv(executionEnv string)
SetExecutionEnv sets AWS_EXECUTION_ENV variable value for Runtime
func (*Environment) SetHandler ¶
func (e *Environment) SetHandler(handler string)
SetHandler sets _HANDLER env variable value for Runtime
func (*Environment) SetRuntimeDir ¶
func (e *Environment) SetRuntimeDir(runtimeDir string)
SetRuntimeDir sets the LAMBDA_RUNTIME_DIR environment variable for Runtime
func (*Environment) SetTaskRoot ¶
func (e *Environment) SetTaskRoot(taskRoot string)
SetTaskRoot sets the LAMBDA_TASK_ROOT environment variable for Runtime
func (*Environment) StoreEnvironmentVariablesFromCLIOptions ¶
func (e *Environment) StoreEnvironmentVariablesFromCLIOptions(envVars map[string]string)
StoreEnvironmentVariablesFromCLIOptions sets the environment variables received via a CLI flag, for example LCIS config
func (*Environment) StoreEnvironmentVariablesFromInit ¶
func (e *Environment) StoreEnvironmentVariablesFromInit(customerEnv map[string]string, handler, awsKey, awsSecret, awsSession, funcName, funcVer string)
StoreEnvironmentVariablesFromInit sets the environment variables for credentials & _HANDLER which are received in the START message
func (*Environment) StoreEnvironmentVariablesFromInitForInitCaching ¶
func (*Environment) StoreRuntimeAPIEnvironmentVariable ¶
func (e *Environment) StoreRuntimeAPIEnvironmentVariable(runtimeAPIAddress string)
StoreRuntimeAPIEnvironmentVariable stores value for AWS_LAMBDA_RUNTIME_API
type RapidConfig ¶
type RapidConfig struct {
SbID string
LogFd int
ShmFd int
CtrlFd int
CnslFd int
DirectInvokeFd int
LambdaTaskRoot string
XrayDaemonAddress string
PreLoadTimeNs int64
FunctionName string
TelemetryAPIPassphrase string
}
RapidConfig holds config req'd for RAPID's internal operation, parsed from internal env vars. It should be build using `NewRapidConfig` to make sure that all the internal invariants are respected.
func NewRapidConfig ¶
func NewRapidConfig(e *Environment) RapidConfig
Build the `RapidConfig` struct checking all the internal invariants