config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNamespaceToCtx

func AddNamespaceToCtx(ctx context.Context, namespace string) context.Context

AddNamespaceToCtx adds the namespace to the context. The namespace is stored in the key `namespace` and can be retrieved with `GetNamespaceFromCtx` or `MustGetNamespaceFromCtx`.

func GetNamespaceFromCtx

func GetNamespaceFromCtx(ctx context.Context) (string, error)

GetNamespaceFromCtx returns the namespace extracted from the context.

func MustGetNamespaceFromCtx

func MustGetNamespaceFromCtx(ctx context.Context) string

MustGetNamespaceFromCtx only returns the namespace extracted from the context. It panics if the namespace cannot be extracted.

Types

type Environment

type Environment struct {
	env.Environment
	DefaultContainerRegistry string
	DefaultContainerImage    string
	ReportMetrics            bool
}

Environment represents the global test configuration. Wraps the e2e-framework Environment.

func GetEnv

func GetEnv() Environment

GetEnv returns a copy of the global Environment.

func NewEnvFromFlags

func NewEnvFromFlags() (*Environment, error)

NewEnvFromFlags configure the global Environment from flags. This is a wrapper around e2e-framework's NewFromFlags to allow for additional flags. The function returns a pointer so that the global Environment can be tuned as needed after creation.

func (*Environment) Validate

func (e *Environment) Validate() func(ctx context.Context, cfg *envconf.Config) (context.Context, error)

type NamespaceCtxKey

type NamespaceCtxKey string

Jump to

Keyboard shortcuts

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