Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Channel to detect when the client is do with the process. Done = make(chan bool) )
Functions ¶
func NewProducer ¶
func NewProducer(brokers string) sarama.AsyncProducer
NewProducer returns a new Sarama async producer.
func Prepare ¶
func Prepare(producer sarama.AsyncProducer, message []byte, numMessages int) func()
Prepare returns a function that can be used during the benchmark as it only performs the sending of messages, checking that the sending was successful.
func PrepareConsume ¶
func PrepareConsume(consumer *Consumer) func()
PrepareConsume returns a function that can be used during the benchmark as it only performs the consuming of messages.
Types ¶
type Consumer ¶
type Consumer struct { Client sarama.ConsumerGroup Ready chan bool // contains filtered or unexported fields }
Consumer represents a Sarama consumer group consumer
func NewConsumer ¶
NewConsumer returns a new sarama consumer.
func (*Consumer) Cleanup ¶
func (consumer *Consumer) Cleanup(sarama.ConsumerGroupSession) error
Cleanup is run at the end of a session, once all ConsumeClaim goroutines have exited
func (*Consumer) ConsumeClaim ¶
func (consumer *Consumer) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
ConsumeClaim must start a consumer loop of ConsumerGroupClaim's Messages().
Click to show internal directories.
Click to hide internal directories.