util

package
v0.1.63 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

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.

func ToPointer

func ToPointer[T any](t T) *T

ToPointer is usually used in tests to get a pointer to a const.

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