Skip to content

Commit

Permalink
indicate version in node info
Browse files Browse the repository at this point in the history
  • Loading branch information
kr committed Feb 11, 2011
1 parent d021289 commit 0c2f215
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/pkg/doozer.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func Main(clusterName, attachAddr string, udpConn net.PacketConn, listener, webL
if attachAddr == "" { // we are the only node in a new cluster
set(st, "/doozer/info/"+self+"/public-addr", listenAddr, store.Missing)
set(st, "/doozer/info/"+self+"/hostname", os.Getenv("HOSTNAME"), store.Missing)
set(st, "/doozer/info/"+self+"/version", Version, store.Missing)
set(st, "/doozer/members/"+self, listenAddr, store.Missing)
set(st, "/doozer/slot/"+"1", self, store.Missing)
set(st, "/ping", "pong", store.Missing)
Expand All @@ -67,6 +68,12 @@ func Main(clusterName, attachAddr string, udpConn net.PacketConn, listener, webL
panic(err)
}

path = "/doozer/info/" + self + "/version"
_, err = cl.Set(path, store.Clobber, []byte(Version))
if err != nil {
panic(err)
}

joinSeqn, snap, err := cl.Join(self, listenAddr)
if err != nil {
panic(err)
Expand Down

0 comments on commit 0c2f215

Please sign in to comment.