started new web client

This commit is contained in:
didier amyot committed 2020-01-19 15:14:21 -05:00
1 parent 1b3d0ea70b
commit fcff74109a
33 files changed
+232 -2585

No files matched your search

-12
View File
@@ -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")