1
0
mirror of https://github.com/rancher/os.git synced 2025-09-12 04:01:20 +00:00

First class consoles

This commit is contained in:
Josh Curl
2016-06-06 15:13:15 -07:00
parent b83f0ec092
commit 719d255636
16 changed files with 302 additions and 103 deletions

View File

@@ -21,6 +21,14 @@ var (
)
func GetServices(urls []string) ([]string, error) {
return getServices(urls, "services")
}
func GetConsoles(urls []string) ([]string, error) {
return getServices(urls, "consoles")
}
func getServices(urls []string, key string) ([]string, error) {
result := []string{}
for _, url := range urls {
@@ -38,7 +46,7 @@ func GetServices(urls []string) ([]string, error) {
continue
}
if list, ok := services["services"]; ok {
if list, ok := services[key]; ok {
result = append(result, list...)
}
}