Exemple #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
}
Exemple #2
0
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
}