batchengine

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchEngine

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

BatchEngine is an engine that processes a batch of messages only once and then shuts down

func New

func New(
	processor goduck.BatchProcessor,
	maxBatchSize int,
	maxTimeout time.Duration,
	stream goduck.Stream,
) *BatchEngine

New creates a new BatchEngine.

func NewFromEndpoint

func NewFromEndpoint(
	e endpoint.Endpoint,
	decoder goduck.EndpointBatchDecoder,
	maxBatchSize int,
	maxTimeout time.Duration,
	stream goduck.Stream,
) *BatchEngine

NewFromEndpoint creates a BatchProcessor from a go-kit endpoint

func (*BatchEngine) Run

func (e *BatchEngine) Run(ctx context.Context) error

Run processes the messages and then closes

Jump to

Keyboard shortcuts

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