new [dev] .gitignore + fmt
parent
aedc171264
commit
9a07cf10a0
12
balboa.go
12
balboa.go
|
@ -1,14 +1,14 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"strconv"
|
"strconv"
|
||||||
"errors"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/D4-project/d4-golang-utils/config"
|
"github.com/D4-project/d4-golang-utils/config"
|
||||||
|
@ -83,8 +83,8 @@ func main() {
|
||||||
c.redisPort = sss[1]
|
c.redisPort = sss[1]
|
||||||
}
|
}
|
||||||
c.redisQueue = string(config.ReadConfigFile(*confdir, "redis_queue"))
|
c.redisQueue = string(config.ReadConfigFile(*confdir, "redis_queue"))
|
||||||
c.balboaSocket = string(config.ReadConfigFile(*confdir, "balboa_socket"))
|
c.balboaSocket = string(config.ReadConfigFile(*confdir, "balboa_socket"))
|
||||||
//TODO: handle empty ...
|
//TODO: handle empty ...
|
||||||
|
|
||||||
initRedis(c.redisHost, c.redisPort, c.redisDB)
|
initRedis(c.redisHost, c.redisPort, c.redisDB)
|
||||||
defer cr.Close()
|
defer cr.Close()
|
||||||
|
@ -99,9 +99,9 @@ func main() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("Queue processed")
|
log.Fatal("Queue processed")
|
||||||
}
|
}
|
||||||
// Write in Balboa socket
|
// Write in Balboa socket
|
||||||
cs.Write([]byte(dnsLine))
|
cs.Write([]byte(dnsLine))
|
||||||
//TODO: Check that it works...
|
//TODO: Check that it works...
|
||||||
|
|
||||||
// Exit Signal Handle
|
// Exit Signal Handle
|
||||||
select {
|
select {
|
||||||
|
|
Loading…
Reference in New Issue