consumer

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2020 License: MIT Imports: 9 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 interface {
	ConsumeMessages() error
}

type ElasticSearchTarget

type ElasticSearchTarget struct {
	Server string
}

type KafkaSource

type KafkaSource struct {
	Brokers []string
	Topic   string
	Offset  int64
	GroupId string

	Reader *kafka.Reader
}

func (*KafkaSource) CreateConnection

func (source *KafkaSource) CreateConnection() error

type PrinterConsumer

type PrinterConsumer struct {
	Source       KafkaSource
	WorkerCount  int
	ConsumerName string
	Debug        bool
}

func (*PrinterConsumer) ConsumeMessages

func (s *PrinterConsumer) ConsumeMessages() error

type ProductionConsumer

type ProductionConsumer struct {
	Source      KafkaSource
	Target      ElasticSearchTarget
	WorkerCount int
	BulkSize    int
	Debug       bool
}

func (*ProductionConsumer) ConsumeMessages

func (s *ProductionConsumer) ConsumeMessages() error

Jump to

Keyboard shortcuts

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