func mustEncodeSet(k, v string) string { m, err := store.EncodeSet(k, v, store.Clobber) if err != nil { panic(err) } return m }
func Set(p Proposer, path string, body []byte, rev int64) (e store.Event) { e.Mut, e.Err = store.EncodeSet(path, string(body), rev) if e.Err != nil { return } return p.Propose([]byte(e.Mut)) }
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)) }
func Set(p Proposer, path, body, cas string) (uint64, string, os.Error) { mut, err := store.EncodeSet(path, body, cas) if err != nil { return 0, "", err } return p.Propose(mut) }