예제 #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
}
예제 #2
0
func CreateSupervisorPath() {
	Zk.Touch(helper.GetBaseSupervisorPath())
}
예제 #3
0
func (h ZkSupervisor) path() string {
	return helper.GetBaseSupervisorPath(string(h))
}
예제 #4
0
func (h ZkSupervisor) containerPath(container string) string {
	return helper.GetBaseSupervisorPath(string(h), container)
}