Documentation ¶
Index ¶
- func CastAsStringMap(input map[string]interface{}) (map[string]string, error)
- func InferTypedMap(in map[string]string) map[string]interface{}
- func ParseKeyValues(in []string) (res map[string]string, err error)
- func ToEnvVar(input map[string]string) []v1.EnvVar
- func ToOptionsSlice(input map[string]string) []string
- func ToUlimits(input []string) ([]*units.Ulimit, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CastAsStringMap ¶
CastAsStringMap takes a map[string]interface{} and down-casts it to a map[string]string asserting that all values are strings.
func InferTypedMap ¶
InferTypedMap takes a map[string]string and attempts to infer the value types, converting the input to a map[string]interface{}.
func ParseKeyValues ¶
ParseKeyValues converts a slice of ["KEY1=VAL1", "KEY2=VAL2", ...] dictionary values into a map[string]string, reporting errors if the input is malformed.
func ToOptionsSlice ¶
ToOptionsSlice takes an options map and returns a slice of form ["KEY1=VAL1", "KEY2=VAL2", ...], suitable for Docker commands.
func ToUlimits ¶
ToUlimits converts a slice of strings following the Docker ulimit format, to the appropriate type. If parsing fails, this function shortcircuits and returns an error.
See https://docs.docker.com/engine/reference/commandline/run/#set-ulimits-in-container---ulimit for more info on format.
Types ¶
This section is empty.