mirror of
https://github.com/buger/goreplay.git
synced 2024-04-21 12:32:02 +00:00
Update documentation
This commit is contained in:
+4
-3
@@ -8,17 +8,18 @@ import (
|
||||
"github.com/Shopify/sarama"
|
||||
)
|
||||
|
||||
// KafkaInput should make consumer client.
|
||||
// KafkaInput is used for recieving Kafka messages and
|
||||
// transforming them into HTTP payloads.
|
||||
type KafkaInput struct {
|
||||
config *KafkaConfig
|
||||
consumers []sarama.PartitionConsumer
|
||||
messages chan *sarama.ConsumerMessage
|
||||
}
|
||||
|
||||
// NewKafkaInput constructor for KafkaInput
|
||||
// NewKafkaInput creates instance of kafka consumer client.
|
||||
func NewKafkaInput(address string, config *KafkaConfig) *KafkaInput {
|
||||
c := sarama.NewConfig()
|
||||
// c.Consumer.
|
||||
// Configuration options go here
|
||||
|
||||
con, err := sarama.NewConsumer([]string{config.host}, c)
|
||||
if err != nil {
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import (
|
||||
"github.com/buger/gor/proto"
|
||||
)
|
||||
|
||||
// KafkaOutput should make producer client.
|
||||
// KafkaOutput is used for sending payloads to kafka in JSON format.
|
||||
type KafkaOutput struct {
|
||||
config *KafkaConfig
|
||||
producer sarama.AsyncProducer
|
||||
|
||||
Reference in New Issue
Block a user