kafka

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kafka

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

func NewKafka

func NewKafka(addrs []string) *Kafka

func (*Kafka) AsyncProducer

func (k *Kafka) AsyncProducer(ctx context.Context, msg chan *sarama.ProducerMessage, sf successFunc, ef errorFunc)

func (*Kafka) Close

func (k *Kafka) Close()

func (*Kafka) Consumer

func (k *Kafka) Consumer(ctx context.Context, topic string, partition int32, offset int64, rf rmsgFunc, ef rerrFunc)

func (*Kafka) ConsumerGroup

func (k *Kafka) ConsumerGroup(ctx context.Context, gid string, topics []string, rf rmsgFunc)

func (*Kafka) SyncProducer

func (k *Kafka) SyncProducer(msg *sarama.ProducerMessage) (part int32, offset int64, err error)

同步消息模式

Jump to

Keyboard shortcuts

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