cool agent startup prints
Jes Olson j3s@c3f.net
Mon, 20 Feb 2023 19:42:37 -0800
1 files changed,
13 insertions(+),
1 deletions(-)
jump to
M
command/agent/agent.go
→
command/agent/agent.go
@@ -70,12 +70,24 @@ fmt.Println(err)
os.Exit(1) } agent := agent.New(config) + + fmt.Printf("-> starting cascade agent\n") + fmt.Printf(" node '%s'\n", config.NodeName) + if len(config.StartJoin) > 0 { + fmt.Printf(" join '%s'\n", config.StartJoin) + } + fmt.Printf(" bind addrs:\n") + fmt.Printf(" dns '%s'\n", config.DNSBindAddr) + fmt.Printf(" http '%s'\n", config.HTTPBindAddr) + fmt.Printf(" serf '%s'\n", config.SerfBindAddr) + fmt.Printf("\n-> logs\n") + if err := agent.Start(); err != nil { fmt.Println(err) os.Exit(1) } defer agent.Shutdown() - // join any specified startup nodes + if err := startupJoin(agent); err != nil { fmt.Println(err) os.Exit(1)