Documentation
¶
Overview ¶
Package rng provides deterministic seeded random streams keyed by a composite SeedKey (tick, actor, event-seq, purpose). Same SeedKey → same output sequence, which is the foundation for replayable matches, forensic audit, and reproducible loot rolls.
Backed by math/rand/v2's ChaCha8 source. Sub-streams are derived from the master seed + SeedKey via a deterministic mixing function, so streams are independent without sharing state.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SeedKey ¶
SeedKey identifies a derived stream. Two streams with the same SeedKey (under the same master seed) produce identical output sequences — that is the load-bearing property for replay and audit.
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source owns the master seed and mints typed Streams.
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
Stream is a deterministic random source derived from a SeedKey.