Consumer

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

CliOptions ...

Functions

func Consume

func Consume(ctx context.Context, options Config) (sarama.PartitionConsumer, error)

Consume ...

Types

type Config

type Config struct {
	kafka.Config
	Group  string
	Topics []string
}

Config ...

func (Config) ParseCli

func (config Config) ParseCli(ctx *cli.Context) Config

ParseCli ...

type Consumer

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

Consumer ...

func ConsumeGroup

func ConsumeGroup(ctx context.Context, options Config) (*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 ...

Jump to

Keyboard shortcuts

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