Documentation
¶
Overview ¶
Package dynamicvars resolves {{$name:args}} template variables to generated fake data. The {{$...}} namespace is owned here; generators are backed by gofakeit for breadth. It satisfies the resolver the engine wires into node.Runtime.Vars (Resolve(name, args) (string, error)).
Determinism: a Context is seeded from the execution id, so a given execution produces a stable stream of values and different executions differ. Draws are mutex-guarded; under concurrent draws the order (and thus exact values) can vary, so values are unique-per-run, not yet identical on replay.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context holds the per-execution generator state and satisfies the dynamic resolver the engine expects.
func New ¶
New builds a Context seeded deterministically from the execution id, so the same execution replays the same stream of values.
func NewEphemeral ¶
func NewEphemeral() *Context
NewEphemeral builds a Context seeded from a fresh random source — unique per process, not reproducible. Use it for the default runtime, when no execution id is available; real executions should use New(executionID).