stream

package
v0.0.71 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2019 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OFFSET_BEHAVIOUR_FROM_START offsetBehaviour = iota
	OFFSET_BEHAVIOUR_FROM_NOW
)

Variables

View Source
var (
	ErrShardLocked          = errors.New("shard locked")
	ErrShardAlreadyLocked   = errors.New("shard already locked")
	ErrShardAlreadyUnlocked = errors.New("shard already unlocked")
)

Functions

func NewClient

func NewClient(kvClient *kv.Client, messagesClient *messages.Client, logger *zap.Logger) *streamClient

func WithConsumerGroupID

func WithConsumerGroupID(id string) consumeOpt

func WithConsumerID

func WithConsumerID(id string) consumeOpt

func WithInitialOffsetBehaviour

func WithInitialOffsetBehaviour(b offsetBehaviour) consumeOpt

func WithMaxBatchSize

func WithMaxBatchSize(size int) consumeOpt

Types

type ShardConsumer

type ShardConsumer func([]*messages.StoredMessage) (int, error)

Jump to

Keyboard shortcuts

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