prioritymap

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: Apache-2.0 Imports: 6 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

func WithAllowDuplicatesFor added in v1.4.1

func WithAllowDuplicatesFor(key string) Option

func WithAvoidDuplicates added in v1.4.1

func WithAvoidDuplicates() Option

func WithAvoidDuplicatesFor added in v1.4.1

func WithAvoidDuplicatesFor(key string) Option

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