func Heartbeat(client *etcd.Client, name string, taskID uint64, interval time.Duration, stop chan struct{}) error {
	for {
		_, err := client.Set(TaskHealthyPath(name, taskID), "health", computeTTL(interval))
		if err != nil {
			return err
		}
		select {
		case <-time.After(interval):
		case <-stop:
			return nil
		}
	}
}
// heartbeat to etcd cluster until stop
heartbeat to etcd cluster until stop
// heartbeat to etcd cluster until stop
func Heartbeat(client *etcd.Client, name string, taskID uint64, interval time.Duration, stop chan struct{}) error {
	for {
		_, err := client.Set(TaskHealthyPath(name, taskID), "health", computeTTL(interval))
		if err != nil {
			return err
		}
		select {
		case <-time.After(interval):
		case <-stop:
			return nil
		}
	}
}
func Heartbeat ( client * etcd . Client , name string , taskID uint64 , interval time . Duration , stop chan struct { } ) error { for { _ , err := client . Set ( TaskHealthyPath ( name , taskID ) , " " , computeTTL ( interval ) ) if err != nil { return err } select { case <- time . After ( interval ) : case <- stop : return nil } } }
heartbeat to etcd cluster until stop
heartbeat to etcd cluster until stop