kafka

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: MIT Imports: 7 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 represents the kafka consumer which will consume messages from a topic

func NewConsumer

func NewConsumer(log logger.Log, topic string, config *confluent.ConfigMap, collector instrument.Collector, bufferSize int) (Consumer, error)

NewConsumer constructor for Consumer

func (*Consumer) Run

func (c *Consumer) Run(wg *sync.WaitGroup) (chan *confluent.Message, error)

Run will start the Consumer process by joining the WaitGroup

func (Consumer) Stop

func (c Consumer) Stop()

Stop stops the consumer by sending a signal

type Producer

type Producer struct {
	// contains filtered or unexported fields
}

Producer represents the kafka producer which will produce the transformed message to a topic defined in the Message

func NewProducer

func NewProducer(l logger.Log, config *confluent.ConfigMap, collector instrument.Collector) (Producer, error)

NewProducer constructor for Producer

func (*Producer) Close

func (p *Producer) Close()

Close will close all ressources and the kafka producer

func (Producer) Project

func (p Producer) Project(msg *confluent.Message)

Project implements the Projector interface

Jump to

Keyboard shortcuts

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