# Functions
CountingAcceptor instantiates a new acceptor that records top-of-funnel mutations counts, classifies them based on success or failure, and then delegates to another acceptor.
Flatten copies all mutations in a batch into a slice.
IsLeaseBusy returns the error if it represents a busy lease.
OrderedAcceptorFrom will return an adaptor which iterates over tables in the table-dependency order.
# Constants
CustomUpsert defines a custom upsert template that will be used for the mutation.
These are various product types that we support.
These are various product types that we support.
These are various product types that we support.
These are various product types that we support.
These are various product types that we support.
These are various product types that we support.
ToastedColumnPlaceholder is a placeholder to identify a unchanged Postgres toasted column.
# Variables
ErrCancelSingleton may be returned by callbacks passed to leases.Singleton to shut down cleanly.
# Structs
AcceptOptions is an API escape hatch to provide hints or other metadata to acceptor implementations.
ColData hold SQL column metadata.
LeaseBusyError is returned by [Leases.Acquire] if another caller holds the lease.
LeaseKey may be used to retrieve a Lease from its [context.Context].
A MultiBatch is a time-ordered collection of per-table data to apply.
A Mutation describes a row to upsert into the target database.
PoolInfo describes a database connection pool and what it's connected to.
SchemaData holds SQL schema metadata.
SourcePool is an injection point for a connection to a source database.
StagingCursor is emitted by [Stagers.Read].
StagingPool is an injection point for a connection to the staging database.
StagingQuery is passed to [Stagers.Read].
A TableBatch contains mutations destined for a single table at a single timestamp.
A TableGroup is a named collection of tables.
TargetPool is an injection point for a connection to the target database.
TargetStatements is an injection point for a cache of prepared statements associated with the TargetPool.
A TemporalBatch holds mutations for some number of tables that all occur at the same time.
# Interfaces
Accumulator contains the Accumulate method.
AnyPool is a generic type constraint for any database pool type that we support.
An Authenticator determines if an operation on some schema should be allowed to proceed.
The Batch interface is implemented by the various Batch types in this package.
Counter tracks the number of times an operation is executed.
A DLQ is a dead-letter queue that allows mutations to be written to the target for offline reconciliation.
DLQs provides named dead-letter queues in the target schema.
A Lease represents a time-based, exclusive lock.
Leases coordinates behavior across multiple instances of Replicator.
A Memo is a key store that persists a value associated to a key.
A MultiAcceptor operates on a MultiBatch to achieve some effect within the target.
Stager describes a service which can durably persist some number of Mutations.
Stagers is a factory for Stager instances.
StagingQuerier is implemented by pgxpool.Pool, pgxpool.Conn, pgxpool.Tx, pgx.Conn, and pgx.Tx types.
A TableAcceptor operates on a TableBatch.
TargetQuerier is implemented by [sql.DB] and [sql.Tx].
TargetTx is implemented by [sql.Tx].
A TemporalAcceptor operates on a batch of data that has a single timestamp (i.e.
Watcher allows table metadata to be observed.
Watchers is a factory for Watcher instances.
# Type aliases
AccumulatorFunc adapts a function to the [Accumulator] interface.
Product is an enum type to make it easy to switch on the underlying database.