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.
Click to show internal directories.
Click to hide internal directories.