listenhandler

package
v0.0.0-...-eb6d389 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyListening = errors.New("Already listening to stream")
View Source
var ErrListenHandlerClosed = errors.New("Listen handler had been closed")
View Source
var ErrListenerQuit = errors.New("Listener exited unexpectedly; offset out of range?")
View Source
var ErrNotListening = errors.New("Not listening to stream")

Functions

This section is empty.

Types

type ListenHandler

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

func New

func New(kfkConn sarama.Client, transmitter Transmitter) (*ListenHandler, error)

func (*ListenHandler) Close

func (lh *ListenHandler) Close()

func (*ListenHandler) Listen

func (lh *ListenHandler) Listen(topic string, partition int32, offset int64) error

func (*ListenHandler) Unlisten

func (lh *ListenHandler) Unlisten(topic string, partition int32) error

type Stream

type Stream struct {
	Topic     string
	Partition int32
}

type Transmitter

type Transmitter interface {
	Transmit(key, val []byte, topic string, partition int32, offset int64)
	Close()
}

Jump to

Keyboard shortcuts

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