Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchWriter ¶
type BatchWriter struct {
// contains filtered or unexported fields
}
func NewBatchWriter ¶
func NewBatchWriter(client BatchWriterClient, opts ...Option) (*BatchWriter, error)
type BatchWriterClient ¶
type MixedBatchClient ¶
type MixedBatchClient interface { MigrateTableBatch(ctx context.Context, messages []*message.MigrateTable, options plugin.WriteOptions) error InsertBatch(ctx context.Context, messages []*message.Insert, options plugin.WriteOptions) error DeleteStaleBatch(ctx context.Context, messages []*message.DeleteStale, options plugin.WriteOptions) error }
MixedBatchClient is a client that will receive batches of messages with a mixture of tables.
type MixedBatchWriter ¶
type MixedBatchWriter struct {
// contains filtered or unexported fields
}
func NewMixedBatchWriter ¶
func NewMixedBatchWriter(client MixedBatchClient, opts ...MixedBatchWriterOption) (*MixedBatchWriter, error)
func (*MixedBatchWriter) Write ¶
func (w *MixedBatchWriter) Write(ctx context.Context, options plugin.WriteOptions, msgChan <-chan message.Message) error
Write starts listening for messages on the msgChan channel and writes them to the client in batches.
type MixedBatchWriterOption ¶
type MixedBatchWriterOption func(writer *MixedBatchWriter)
func WithMixedBatchWriterBatchSize ¶
func WithMixedBatchWriterBatchSize(size int) MixedBatchWriterOption
func WithMixedBatchWriterBatchTimeout ¶
func WithMixedBatchWriterBatchTimeout(timeout time.Duration) MixedBatchWriterOption
func WithMixedBatchWriterLogger ¶
func WithMixedBatchWriterLogger(logger zerolog.Logger) MixedBatchWriterOption
func WithMixedBatchWriterSizeBytes ¶
func WithMixedBatchWriterSizeBytes(size int) MixedBatchWriterOption
type Option ¶
type Option func(*BatchWriter)
func WithBatchSize ¶
func WithBatchSizeBytes ¶
func WithBatchTimeout ¶
func WithLogger ¶
Click to show internal directories.
Click to hide internal directories.