util

package
v0.1.79 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrK8SConnectionError = errors.New("unable to connection the kubernetes API")
)

Functions

func GenerateResourceID added in v0.1.71

func GenerateResourceID() string

GenerateResourceID creates a valid Kubernetes name from a UUID.

func GetNATPrefix

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

GetNATPrefix returns the IP address of the SNAT that the control plane and by extension we, sit behind.

func Keys

func Keys[T any](m map[string]T) []string

Keys returns the keys from a string map.

Types

type DefaultK8SAPITester

type DefaultK8SAPITester struct{}

func (*DefaultK8SAPITester) Connect

func (t *DefaultK8SAPITester) Connect(ctx context.Context, config *clientcmdapi.Config) error

type K8SAPITester

type K8SAPITester interface {
	Connect(ctx context.Context, config *clientcmdapi.Config) error
}

Directories

Path Synopsis
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

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