tidb: github.com/pingcap/tidb/util/fastrand Index | Files

package fastrand

import "github.com/pingcap/tidb/util/fastrand"

Index

Package Files

random.go

func Buf Uses

func Buf(size int) []byte

Buf generates a random string using ASCII characters but avoid separator character. See https://github.com/mysql/mysql-server/blob/5.7/mysys_ssl/crypt_genhash_impl.cc#L435

func Uint32 Uses

func Uint32() uint32

Uint32 returns a lock free uint32 value. go:linkname Uint32 runtime.fastrand

func Uint32N Uses

func Uint32N(n uint32) uint32

Uint32N returns, as an uint32, a pseudo-random number in [0,n).

func Uint64N Uses

func Uint64N(n uint64) uint64

Uint64N returns, as an uint64, a pseudo-random number in [0,n).

Package fastrand imports 1 packages (graph) and is imported by 9 packages. Updated 2020-03-10. Refresh now. Tools for package owners.