producer

package
v0.59.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batcher

type Batcher interface {
	// Put is a blocking operation that will attempt to write the data at most once to kinesis.
	// Any unrecoverable errors such as misconfigured client or hard limits being exceeded
	// will result in consumeerr.Permanent being returned to allow for existing retry patterns within
	// the project to be used.
	Put(ctx context.Context, b *batch.Batch) error

	// Ready ensures that the configuration is valid and can write the configured stream.
	Ready(ctx context.Context) error
}

Batcher abstracts the raw kinesis client to reduce complexity with delivering dynamic encoded data.

func NewBatcher

func NewBatcher(kinesisAPI kinesisiface.KinesisAPI, stream string, opts ...BatcherOptions) (Batcher, error)

type BatcherOptions

type BatcherOptions func(*batcher) error

func WithLogger

func WithLogger(l *zap.Logger) BatcherOptions

WithLogger sets the provided logger for the Batcher

Jump to

Keyboard shortcuts

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