kafka

package
v0.0.0-...-3bd2bae Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConsumer

func NewConsumer(brokers []string, topic string, group string) *kaf.Reader

NewConsumer creates a new kafka consumer.

func NewProducer

func NewProducer(brokers []string) *kaf.Writer

NewProducer creates a new kafka producer.

Types

type Client

type Client struct {
	Consumer *kaf.Reader
	Producer *kaf.Writer
}

Client struct.

func NewKafkaClient

func NewKafkaClient(read bool, write bool, brokers []string, topic string, group string, readOldest bool) *Client

NewKafkaClient creates a new KafkaClient struct.

func (*Client) Close

func (client *Client) Close()

Close closes active consumers/producers.

Jump to

Keyboard shortcuts

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