utils

package
v0.1.147 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultEnvironment = "local"

Variables

This section is empty.

Functions

func CheckForError added in v0.1.146

func CheckForError(input interface{}) error

CheckForError takes any input and returns the error if it is one, otherwise nil.

func GetEnvironmentName

func GetEnvironmentName() string

func GetPortFullName

func GetPortFullName(nodeID string, portName string) string

func IsLeader added in v0.1.147

func IsLeader(ctx context.Context) bool

IsLeader checks if the current context indicates leadership status

func ParseFullPortName added in v0.1.0

func ParseFullPortName(name string) (node string, port string)

func RemoveSliceElement added in v0.1.0

func RemoveSliceElement[T any](slice []T, s int) []T

func SanitizeResourceName added in v0.1.0

func SanitizeResourceName(in string) string

func WithLeader added in v0.1.147

func WithLeader(ctx context.Context, isLeader bool) context.Context

Types

This section is empty.

Jump to

Keyboard shortcuts

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