Skip to main content

GetContextEnvVars

No overview available.

def GetContextEnvVars(
ownerCtx: context.Context
) - > []v1.EnvVar

Retrieves environment variables from the provided context. This function is used to inject useful environment variables, such as the workflow ID, into the execution environment.

Parameters​

NameTypeDescription
ownerCtxcontext.ContextThe context from which to extract environment variables. This context is expected to contain values like the workflow ID.

Returns​

TypeDescription
[]v1.EnvVarA slice of environment variables extracted from the context. Returns an empty slice if the context is nil or no relevant environment variables are found.