1
0
Fork 0

Compare commits

...

2 Commits

2 changed files with 3 additions and 2 deletions

View File

@ -3,6 +3,7 @@ package servicestat
import (
"encoding/json"
"net/http"
"time"
)
type ServiceList map[string]bool
@ -11,7 +12,7 @@ func GatherStatus(url string) (lst ServiceList, err error) {
rq, _ := http.NewRequest(http.MethodGet, url, nil)
rq.Header.Set("Content-Type", "application/json")
cl := &http.Client{}
cl := &http.Client{Timeout: 1 * time.Second}
r, err := cl.Do(rq)
if err != nil {
return lst, err

View File

@ -15,7 +15,7 @@ block nav
h1 About
mixin isServiceUp(header, service)
if (services[service])
if v, ok := services[service]; ok && v
h3.service-up= header
else
h3.service-down= header