Documentation
¶
Index ¶
- Constants
- func FromOffset(o int64) consumerOpts
- func WithEOFBehaviour(v eofBehaviour) consumerOpts
- func WithMaxBatchSize(v int) consumerOpts
- func WithMaxRecordCount(o int64) consumerOpts
- func WithMinBatchSize(v int) consumerOpts
- func WithName(v string) consumerOpts
- func WithOffsetIterator(v OffsetIterator) consumerOpts
- type Batch
- type Consumer
- type ConsumerOpts
- type OffsetIterator
- type Poller
- type Processor
Constants ¶
View Source
const ( // EOFBehaviourPoll will make the session poll for new records after an EOF error is received EOFBehaviourPoll eofBehaviour = 1 << iota // EOFBehaviourExit wil make the session exit when EOF is received EOFBehaviourExit eofBehaviour = 1 << iota )
Variables ¶
This section is empty.
Functions ¶
func FromOffset ¶
func FromOffset(o int64) consumerOpts
func WithEOFBehaviour ¶
func WithEOFBehaviour(v eofBehaviour) consumerOpts
func WithMaxBatchSize ¶
func WithMaxBatchSize(v int) consumerOpts
func WithMaxRecordCount ¶
func WithMaxRecordCount(o int64) consumerOpts
func WithMinBatchSize ¶
func WithMinBatchSize(v int) consumerOpts
func WithOffsetIterator ¶
func WithOffsetIterator(v OffsetIterator) consumerOpts
Types ¶
type Consumer ¶
type Consumer interface {
Consume(ctx context.Context, r io.ReadSeeker, processor Processor) error
}
func NewConsumer ¶
func NewConsumer(opts ...consumerOpts) Consumer
type ConsumerOpts ¶
type ConsumerOpts struct { Name string MaxBatchSize int MinBatchSize int MaxBatchMemorySizeInBytes int MaxRecordCount int64 FromOffset int64 EOFBehaviour eofBehaviour OffsetProvider OffsetIterator Middleware []func(Processor, ConsumerOpts) Processor }
ConsumerOpts describes stream session preferences
type OffsetIterator ¶
Click to show internal directories.
Click to hide internal directories.