Example #1
0
File: main.go Project: romana/core
// 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)
		}
	}
}
Example #2
0
File: main.go Project: romana/core
// 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)
		}
	}
}
Example #3
0
File: main.go Project: romana/core
// 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)
		}
	}
}
Example #4
0
File: main.go Project: romana/core
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)
		}
	}
}
Example #5
0
File: main.go Project: romana/core
// 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)
	}
}
Example #6
0
File: main.go Project: romana/core
// 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)
		}
	}
}