prioritymap

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 5 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 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 WithAllowDuplicates added in v1.1.0

func WithAllowDuplicates() Option

WithAllowDuplicatesForKey allows to add multiple values for the same key (covers all keys)

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