writer

package
v1.7.9 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// BatchLimit is number of changes in a single batchWrite request, BatchLimit must be <= 200
	BatchLimit = 200
)

Functions

This section is empty.

Types

type BatchAddContext

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

func NewBatchAdd

func NewBatchAdd(id string, change tablestore.RowChange, future *promise.Future) *BatchAddContext

type BatchAddResult

type BatchAddResult struct {
	Id    string
	Value tablestore.RowResult
	Err   error
}

type BatchWriter

type BatchWriter struct {
	tablestore.TableStoreApi
	// contains filtered or unexported fields
}

func NewBatchWriter

func NewBatchWriter(client tablestore.TableStoreApi, conf *Config) *BatchWriter

func (*BatchWriter) BatchAdd

func (w *BatchWriter) BatchAdd(ctx *BatchAddContext) error

func (*BatchWriter) Close

func (w *BatchWriter) Close()

func (*BatchWriter) Flush

func (w *BatchWriter) Flush() error

type Config

type Config struct {
	Concurrent    int
	FlushInterval time.Duration
	RetryTimeout  time.Duration
}

Jump to

Keyboard shortcuts

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