2015-09-01 03:17:13 +00:00
|
|
|
package monitor
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
)
|
|
|
|
|
2015-09-04 20:14:38 +00:00
|
|
|
// goRuntime captures Go runtime diagnostics
|
2015-09-01 03:17:13 +00:00
|
|
|
type goRuntime struct{}
|
|
|
|
|
2015-09-03 02:38:31 +00:00
|
|
|
func (g *goRuntime) Diagnostics() (*Diagnostic, error) {
|
|
|
|
diagnostics := map[string]interface{}{
|
|
|
|
"GOARCH": runtime.GOARCH,
|
|
|
|
"GOOS": runtime.GOOS,
|
|
|
|
"GOMAXPROCS": runtime.GOMAXPROCS(-1),
|
|
|
|
"version": runtime.Version(),
|
|
|
|
}
|
|
|
|
|
|
|
|
return DiagnosticFromMap(diagnostics), nil
|
2015-09-01 03:17:13 +00:00
|
|
|
}
|