mixedbatchwriter

package
v4.42.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2024 License: MPL-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	MigrateTableBatch(ctx context.Context, messages message.WriteMigrateTables) error
	InsertBatch(ctx context.Context, messages message.WriteInserts) error
	DeleteStaleBatch(ctx context.Context, messages message.WriteDeleteStales) error
	DeleteRecordsBatch(ctx context.Context, messages message.WriteDeleteRecords) error
}

Client is a client that will receive batches of messages with a mixture of tables.

type IgnoreMigrateTableBatch

type IgnoreMigrateTableBatch struct{}

func (IgnoreMigrateTableBatch) MigrateTableBatch

type MixedBatchWriter

type MixedBatchWriter struct {
	// contains filtered or unexported fields
}

func New

func New(client Client, opts ...Option) (*MixedBatchWriter, error)

func (*MixedBatchWriter) Write

func (w *MixedBatchWriter) Write(ctx context.Context, msgChan <-chan message.WriteMessage) error

Write starts listening for messages on the msgChan channel and writes them to the client in batches.

type Option

type Option func(writer *MixedBatchWriter)

func WithBatchSize

func WithBatchSize(size int) Option

func WithBatchSizeBytes

func WithBatchSizeBytes(size int) Option

func WithBatchTimeout

func WithBatchTimeout(timeout time.Duration) Option

func WithLogger

func WithLogger(logger zerolog.Logger) Option

type UnimplementedDeleteRecordsBatch added in v4.13.0

type UnimplementedDeleteRecordsBatch struct{}

func (UnimplementedDeleteRecordsBatch) DeleteRecordsBatch added in v4.13.0

type UnimplementedDeleteStaleBatch

type UnimplementedDeleteStaleBatch struct{}

func (UnimplementedDeleteStaleBatch) DeleteStaleBatch

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL