Skip to content

Commit

Permalink
commentary for .FetchStats()
Browse files Browse the repository at this point in the history
  • Loading branch information
skelterjohn committed Oct 11, 2012
1 parent 14b7ff9 commit 18cba8f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion serviceinfo.go
Expand Up @@ -25,14 +25,16 @@ type ServiceInfo struct {
}

func (s *ServiceInfo) GetConfigPath() string {
// return "/services/" + s.Config.Name + "/" + s.Config.Version + "/" + s.Config.Region + "/" + s.Config.ServiceAddr.IPAddress + "/" + strconv.Itoa(s.Config.ServiceAddr.Port)
return path.Join("/services", s.Config.Name, s.Config.Version, s.Config.Region, s.Config.ServiceAddr.IPAddress, strconv.Itoa(s.Config.ServiceAddr.Port))
}

func (s *ServiceInfo) GetStatsPath() string {
return path.Join("/statistics", s.Config.Name, s.Config.Version, s.Config.Region, s.Config.ServiceAddr.IPAddress, strconv.Itoa(s.Config.ServiceAddr.Port))
}

/*
*ServiceInfo.FetchStats will query the provided doozer connection and update its .Stats field.
*/
func (s *ServiceInfo) FetchStats(doozer *DoozerConnection) (err error) {
rev := doozer.GetCurrentRevision()
data, _, err := doozer.Get(s.GetStatsPath(), rev)
Expand Down

0 comments on commit 18cba8f

Please sign in to comment.