Documentation
¶
Index ¶
- func Addrs(n int) []string
- func BlocksOfSize(n int, size int) []blocks.Block
- func Bytes(n int) []byte
- func Cids(n int) []cid.Cid
- func HttpMultiaddrs(n int) []multiaddr.Multiaddr
- func Identity() (peer.ID, crypto.PrivKey, crypto.PubKey)
- func Multiaddrs(n int) []multiaddr.Multiaddr
- func Multihashes(n int) []multihash.Multihash
- func Peers(n int) []peer.ID
- func Seed() int64
- func Sequence(n int) []uint64
- func SequenceNext() uint64
- func SetSeed(seed int64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlocksOfSize ¶
BlocksOfSize generates a slice of blocks of the specified byte size.
func HttpMultiaddrs ¶
func HttpMultiaddrs(n int) []multiaddr.Multiaddr
HttpMultiaddrs returns a slice of n random unique Multiaddrs.
func Multiaddrs ¶
func Multiaddrs(n int) []multiaddr.Multiaddr
Multiaddrs returns a slice of n random unique Multiaddrs.
func Multihashes ¶
func Multihashes(n int) []multihash.Multihash
Multihashes returns a slice of n random unique Multihashes.
func Seed ¶
func Seed() int64
Returns the initial seed used for the pseudo-random number generator. Calling SetSeed(Seed()) each time before generating random items will cause items with the same values to be generated.
func Sequence ¶ added in v0.0.3
Sequence returns a series of monotonicaly increasing numbers, starting at the next unique global sequence value. Any current calls to Sequence will not generate any overlapping values.
The sequence numbers themselves are not random, only the global starting value of the sequence numbers is random. This ensures that all sequences generated withing a test are unique, assuming < 2^64 values are generated, but start out at a random value.
func SequenceNext ¶ added in v0.0.3
func SequenceNext() uint64
SequenceNext returns the next unique global sequence value. This is equivalent to Sequence(1)[0].
Types ¶
This section is empty.