kafkaclient

package
v0.0.0-...-9c428b3 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaClient

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

func NewKafkaClient

func NewKafkaClient() *KafkaClient

func (*KafkaClient) Publish

func (kc *KafkaClient) Publish(kafkaHost, topic string, key []byte, value []byte) error

Publish publishes a message to the specified Kafka topic. It takes the Kafka host, topic, payload, and key as parameters. If the connection to the Kafka host does not exist, it creates a new connection and caches it. Returns an error if there was a problem publishing the message.

Jump to

Keyboard shortcuts

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