Update documentation

This commit is contained in:
Nicholas Wiersma
2016-12-22 10:28:35 +01:00
parent 1f19e550bb
commit dfd5fa0c4f
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -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
View File
@@ -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