util

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 12 Imported by: 23

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
}

type ServiceDescriptor added in v1.9.0

type ServiceDescriptor struct {
	// Name is the name of the service.
	Name string
	// Version is the version of the service.
	Version string
	// Revision is the revision of the service (typically a Git SHA).
	Revision string
}

ServiceDescriptor is used to define a common format for application information. This is typically used to initialize logging and IPC so we can see who instigated a request.

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