Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: cd7b918e8b
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (22 sloc) 0.462 kb
package gc
import (
"github.com/ha/doozerd/consensus"
"github.com/ha/doozerd/store"
"log"
"strconv"
"time"
)
func Pulse(node string, seqns <-chan int64, p consensus.Proposer, sleep int64) {
path := "/ctl/node/" + node + "/applied"
for {
seqn, ok := <-seqns
if !ok {
break
}
e := consensus.Set(p, path, []byte(strconv.FormatInt(seqn, 10)), store.Clobber)
if e.Err != nil {
log.Println(e.Err)
}
time.Sleep(time.Duration(sleep))
}
}
Jump to Line
Something went wrong with that request. Please try again.