kafka

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory added in v0.7.0

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

Factory definition of a consumer factory.

func New

func New(name, ct, topic string, brokers []string, oo ...OptionFunc) (*Factory, error)

New constructor.

func (*Factory) Create added in v0.7.0

func (f *Factory) Create() (async.Consumer, error)

Create a new consumer.

type Offset added in v0.4.2

type Offset int64

Offset defines the offset of messages inside a topic.

const (
	// OffsetNewest starts consuming from the newest available message in the topic.
	OffsetNewest Offset = -1
	// OffsetOldest starts consuming from the oldest available message in the topic.
	OffsetOldest Offset = -2
)

func (Offset) String added in v0.7.1

func (o Offset) String() string

type OptionFunc added in v0.4.3

type OptionFunc func(*consumer) error

OptionFunc definition for configuring the consumer in a functional way.

func Buffer added in v0.4.3

func Buffer(buf int) OptionFunc

Buffer option for adjusting the incoming messages buffer.

func Start added in v0.4.3

func Start(start Offset) OptionFunc

Start option for adjusting the start point in the topic.

func Timeout added in v0.4.3

func Timeout(timeout time.Duration) OptionFunc

Timeout option for adjusting the timeout of the connection.

func Version added in v0.5.1

func Version(version string) OptionFunc

Version option for setting the Kafka version.

Jump to

Keyboard shortcuts

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