package
0.0.0-20240808161447-33ad65eb859c
Repository: https://github.com/rubrikinc/failure-test-utils.git
Documentation: pkg.go.dev

# Functions

NewLockedRandGen creates a new instance of LockedRanGen.
RandBytes returns a byte slice of the given length with random data.
WeightedChoice takes a slice of positive weights, and returns a random index from [0, len(weights)) with probability of index i being proportional to weight i.

# Structs

LockedRandGen wrapper on top of math/rand that leverage locking when generating random number and avoid concurrency issue between go-routines sharing the generator.