env

package
v0.0.0-...-4fa2157 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomerEnvironmentVariables

func CustomerEnvironmentVariables() map[string]string

CustomerEnvironmentVariables parses all environment variables that are not internal/credential/platform, and must be called before agent bootstrap.

func SplitEnvironmentVariable

func SplitEnvironmentVariable(envKeyVal string) (string, string, error)

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 (e *Environment) StoreEnvironmentVariablesFromInitForInitCaching(host string, port int, customerEnv map[string]string, handler, funcName, funcVer, token string)

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

Jump to

Keyboard shortcuts

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