mongo-drivergo.mongodb.org/mongo-driver/internal/randutil Index | Files

package randutil

import "go.mongodb.org/mongo-driver/internal/randutil"

Package randutil provides common random number utilities.

Index

Functions

func NewLockedRand

func NewLockedRand() *xrand.Rand

NewLockedRand returns a new "x/exp/rand" pseudo-random number generator seeded with a cryptographically-secure random number. It is safe to use from multiple goroutines.

Source Files

randutil.go

Version
v1.17.2
Published
Jan 7, 2025
Platform
js/wasm
Imports
4 packages
Last checked
3 minutes ago

Tools for package owners.