Example #1
0
func ListSupervisors() (hosts []string, err error) {
	hosts, _, err = Zk.Children(helper.GetBaseSupervisorPath())
	if err != nil {
		log.Printf("Error getting list of hosts. Error: %s.", err.Error())
	}
	if hosts == nil {
		log.Println("No hosts found. Returning empty list.")
		hosts = []string{}
	}
	return
}
Example #2
0
func CreateSupervisorPath() {
	Zk.Touch(helper.GetBaseSupervisorPath())
}
Example #3
0
func (h ZkSupervisor) path() string {
	return helper.GetBaseSupervisorPath(string(h))
}
Example #4
0
func (h ZkSupervisor) containerPath(container string) string {
	return helper.GetBaseSupervisorPath(string(h), container)
}