config

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

View Source
const (
	ConfigMapNamespaceEnvVarName = "CONFIGMAP_NAMESPACE"
	ConfigMapNameEnvVarName      = "CONFIGMAP_NAME"
	PodNameEnvVarName            = "HOSTNAME"
	PodUIDEnvVarName             = "POD_UID"
)

Variables

View Source
var (
	ErrTimeoutFieldIsMissing = errors.New("timeout field is missing")
	ErrTimeoutFieldIsIllegal = errors.New("timeout field is illegal")
	ErrParamNameIsIllegal    = errors.New("param name is illegal")
)
View Source
var (
	ErrConfigMapDataIsNil      = errors.New("configMap Data field is nil")
	ErrConfigMapIsAlreadyInUse = errors.New("configMap is already in use")
)
View Source
var (
	ErrMissingConfigMapNamespace = fmt.Errorf("missing required environment variable: %q", ConfigMapNamespaceEnvVarName)
	ErrMissingConfigMapName      = fmt.Errorf("missing required environment variable: %q", ConfigMapNameEnvVarName)
	ErrMissingPodName            = fmt.Errorf("missing required environment variable: %q", PodNameEnvVarName)
)

Functions

This section is empty.

Types

type Config

type Config struct {
	ConfigMapNamespace string
	ConfigMapName      string
	PodName            string
	PodUID             string
	UID                string
	Timeout            time.Duration
	Params             map[string]string
}

func Read added in v0.3.0

func Read(client kubernetes.Interface, rawEnv map[string]string) (Config, error)

Jump to

Keyboard shortcuts

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