Documentation
¶
Overview ¶
Package shellenvservice persists the operator-defined environment variables contenox injects into shells it spawns, layered on top of the environment scrub so they always win. Values are plaintext in the kv table, so no secrets belong here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidName = errors.New("shellenvservice: invalid environment variable name")
ErrInvalidName is returned when a variable name is not a usable environment variable name.
Functions ¶
func ValidEnvName ¶
ValidEnvName reports whether name is a usable environment-variable name: a non-empty run of ASCII letters, digits and underscores, not starting with a digit.
Types ¶
type Service ¶
type Service interface {
// Get returns the global variables — an empty (never nil) map when none are
// set, so a caller can range over it unconditionally.
Get(ctx context.Context) (map[string]string, error)
// Set replaces the global variables with vars after validating every name. An
// empty map clears them.
Set(ctx context.Context, vars map[string]string) error
}
Service reads and writes the global shell-env variable map.
Click to show internal directories.
Click to hide internal directories.