batch

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrOverflow = errors.New("writer buffer overflow")

Functions

This section is empty.

Types

type Options

type Options struct {
	BufferSize   int
	BatchSize    int
	BatchWorkers int
}

type Queue

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

Queue represents queue of message batches

func NewQueue

func NewQueue(opts Options, mf metrics.Factory, writer Writer) *Queue

func (*Queue) Add

func (w *Queue) Add(item interface{}) error

func (*Queue) Close

func (w *Queue) Close()

type Writer

type Writer interface {
	WriteItems(_ []interface{})
}

Jump to

Keyboard shortcuts

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