File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
src/distributed/coordinator Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,16 @@ import (
55 "fmt"
66)
77
8+ var dc * coordinator.DatabaseConsumer
9+
810func main () {
9- ql := coordinator .NewQueueListener ()
11+
12+ // wiring event aggreagtor to coordinator package
13+ ea := coordinator .NewEventAggregator ()
14+ // instantiating package level databse consumer
15+ dc := coordinator .NewDataConsumer (ea )
16+
17+ ql := coordinator .NewQueueListener (ea )
1018 go ql .ListenForNewSource ()
1119
1220 var a string
Original file line number Diff line number Diff line change @@ -32,11 +32,11 @@ type QueueListener struct {
3232// NewQueueListener is a constructor function
3333// that ensures that the QueueListener is
3434// properly initialized
35- func NewQueueListener () * QueueListener {
35+ func NewQueueListener (ea * EventAggregator ) * QueueListener {
3636 //instantiating new object of queuelistener
3737 ql := QueueListener {
3838 sources : make (map [string ]<- chan amqp.Delivery ),
39- ea : NewEventAggregator () ,
39+ ea : ea ,
4040 }
4141
4242 //populating the Connection and Channel fields
You can’t perform that action at this time.
0 commit comments