kafka

package
v0.0.0-...-1adeb67 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Example

func Example()

Types

type Consumer

type Consumer interface {
	Serve(ctx context.Context)
	Close()
}

func NewConsumer

func NewConsumer(brokers []string, topics map[string]MsgCallback) (Consumer, error)

type KafkaTxQueue

type KafkaTxQueue struct {
	Topic string
	Data  []byte
}

type MsgCallback

type MsgCallback chan []byte

type Producer

type Producer interface {
	Send(topic string, data []byte) error
	Serve()
	Shutdown() error
}

func NewProducer

func NewProducer(brokers []string, queue chan KafkaTxQueue) (Producer, error)

Jump to

Keyboard shortcuts

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