Documentation
¶
Overview ¶
Package template builds the text/template instances used by the transformers that accept user provided templates. The greenmask toolkit function map they rely on closes over state that is not safe for concurrent use (a shared *rand.Rand behind randomInt/randomString/noiseInt/..., and a pgtype.Map behind tsModify/noiseDatePgInterval), so a single template cannot be executed by several snapshot workers at once. Templates are pooled instead: each execution gets an instance with function map state of its own.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
Template is a text/template with the greenmask toolkit and sprig function maps available to it, safe for concurrent execution.