kafka

package module
v0.0.0-...-3236bfa Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Consume

func Consume(
	ctx context.Context,
	topic, broker string,
	ch chan<- Message) error

Types

type Message

type Message struct {
	Value []byte
	Key   []byte
}

type Producer

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

func NewProducer

func NewProducer(ctx context.Context, broker string) (*Producer, error)

NewProducer creates new Producer.

func (*Producer) Produce

func (p *Producer) Produce(topic string, value, key []byte) error

Produce produces single message given by value and key to topic.

Jump to

Keyboard shortcuts

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