rand

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rand

type Rand struct {
	// contains filtered or unexported fields
}

func New

func New(invocationID []byte) *Rand

func (*Rand) Float64

func (r *Rand) Float64() float64

func (*Rand) Source

func (r *Rand) Source() *Source

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.

func (*Rand) UUID

func (r *Rand) UUID() uuid.UUID

func (*Rand) Uint64

func (r *Rand) Uint64() uint64

type Source

type Source struct {
	// contains filtered or unexported fields
}

func (*Source) Int63

func (s *Source) Int63() int64

func (*Source) Seed

func (s *Source) Seed(int64)

only the v1 rand package has this method

func (*Source) Uint64

func (s *Source) Uint64() uint64

Jump to

Keyboard shortcuts

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