kafka

package
v0.0.0-...-4b55cb2 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: Apache-2.0 Imports: 6 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
}

Consumer implement reader

func NewConsumer

func NewConsumer(ctx context.Context, address, group, version string, topics []string, timeout time.Duration, isOldest bool) *Consumer

func (*Consumer) Close

func (c *Consumer) Close()

func (*Consumer) Name

func (c *Consumer) Name() string

func (*Consumer) Open

func (c *Consumer) Open() error

func (*Consumer) SetStop

func (c *Consumer) SetStop(isEnd bool)

func (*Consumer) Start

func (c *Consumer) Start(stream chan string) error

func (*Consumer) Stop

func (c *Consumer) Stop() bool

type Producer

type Producer struct {
	Brokers string
	Topic   string
	Version string
	// contains filtered or unexported fields
}

func NewProducer

func NewProducer(brokers, topic, version string) *Producer

func (*Producer) Close

func (p *Producer) Close() error

func (*Producer) Open

func (p *Producer) Open() error

func (*Producer) SendMsg

func (p *Producer) SendMsg(data []byte) error

func (*Producer) SendMsgWithTopic

func (p *Producer) SendMsgWithTopic(topic string, data []byte) error

Jump to

Keyboard shortcuts

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