示例#1
0
func service() (err error) {
	log.Info(`Starting with 'service' role...`)
	err = bootstrap()
	if err != nil {
		log.Error(fmt.Sprintf(`main.service() bootstrap() ! %s`, err))
		os.Exit(1)
	}
	go admin.API()
	go tasks.Scheduler()
	go tasks.Work()
	err = signalHandler()
	return
}
示例#2
0
func manager() (err error) {
	log.Info(`Starting with 'manager' role...`)
	err = bootstrap()
	if err != nil {
		log.Error(fmt.Sprintf(`main.manager() bootstrap() ! %s`, err))
		os.Exit(1)
	}
	go admin.API()
	go cfsb.API()
	go tasks.Scheduler(Role)
	go tasks.Work(Role)
	err = signalHandler()
	return
}