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
Click to show internal directories.
Click to hide internal directories.