rand

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(invocationID []byte) *rand

Types

type Rand

type Rand interface {
	UUID() uuid.UUID
	Float64() float64
	Uint64() uint64
	// Source returns a deterministic random source that can be provided to math/rand.New()
	// and math/rand/v2.New(). The v2 version of rand is strongly recommended where Go 1.22
	// is used, and once this library begins to depend on 1.22, it will be embedded in Rand.
	Source() Source
}

type Source

type Source interface {
	Int63() int64
	Uint64() uint64

	// only the v1 rand package requires this method; we do *not* support it and will panic if its called.
	Seed(int64)
}

Jump to

Keyboard shortcuts

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