Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchWriter ¶
type BatchWriter struct {
*Writer
// contains filtered or unexported fields
}
BatchWriter is a WAL processor implementation that batches and writes wal events to a Postgres instance.
func NewBatchWriter ¶
func NewBatchWriter(ctx context.Context, config *Config, opts ...WriterOption) (*BatchWriter, error)
NewBatchWriter returns a postgres processor that batches and writes data to the configured postgres instance.
func (*BatchWriter) Close ¶
func (w *BatchWriter) Close() error
func (*BatchWriter) Name ¶
func (w *BatchWriter) Name() string
func (*BatchWriter) ProcessWALEvent ¶
ProcessWALEvent is called on every new message from the wal. It can be called concurrently.
type BulkIngestWriter ¶ added in v0.6.0
type BulkIngestWriter struct {
*Writer
// contains filtered or unexported fields
}
BulkIngestWriter is a WAL processor implementation that batches and bulk writes wal insert events to a Postgres instance using the COPY command.
func NewBulkIngestWriter ¶ added in v0.6.0
func NewBulkIngestWriter(ctx context.Context, config *Config, opts ...WriterOption) (*BulkIngestWriter, error)
NewBulkIngestWriter returns a postgres processor that batches and writes data to the configured postgres instance in bulk using the COPY command. It uses a batch sender per schema table to parallelise the bulk ingest for different tables.
func (*BulkIngestWriter) Close ¶ added in v0.6.0
func (w *BulkIngestWriter) Close() error
func (*BulkIngestWriter) Name ¶ added in v0.6.0
func (w *BulkIngestWriter) Name() string
func (*BulkIngestWriter) ProcessWALEvent ¶ added in v0.6.0
ProcessWALEvent is called on every new message from the wal. It can be called concurrently.
type WriterOption ¶ added in v0.6.0
type WriterOption func(*Writer)
func WithCheckpoint ¶
func WithCheckpoint(c checkpointer.Checkpoint) WriterOption
func WithInstrumentation ¶ added in v0.6.0
func WithInstrumentation(i *otel.Instrumentation) WriterOption
func WithLogger ¶
func WithLogger(l loglib.Logger) WriterOption