kafka

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2020 License: MIT Imports: 5 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 {
	// contains filtered or unexported fields
}

func (*Consumer) Close

func (c *Consumer) Close()

func (*Consumer) Consume

func (c *Consumer) Consume(cb func([]byte)) error

type Kafka

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

func Ins

func Ins(id ...string) *Kafka

返回 kafka 组件单例

func NewKafka

func NewKafka(connect []string, config *cluster.Config) *Kafka

实例化一个全新的 Kafka

func (*Kafka) NewConsumer

func (q *Kafka) NewConsumer(topic string, group string) (*Consumer, error)

func (*Kafka) Produce

func (q *Kafka) Produce(topic string, value string) (partition int32, offset int64, err error)

Jump to

Keyboard shortcuts

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