kafka

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2020 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 Consumer

type Consumer struct {
	Messages chan *sarama.ConsumerMessage
	// contains filtered or unexported fields
}

Consumer ...

func ConsumeGroup

func ConsumeGroup(ctx context.Context, options ConsumerOptions) (*Consumer, *sync.WaitGroup, error)

ConsumeGroup ...

func (*Consumer) Cleanup

func (consumer *Consumer) Cleanup(sarama.ConsumerGroupSession) error

Cleanup ...

func (*Consumer) Close

func (consumer *Consumer) Close() error

Close ...

func (*Consumer) ConsumeClaim

func (consumer *Consumer) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error

ConsumeClaim ...

func (*Consumer) Setup

func (consumer *Consumer) Setup(sarama.ConsumerGroupSession) error

Setup ...

type ConsumerOptions

type ConsumerOptions struct {
	Brokers []string
	Group   string
	Version string
	Topics  []string
}

ConsumerOptions ...

type Producer

type Producer struct {
	DataCollector     sarama.SyncProducer
	AccessLogProducer sarama.AsyncProducer
}

Producer ...

func CreateProducer

func CreateProducer(ctx context.Context, options ProducerOptions) (*Producer, error)

CreateProducer ...

func (*Producer) Close

func (p *Producer) Close() error

Close ...

func (*Producer) Send

func (p *Producer) Send(topic string, pkey string, entry sarama.Encoder)

Send ...

type ProducerOptions

type ProducerOptions struct {
	Brokers []string
	Group   string
	Version string
	Topics  []string
}

ProducerOptions ...

Jump to

Keyboard shortcuts

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