1
0
Fork 0

Rename ambiguous argument

This commit is contained in:
Gregory Eremin 2016-01-25 03:22:36 +03:00
parent 9269f41051
commit 08cf3bf4da
2 changed files with 5 additions and 5 deletions

View File

@ -71,14 +71,14 @@ func Shutdown() {
}
// Subscribe creates a shezmu.Streamer implementation for Kafka messaging queue.
func (s Subscriber) Subscribe(consumer, topic string) shezmu.Streamer {
c, ok := consumers[consumer]
func (s Subscriber) Subscribe(consumerName, topic string) shezmu.Streamer {
c, ok := consumers[consumerName]
if !ok {
panic(fmt.Errorf("Consumer %q has no config", consumer))
panic(fmt.Errorf("Consumer %q has no config", consumerName))
}
t, ok := c[topic]
if !ok {
panic(fmt.Errorf("Consumer %q has no config for topic %q", consumer, topic))
panic(fmt.Errorf("Consumer %q has no config for topic %q", consumerName, topic))
}
pc, err := kafkaConsumer.ConsumePartition(topic, t.Partition, t.Offset)

View File

@ -34,7 +34,7 @@ type Actor func()
// Subscriber is the interface that is used by daemons to subscribe to messages.
type Subscriber interface {
Subscribe(consumer, topic string) Streamer
Subscribe(consumerName, topic string) Streamer
}
// Streamer is the interface that wraps message consumers. Error handling