Gather status of services in About handler.
This commit is contained in:
parent
9e2e490f4a
commit
a545d2b2a2
@ -6,6 +6,7 @@ import (
|
||||
"time"
|
||||
|
||||
"git.arav.top/Arav/dwelling-home/pkg/mindflow"
|
||||
"git.arav.top/Arav/dwelling-home/pkg/servicestat"
|
||||
"git.arav.top/Arav/dwelling-home/web"
|
||||
)
|
||||
|
||||
@ -44,7 +45,21 @@ func (h *Handlers) Mindflow(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func (h *Handlers) About(w http.ResponseWriter, r *http.Request) {
|
||||
web.About("/ About", "", nil, w)
|
||||
var lst servicestat.ServiceList = make(servicestat.ServiceList)
|
||||
reimu, err := servicestat.GatherStatus("http://reimu.arav.home.arpa:14882/processes")
|
||||
if err == nil {
|
||||
for k, v := range reimu {
|
||||
lst[k] = v
|
||||
}
|
||||
}
|
||||
sakuya, err := servicestat.GatherStatus("http://sakuya.arav.home.arpa:14882/processes")
|
||||
if err == nil {
|
||||
for k, v := range sakuya {
|
||||
lst[k] = v
|
||||
}
|
||||
}
|
||||
|
||||
web.About("/ About", "", lst, w)
|
||||
}
|
||||
|
||||
func (h *Handlers) Article(w http.ResponseWriter, r *http.Request) {
|
||||
|
Loading…
Reference in New Issue
Block a user