func ListenToZooKeeper(config c.Zookeeper, deb bool) (chan zk.Event, chan bool) { c, _, err := zk.Connect(config.ConnectionString(), time.Second) if err != nil { panic(err) } return ListenToConn(c, config.Path, deb, config.Delay()) }
func createAndListen(conf configuration.Zookeeper) (chan zk.Event, *zk.Conn) { conn, _, err := zk.Connect(conf.ConnectionString(), time.Second*10) if err != nil { log.Panic(err) } ch, _ := qzk.ListenToConn(conn, conf.Path, true, conf.Delay()) return ch, conn }