util

package
v1.40.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Drf

func Drf[T any](p *T) T

takes abitary pointer and returns value of the pointer

func FirstListenThenServe

func FirstListenThenServe(srv *http.Server, log *logrus.Logger)

FirstListenThenServe is a utility function that ensures that first a listener is spin up then the http server is setup for serving asynchronously this is requried to ensure in tests that the server is spinned up before jumping to tests.

func GenerateRandomString

func GenerateRandomString(length int, cs *string) string

func GetProjectRoot

func GetProjectRoot() (string, error)

func GetRandomFreePort

func GetRandomFreePort() string

func IsPortFree

func IsPortFree(port string) bool

func Ptr

func Ptr[T any](v T) *T

takes abitary value and returns a pointer to the value

func RequestWithBackoff

func RequestWithBackoff(requestFunction func() error) error

func SetEnvVars

func SetEnvVars(f string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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