// Main entry point for the IPAM microservice func main() { cs := common.NewCliState() ipam := &ipam.IPAM{} svcInfo, err := cs.StartService(ipam) if err != nil { panic(err) } if svcInfo != nil { for { msg := <-svcInfo.Channel fmt.Println(msg) } } }
// Main entry point for the topology microservice func main() { cs := common.NewCliState() topo := &topology.TopologySvc{} svcInfo, err := cs.StartService(topo) if err != nil { panic(err) } if svcInfo != nil { for { msg := <-svcInfo.Channel fmt.Println(msg) } } }
// Main entry point for the tenant microservice func main() { cs := common.NewCliState() tenant := &tenant.TenantSvc{} svcInfo, err := cs.StartService(tenant) if err != nil { panic(err) } if svcInfo != nil { for { msg := <-svcInfo.Channel fmt.Println(msg) } } }
func main() { cs := common.NewCliState() l := &listener.KubeListener{} svcInfo, err := cs.StartService(l) if err != nil { panic(err) } if svcInfo != nil { for { msg := <-svcInfo.Channel fmt.Println(msg) } } }
// Main entry point for the root microservice func main() { cs := common.NewCliState() err := cs.Init() if err != nil { panic(err) } if *cs.ConfigFile == "" { fmt.Println("Must specify configFileName.") return } svcInfo, err := root.Run(*cs.ConfigFile) for { msg := <-svcInfo.Channel log.Println(msg) } }
// main function is entrypoint to everything. func main() { cs := common.NewCliState() a := &agent.Agent{TestMode: false} helper := agent.NewAgentHelper(a) a.Helper = &helper svcInfo, err := cs.StartService(a) if err != nil { panic(err) } if svcInfo != nil { for { msg := <-svcInfo.Channel fmt.Println(msg) } } }