change keyword from /machines to /_etcd/machines

This commit is contained in:
Xiang Li 2013-07-31 19:40:40 -07:00
parent 04eea356e4
commit cc428c4e84
2 changed files with 2 additions and 3 deletions

View File

@ -134,7 +134,7 @@ func (c *JoinCommand) Apply(raftServer *raft.Server) (interface{}, error) {
// add machine in etcd storage
nodeName := fmt.Sprintf("%s%d", "node", raftServer.CommitIndex())
key := path.Join("machines", nodeName)
key := path.Join("_etcd/machines", nodeName)
value := fmt.Sprintf("%s,%d,%d", c.Hostname, c.RaftPort, c.ClientPort)
etcdStore.Set(key, value, time.Unix(0, 0), raftServer.CommitIndex())

View File

@ -8,9 +8,8 @@ import (
// keywords for internal useage
// Key for string keyword; Value for only checking prefix
var keywords = map[string]bool{
"/acoounts": true,
"/_etcd": true,
"/ephemeralNodes": true,
"/machines": true,
}
// CheckKeyword will check if the key contains the keyword.