kafka

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddService

func AddService(config service.Config)

func BatchMessages added in v0.3.5

func BatchMessages(values <-chan kafka.Message, maxItems int, maxTimeout time.Duration) chan []kafka.Message

func Handle

func Handle(messages <-chan kafka.Message) <-chan kafka.Message

func MessageAsString added in v0.3.9

func MessageAsString(message kafka.Message) string

func NewConsumer

func NewConsumer(kafkaURL, topic, groupID string, done context.Context) <-chan kafka.Message

func NewProducer

func NewProducer(kafkaURL, topic string, in <-chan kafka.Message)

func Start

func Start(done context.Context)

func Writer added in v0.3.5

func Writer(kafkaURL, topic string) *kafka.Writer

Types

type SimpleMessage added in v0.3.9

type SimpleMessage struct {
	Topic         string
	Partition     int
	Offset        int64
	HighWaterMark int64
	Headers       []kafka.Header
	Time          time.Time
	Key           string
	Value         string
}

func MessageSimplified added in v0.3.9

func MessageSimplified(message kafka.Message) SimpleMessage

func MessagesSimplified added in v0.3.9

func MessagesSimplified(messages []kafka.Message) []SimpleMessage

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳