implstream

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKafkaStream

func NewKafkaStream(config KafkaConfigs) goduck.Stream

func NewKafkaStreamWithCustomConfigs

func NewKafkaStreamWithCustomConfigs(config kafkaGo.ReaderConfig) goduck.Stream

NewKafkaStreamWithCustomConfigs allows creating a kafka connection with all configs from the SegmentIO library

Types

type KafkaConfigs

type KafkaConfigs struct {
	Brokers  []string
	Topic    string
	GroupID  string
	Username string
	Password string

	CommitInterval time.Duration
}

KafkaConfigs contains the configs for kafka connection

type MockStream

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

func NewDefaultStream

func NewDefaultStream(partition int, nElems int) *MockStream

func NewMock

func NewMock(items [][]byte) *MockStream

func (MockStream) Close

func (m MockStream) Close() error

func (*MockStream) Done

func (m *MockStream) Done(ctx context.Context) error

func (MockStream) IsEmpty

func (m MockStream) IsEmpty() bool

IsEmpty tests if all elements in the queue are consumed

func (*MockStream) Next

func (m *MockStream) Next(ctx context.Context) (goduck.RawMessage, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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