batchwriter

package
v4.43.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MPL-2.0 Imports: 10 Imported by: 13

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 New

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

func (*BatchWriter) Close

func (w *BatchWriter) Close(context.Context) error

func (*BatchWriter) Flush

func (w *BatchWriter) Flush(ctx context.Context) error

func (*BatchWriter) Write

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

type Client

type Client interface {
	MigrateTables(context.Context, message.WriteMigrateTables) error
	WriteTableBatch(ctx context.Context, name string, messages message.WriteInserts) error
	DeleteStale(context.Context, message.WriteDeleteStales) error
	DeleteRecord(context.Context, message.WriteDeleteRecords) error
}

type IgnoreMigrateTables

type IgnoreMigrateTables struct{}

func (IgnoreMigrateTables) MigrateTables

type Option

type Option func(*BatchWriter)

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 UnimplementedDeleteRecord added in v4.14.0

type UnimplementedDeleteRecord struct{}

func (UnimplementedDeleteRecord) DeleteRecord added in v4.14.0

type UnimplementedDeleteStale

type UnimplementedDeleteStale struct{}

func (UnimplementedDeleteStale) DeleteStale

Jump to

Keyboard shortcuts

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