kafka

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoBrokers = errors.New("No kafka brokers found")
View Source
var ErrTransmitHandlerClosed = errors.New("Transmit handler has closed")

Functions

This section is empty.

Types

type Kafka

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

func New

func New(clientid string, logger *log.Logger, zkpeers []string) (*Kafka, error)

func (*Kafka) Close

func (k *Kafka) Close()

func (*Kafka) Incoming

func (k *Kafka) Incoming() <-chan Message

func (*Kafka) Listen

func (k *Kafka) Listen(topic string, partition int32, offset int64) error

func (*Kafka) ListenNewest

func (k *Kafka) ListenNewest(topic string, partition int32) error

func (*Kafka) ListenOldest

func (k *Kafka) ListenOldest(topic string, partition int32) error

func (*Kafka) Outgoing

func (k *Kafka) Outgoing() <-chan transmithandler.Transmit

func (*Kafka) Send

func (k *Kafka) Send(key, val []byte, topic string) (partition int32, offset int64, err error)

func (*Kafka) Unlisten

func (k *Kafka) Unlisten(topic string, partition int32) error

type Message

type Message struct {
	Key       []byte
	Val       []byte
	Topic     string
	Partition int32
	Offset    int64
}

Directories

Path Synopsis
internal
tools

Jump to

Keyboard shortcuts

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