Exemple #1
0
// 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)
		}
	}
}
Exemple #2
0
// 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)
		}
	}
}
Exemple #3
0
// 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)
		}
	}
}
Exemple #4
0
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)
		}
	}
}
Exemple #5
0
// 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)
	}
}
Exemple #6
0
// 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)
		}
	}
}