batchwriter

package
v4.5.5 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 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
}

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 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