1
0
mirror of https://github.com/divan/expvarmon.git synced 2025-04-27 13:48:55 +08:00
expvarmon/ui_dummy.go

31 lines
545 B
Go
Raw Normal View History

2015-04-21 12:51:01 +03:00
package main
import (
"fmt"
)
// DummyUI is an simple console UI mockup, for testing purposes.
type DummyUI struct{}
2015-05-01 14:37:28 +03:00
func (*DummyUI) Init(UIData) {}
func (*DummyUI) Close() {}
func (*DummyUI) Update(data UIData) {
2015-04-21 12:51:01 +03:00
if data.Services == nil {
return
}
for _, service := range data.Services {
fmt.Printf("%s: ", service.Name)
if service.Err != nil {
fmt.Printf("ERROR: %s", service.Err)
continue
}
2015-04-25 15:54:17 +03:00
/*
if service.Goroutines != 0 {
fmt.Printf("goroutines: %d", service.Goroutines)
}
*/
2015-04-21 12:51:01 +03:00
fmt.Printf("\n")
}
}