func GetTemplateData(config *conf.Configuration, conn *zk.Conn) interface{} { apps, _ := marathon.FetchApps(config.Marathon.Endpoint) services, _ := service.All(conn, config.Bamboo.Zookeeper) return templateData{apps, services} }
func GetTemplateData(config *conf.Configuration, conn *zk.Conn) interface{} { log.Println("Enter>> GetTemplateData") apps, _ := marathon.FetchApps(config.Marathon) services, _ := service.All(conn, config.Bamboo.Zookeeper) log.Println("EXIT<< GetTemplateData") return templateData{apps, services} }
func (d *ServiceAPI) All(w http.ResponseWriter, r *http.Request) { services, err := service.All(d.Zookeeper, d.Config.Bamboo.Zookeeper) if err != nil { responseError(w, err.Error()) return } responseJSON(w, services) }
func GetTemplateData(config *conf.Configuration, conn *zk.Conn) (*templateData, error) { apps, err := marathon.FetchApps(config.Marathon, config) if err != nil { return nil, err } services, err := service.All(conn, config.Bamboo.Zookeeper) if err != nil { return nil, err } return &templateData{apps, services}, nil }
func GetTemplateData(config *conf.Configuration, conn *zk.Conn) (interface{}, error) { apps, err := marathon.FetchApps(config.Marathon) if err != nil { return nil, err } services, err := service.All(conn, config.Bamboo.Zookeeper) if err != nil { return nil, err } env := make(map[string]string) for _, i := range os.Environ() { sep := strings.Index(i, "=") env[i[0:sep]] = i[sep+1:] } return templateData{apps, services, env}, nil }