kafka

package
v0.0.0-...-21648fa Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKafkaClient

func NewKafkaClient(config Config, consumer bool) (*kgo.Client, error)

NewKafkaClient returns a new franz-go Kafka Client for the given Config.

Types

type Config

type Config struct {
	// BootstrapServers are the bootstrap servers to call.
	BootstrapServers []string
	RootCAPath       string
	Group            string
	Topic            string
	ClientID         string
}

Config is all configuration we need to build a new Kafka Client.

franz-go uses functional options for the same purpose, but we're simplifying this to just the values in this config struct for the purposes of this demo. If you use franz-go in production code, we'd recommend using the functional options directly.

Jump to

Keyboard shortcuts

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