示例#1
0
func Doozer() *skynet.DoozerConnection {
	defer func() {
		if r := recover(); r != nil {
			log.Println("Failed to connect to Doozer")
			os.Exit(1)
		}
	}()

	conn := skynet.NewDoozerConnection(*doozer, *doozerboot, true, nil) // nil as the last param will default to a Stdout logger
	conn.Connect()

	return conn
}
示例#2
0
文件: sky.go 项目: yahame/skynet
func Connect(dcfg *skynet.DoozerConfig) *skynet.DoozerConnection {
	defer func() {
		if r := recover(); r != nil {
			fmt.Println("Failed to connect to Doozer")
			os.Exit(1)
		}
	}()

	// TODO: This needs to come from command line, or environment variable
	conn := skynet.NewDoozerConnection(dcfg.Uri, "", false, nil) // nil as the last param will default to a Stdout logger
	conn.Connect()

	return conn
}