prioritymap

package
v0.15.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPriority = LowPriority
View Source
const DefaultSeparator = "="
View Source
const HighPriority = 10
View Source
const LowPriority = 1
View Source
const MediumPriority = 5

Variables

This section is empty.

Functions

func Append

func Append[V ValueType](argMap *Map, value V, opts ...Option)

func ParseCommandLineArgument

func ParseCommandLineArgument(arg string) (string, string, string)

ParseCommandLineArgument splits strings in the format of "--param=value" up in its components "--param", "=" and "value". The separator is returned because to let the caller know if it was there

Types

type Map

type Map struct {
	// contains filtered or unexported fields
}

func New

func New(defaultOptions ...Option) *Map

func (Map) Append

func (m Map) Append(key string, value any, opts ...Option)

func (Map) AsEnvVars

func (m Map) AsEnvVars() []corev1.EnvVar

func (Map) AsKeyValueStrings

func (m Map) AsKeyValueStrings() []string

type Option

type Option func(a *entry)

func WithPriority

func WithPriority(priority int) Option

func WithSeparator

func WithSeparator(separator string) Option

type ValueType

type ValueType interface {
	corev1.EnvVar | []corev1.EnvVar | map[string]any | []string
}

Jump to

Keyboard shortcuts

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