kafkaconfig

package
v0.0.0-...-50c92f1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaProducer

type KafkaProducer interface {
	SendMessage(topic string, message []byte) error
}

type SaramaProducer

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

SaramaProducer is a wrapper around sarama.SyncProducer that implements the KafkaProducer interface.

func NewSaramaProducer

func NewSaramaProducer(producer sarama.SyncProducer) *SaramaProducer

NewSaramaProducer creates a new SaramaProducer.

func (*SaramaProducer) SendMessage

func (p *SaramaProducer) SendMessage(topic string, message []byte) error

SendMessage sends a message to a specific Kafka topic.

Jump to

Keyboard shortcuts

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