kafka

package
v0.0.0-...-9db4afe Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer struct {
	Addrs   []string
	Topic   string
	Offset  int64
	Message chan *[]byte //从这个管道中读取数据
}

一些使用说明: sarame.OffsetNewest int64 = -1 sarame.OffsetOldest int64 = -2

func NewConsumer

func NewConsumer(addrs []string, topic string, offset int64) *Consumer

func (*Consumer) ReadFromTopic

func (self *Consumer) ReadFromTopic()

type Producer

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

func NewProducer

func NewProducer(addrs []string, topic string, maxThreads int) *Producer

func (*Producer) ChanInfo

func (self *Producer) ChanInfo() string

func (*Producer) Write

func (self *Producer) Write(msg []byte) (int, error)

func (*Producer) WriteToTopic

func (self *Producer) WriteToTopic() error

Jump to

Keyboard shortcuts

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