Documentation
¶
Overview ¶
Package appenv is how a run finds the application environment it executes in (#2696): the version that environment's release pins and its variables.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoEnvironment = errors.New("the application has no such environment")
ErrNoEnvironment is an environment the application does not have.
Functions ¶
func ForRun ¶
func ForRun(ctx context.Context, r Resolver, scriptID, env string) (name string, vars map[string]string, err error)
ForRun is the environment a run of scriptID in env ("" for the last) executes in and its variables, read when the run executes so a variable changed since it was queued is the one it sees. A script no application holds runs in none; a nil resolver resolves nothing.
func RunVersionIn ¶
RunVersionIn is the version a run of sc in env executes. The last environment, named "", is what the script's released version already holds, read with no lookup; any other is the version that environment's release pins, refused when sc belongs to no application, the application has no such environment, or its release pins no version of sc.