Documentation ¶
Overview ¶
Package apply contains code for applying mutations to tables.
Index ¶
Constants ¶
View Source
const ( // QueryDir is the name of the subdirectory in the template [fs.FS]. QueryDir = "queries" // TemplateOverrideEnv is the name of an environment variable that // overrides the [fs.FS] from which the query templates are loaded. // This facilitates ad-hoc debugging of queries, without the need to // recompile the Replicator binary. TemplateOverrideEnv = "REPLICATOR_TEMPLATES" )
Variables ¶
View Source
var ( // EmbeddedTemplates bundles the templates into the binary. //go:embed queries/*/*.tmpl EmbeddedTemplates embed.FS )
View Source
var Set = wire.NewSet( ProvideAcceptor, )
Set is used by Wire.
Functions ¶
func IsMergeSupported ¶
IsMergeSupported returns true if the applier supports three-way merges for the given product.
Work items in https://github.com/cockroachdb/replicator/issues/487
Types ¶
type Acceptor ¶
type Acceptor struct {
// contains filtered or unexported fields
}
Acceptor writes batches of mutations into their target tables.
func ProvideAcceptor ¶
func ProvideAcceptor( ctx *stopper.Context, cache *types.TargetStatements, configs *applycfg.Configs, diags *diag.Diagnostics, dlqs types.DLQs, target *types.TargetPool, watchers types.Watchers, ) (*Acceptor, error)
ProvideAcceptor is called by Wire.
func (*Acceptor) AcceptTableBatch ¶
func (a *Acceptor) AcceptTableBatch( ctx context.Context, batch *types.TableBatch, opts *types.AcceptOptions, ) error
AcceptTableBatch implements types.TableAcceptor. If the options do not provide a types.TargetQuerier, the types.TargetPool will be used instead.
Click to show internal directories.
Click to hide internal directories.