started new web client
This commit is contained in:
1 parent
1b3d0ea70b
commit
fcff74109a
33 files changed
+232
-2585
No files matched your search
@@ -4,7 +4,6 @@ import (
|
||||
"log"
|
||||
|
||||
"github.com/didiercrunch/doormanserver/logpublisher"
|
||||
"github.com/didiercrunch/doormanserver/nanomsgpublisher"
|
||||
"github.com/didiercrunch/doormanserver/nsqpublisher"
|
||||
"github.com/didiercrunch/doormanserver/shared"
|
||||
"gopkg.in/mgo.v2/bson"
|
||||
@@ -25,21 +24,10 @@ func initNSQPublisher() {
|
||||
}
|
||||
}
|
||||
|
||||
func initNanoMsgPublisher() {
|
||||
publisher = new(nanomsgpublisher.NanoMsgPublisher)
|
||||
if err := publisher.Init(); err != nil {
|
||||
log.Panic(err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func initPublisher(params *shared.Params) {
|
||||
if params.UseNSQ() {
|
||||
initNSQPublisher()
|
||||
log.Println("using nsq as message queue")
|
||||
} else if params.UseNanomsg() {
|
||||
initNanoMsgPublisher()
|
||||
log.Println("using nanomsg as message queue")
|
||||
} else {
|
||||
publisher = &logpublisher.LogPublisher{log.Println}
|
||||
log.Println("using stdout as message queue")
|
||||
|
||||
Reference in new issue
Block a user