kafka

package
v0.0.0-...-1806480 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Partition         = 0
	ConsumeRetryLimit = 5
	Broker            = "log-client"
)

Variables

View Source
var (

	// ErrNoData is the err type for no data.
	ErrNoData = kafka.ErrNoData
)

Functions

func Close

func Close()

Close close the link to kafka server

func Dail

func Dail(sKafkaAddrs []string) (err error)

Dail dail to kafka server

func IsConnected

func IsConnected() bool

IsConnected get the status of the link to kafka server

func NewConsumer

func NewConsumer(sTopic string) (kafka.Consumer, error)

NewConsumer create a new cosumer to the special topic

func Produce

func Produce(sTopic string, byrMsg []byte) (err error)

Produce produce the message to the special topic

Types

This section is empty.

Jump to

Keyboard shortcuts

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