utils

package
v1.19.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBoolAsStringEnvVar

func GetBoolAsStringEnvVar(env string, defaultVal bool) bool

Parse environment variable and return boolean representation of string, or default value if environment variable is unset

func GetEnv

func GetEnv(env, defaultVal string) string

If environment variable is set, return set value, otherwise return default value

func GetIntFromStringEnvVar added in v1.15.0

func GetIntFromStringEnvVar(env string, defaultVal int) (int, error, string)

Parse environment variable and return integer representation of string, or default value if environment variable is unset

func IsStrictMode added in v1.17.1

func IsStrictMode(input string) bool

IsStrictMode checks if strict mode is enabled

func IsValidNetworkPolicyEnforcingMode added in v1.17.1

func IsValidNetworkPolicyEnforcingMode(input string) bool

IsValidNetworkPolicyEnforcingMode checks if the input string matches any of the enum values

Types

type NetworkPolicyEnforcingMode added in v1.17.1

type NetworkPolicyEnforcingMode string

NetworkPolicyEnforcingMode is the mode of network policy enforcement

const (
	// None : no network policy enforcement
	None NetworkPolicyEnforcingMode = "none"
	// Strict : strict network policy enforcement
	Strict NetworkPolicyEnforcingMode = "strict"
	// Standard :standard network policy enforcement
	Standard NetworkPolicyEnforcingMode = "standard"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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