utils

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2025 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateJitter

func CalculateJitter(baseDelay time.Duration, percent float64) time.Duration

func ConnectionsEqual

func ConnectionsEqual(c1, c2 net.Conn) bool

func FormatBytes added in v0.0.12

func FormatBytes(bytes int64) string

func FromByte

func FromByte(b []byte) string

func GenerateHMACKey

func GenerateHMACKey(length int) (string, error)

func GenerateSecretKey

func GenerateSecretKey(length int) (string, error)

func GetRandomPort added in v0.0.12

func GetRandomPort() (int, error)

GetRandomPort returns a free port chosen by the operating system.

func MustGenerateHMACKey

func MustGenerateHMACKey(length int) string

func MustGenerateSecretKey

func MustGenerateSecretKey(length int) string

func SizeOf

func SizeOf(v any) uintptr

func ToByte

func ToByte(s string) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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