mirror of
https://github.com/dragonheim/gagent.git
synced 2025-05-24 12:16:47 -07:00
Going to trigger a build and test on the cluster.
This commit is contained in:
parent
856cebb0dc
commit
802d1b0a48
4 changed files with 51 additions and 36 deletions
|
@ -13,7 +13,7 @@ import (
|
|||
|
||||
// client "git.dragonheim.net/dragonheim/gagent/src/client"
|
||||
gr "git.dragonheim.net/dragonheim/gagent/src/router"
|
||||
// worker "git.dragonheim.net/dragonheim/gagent/src/worker"
|
||||
gw "git.dragonheim.net/dragonheim/gagent/src/worker"
|
||||
|
||||
docopt "github.com/aviddiviner/docopt-go"
|
||||
hclsimple "github.com/hashicorp/hcl/v2/hclsimple"
|
||||
|
@ -30,7 +30,6 @@ var exitCodes = struct {
|
|||
"AGENT_LOAD_FAILED": 4,
|
||||
"AGENT_MISSING_TAGS": 5,
|
||||
"NO_ROUTERS_DEFINED": 6,
|
||||
"NO_WORKERS_DEFINED": 6,
|
||||
"NO_WORKERS_DEFINED": 7,
|
||||
}}
|
||||
|
||||
|
@ -149,6 +148,12 @@ func main() {
|
|||
log.Printf("Arguments are %v\n", arguments)
|
||||
log.Printf("Configuration is %v\n", config)
|
||||
log.Printf("Running in router mode\n")
|
||||
|
||||
if len(config.Workers) == 0 {
|
||||
log.Printf("No workers defined.\n")
|
||||
os.Exit(exitCodes.m["NO_WORKERS_DEFINED"])
|
||||
}
|
||||
|
||||
go gr.Main(config)
|
||||
select {}
|
||||
|
||||
|
@ -161,8 +166,15 @@ func main() {
|
|||
*/
|
||||
log.Printf("Arguments are %v\n", arguments)
|
||||
log.Printf("Configuration is %v\n", config)
|
||||
// go worker.Main(config)
|
||||
// select {}
|
||||
log.Printf("Running in worker mode\n")
|
||||
|
||||
if len(config.Routers) == 0 {
|
||||
log.Printf("No routers defined.\n")
|
||||
os.Exit(exitCodes.m["NO_ROUTERS_DEFINED"])
|
||||
}
|
||||
|
||||
go gw.Main(config)
|
||||
select {}
|
||||
|
||||
case "setup":
|
||||
log.Printf("Running in setup mode\n")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue