Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NewProducerWrapper = func(configMap *kafka.ConfigMap) (ProducerInterface, error) { return kafka.NewProducer(configMap) }
Kafka Function Reference Variable To Facilitate Mocking In Unit Tests
Functions ¶
This section is empty.
Types ¶
type ProducerInterface ¶
type ProducerInterface interface { String() string Produce(msg *kafka.Message, deliveryChan chan kafka.Event) error Events() chan kafka.Event ProduceChannel() chan *kafka.Message Len() int Flush(timeoutMs int) int Close() }
Confluent Client Doesn't Code To Interfaces Or Provide Mocks So We're Wrapping Our Usage Of The Producer For Testing
func CreateProducer ¶
func CreateProducer(brokers string, username string, password string) (ProducerInterface, error)
Create A Kafka Producer (Optional Authentication)
Click to show internal directories.
Click to hide internal directories.