func Doozer() *skynet.DoozerConnection { defer func() { if r := recover(); r != nil { log.Error("Failed to connect to Doozer") os.Exit(1) } }() // nil as the last param will default to a Stdout logger conn := skynet.NewDoozerConnection(*doozer, *doozerboot, true, nil) conn.Connect() return conn }
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 }