Example #1
0
File: server.go Project: kr/doozerd
func bgNop(p consensus.Proposer) chan store.Event {
	ch := make(chan store.Event)
	go func() {
		ch <- p.Propose([]byte(store.Nop))
	}()
	return ch
}
Example #2
0
func setReady(p consensus.Proposer, self string) {
	m, err := store.EncodeSet("/ctl/node/"+self+"/writable", "true", 0)
	if err != nil {
		log.Println(err)
		return
	}
	p.Propose([]byte(m))
}