Skip to content
Snippets Groups Projects

Use SPF Viper for configuration

1 file
+ 1
13
Compare changes
  • Side-by-side
  • Inline
+ 1
13
@@ -2,27 +2,15 @@ package main
import (
"code.fbi.h-da.de/cocsn/gosdn/nucleus"
"flag"
log "github.com/sirupsen/logrus"
)
func main() {
// register our supported flags
cliListenAddr := flag.String("cli-listen-addr", "", "The IP address of the grpcCLI.")
cliListenPort := flag.String("cli-server-port", "55055", "The port number of the grpcCLI")
configFileName := flag.String("config-file", "", "Path to the config file")
flag.Parse()
cliSocket := *cliListenAddr + ":" + *cliListenPort
log.SetLevel(log.DebugLevel)
// Setup a channel to communicate if goSDN should shutdown.
IsRunningChannel := make(chan bool)
// hand off to cmd for further processing
nucleus.StartAndRun(cliSocket, *configFileName, IsRunningChannel)
// nothing to see here, please move on!
nucleus.StartAndRun(IsRunningChannel)
}
Loading