Documentation
¶
Index ¶
- Variables
- func ConfigureReader(kafkaBrokerUrls []string, clientId string, topic string)
- func ConfigureWriter(kafkaBrokerUrls []string, clientId string, topic string)
- func LoadConsumer(brokerId string, topic string)
- func LoadPublisher(brokerId string, topic string)
- func Push(key, value []byte) (err error)
- func Read(handler func(value string))
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Contains the broker url for the kafka cluster. KafkaBrokerUrl string // Contains the topic used for interacting with the broker. KafkaTopic string )
View Source
var Reader *kafka.Reader
Instance variable Reader to be used for reading from a kafka topic. Must be configured before calling the Read method.
View Source
var Writer *kafka.Writer
Instance variable Writer to be used for writing to a kafka topic. Must be configured before calling the Push method.
Functions ¶
func ConfigureReader ¶
Configures the Kafka reader for a given topic listening to the broker url.
func ConfigureWriter ¶
Configures the Kafka writer for a given topic publishing to the broker url.
func LoadConsumer ¶
Configures the Reader to register a subscriber for the the kafka broker and topic.
func LoadPublisher ¶
Configures the Writer to register a publisher for the the kafka broker and topic.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.