Make function names more consistent
This commit is contained in:
parent
290b1dfd4e
commit
9141fd9f80
|
@ -59,8 +59,8 @@ func Shutdown() {
|
|||
}
|
||||
}
|
||||
|
||||
// MakeStream creates a satan.Streamer implementation for Kafka messaging queue.
|
||||
func MakeStream(consumer, topic string) satan.Streamer {
|
||||
// Subscribe creates a satan.Streamer implementation for Kafka messaging queue.
|
||||
func Subscribe(consumer, topic string) satan.Streamer {
|
||||
c, ok := consumers[consumer]
|
||||
if !ok {
|
||||
panic(fmt.Errorf("Consumer %q has no config", consumer))
|
||||
|
|
|
@ -30,7 +30,7 @@ func main() {
|
|||
defer kafka.Shutdown()
|
||||
|
||||
s := satan.Summon()
|
||||
s.SubscribeFunc = kafka.MakeStream
|
||||
s.SubscribeFunc = kafka.Subscribe
|
||||
s.AddDaemon(&daemons.NumberPrinter{})
|
||||
s.AddDaemon(&daemons.PriceConsumer{})
|
||||
|
||||
|
|
Loading…
Reference in New Issue