Documentation ¶
Index ¶
- func Consumer(c sarama.Consumer, topic string, ch ChReceive)
- func ConsumerOnMultiplePartitions(c sarama.Consumer, topic string) error
- func CreateConsumer(host string, port int) (sarama.Consumer, error)
- func CreateMsg(topic, key, val string) *sarama.ProducerMessage
- func CreateProducer(host string, port int) (sarama.SyncProducer, error)
- func Producer(producer sarama.SyncProducer, msg *sarama.ProducerMessage) error
- type ChReceive
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConsumerOnMultiplePartitions ¶
ConsumerOnMultiplePartitions is is to start consumer in multiple partitions TODO: Work in progress. Not checked yet.
func CreateConsumer ¶
CreateConsumer is to create consumer
func CreateMsg ¶
func CreateMsg(topic, key, val string) *sarama.ProducerMessage
CreateMsg is to create message on topic
func CreateProducer ¶
func CreateProducer(host string, port int) (sarama.SyncProducer, error)
CreateProducer is to create producer
func Producer ¶
func Producer(producer sarama.SyncProducer, msg *sarama.ProducerMessage) error
Producer is to send message
Types ¶
type ChReceive ¶
type ChReceive struct { ChWait chan bool ChCMsg chan *sarama.ConsumerMessage }
ChReceive is struct of channel for receiver
Click to show internal directories.
Click to hide internal directories.