batch

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRequestTooLarge = errors.New("put request is too large")

Functions

This section is empty.

Types

type BatcherFactory

type BatcherFactory struct {
	batch.BatcherFactory
	Namespace      string
	Executor       internal.Executor
	RequestTimeout time.Duration
	Metrics        *metrics.Metrics
}

func NewBatcherFactory

func NewBatcherFactory(
	executor *internal.ExecutorImpl,
	namespace string,
	batchLinger time.Duration,
	maxRequestsPerBatch int,
	metric *metrics.Metrics,
	requestTimeout time.Duration) *BatcherFactory

func (*BatcherFactory) NewReadBatcher

func (b *BatcherFactory) NewReadBatcher(shardId *int64) batch.Batcher

func (*BatcherFactory) NewWriteBatcher

func (b *BatcherFactory) NewWriteBatcher(shardId *int64, maxWriteBatchSize int) batch.Batcher

type Manager

type Manager struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewManager

func NewManager(batcherFactory func(*int64) batch.Batcher) *Manager

func (*Manager) Close

func (m *Manager) Close() error

func (*Manager) Get

func (m *Manager) Get(shardId int64) batch.Batcher

Jump to

Keyboard shortcuts

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