Permalink
Browse files

commentary for .FetchStats()

  • Loading branch information...
skelterjohn committed Oct 11, 2012
1 parent 14b7ff9 commit 18cba8f07b5c96cc6ee60992481b5637ee4e2cc2
Showing with 3 additions and 1 deletion.
  1. +3 −1 serviceinfo.go
View
@@ -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)

0 comments on commit 18cba8f

Please sign in to comment.