Browse Source

stub creation of producer/consumer

Evan Huus 12 years ago
parent
commit
5fbffdc5fa
2 changed files with 12 additions and 2 deletions
  1. 6 1
      consumer.go
  2. 6 1
      producer.go

+ 6 - 1
consumer.go

@@ -1,5 +1,10 @@
 package kafka
 
 type Consumer struct {
-	client Client
+	client *Client
+	topic string
+}
+
+func NewConsumer(client *Client, topic string) *Consumer {
+	return &Consumer{client, topic}
 }

+ 6 - 1
producer.go

@@ -1,5 +1,10 @@
 package kafka
 
 type Producer struct {
-	client Client
+	client *Client
+	topic string
+}
+
+func NewProducer(client *Client, topic string) *Producer {
+	return &Producer{client, topic}
 }