Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
Brokers []string
ConsumerGroupName string
ConsumerTopics []string
ProducerTopic string
}
Adapter allows conveniently connecting to Kafka, and creates required Topics and channels for Kafka-communication.
type IO ¶
type IO struct {
// contains filtered or unexported fields
}
IO provides channels for interacting with Kafka. Note: All receive-channels must be read from to prevent deadlock.
func (*IO) ConsumerErrors ¶
ConsumerErrors returns send-channel where consumer errors are published.
func (*IO) ConsumerMessages ¶
func (kio *IO) ConsumerMessages() <-chan *sarama.ConsumerMessage
ConsumerMessages returns send-channel where consumer messages are published.
func (*IO) MarkOffset ¶
func (kio *IO) MarkOffset() chan<- *sarama.ConsumerMessage
MarkOffset marks the consumer message-offset to be committed. This should be used once a message has done its job.
func (*IO) ProducerErrors ¶
func (kio *IO) ProducerErrors() <-chan *sarama.ProducerError
ProducerErrors returns send-channel where producer errors are published.
func (*IO) ProducerInput ¶
func (kio *IO) ProducerInput() chan<- *model.KafkaResponse
ProducerInput returns receive-channel where kafka-responses can be produced.