1
0
mirror of https://github.com/Oxalide/vsphere-influxdb-go.git synced 2023-10-10 13:36:51 +02:00
vsphere-influxdb-go/vendor/github.com/influxdata/influxdb/monitor/go_runtime.go

22 lines
448 B
Go
Raw Normal View History

2017-10-25 22:52:40 +02:00
package monitor
import (
"runtime"
"github.com/influxdata/influxdb/monitor/diagnostics"
)
// goRuntime captures Go runtime diagnostics.
type goRuntime struct{}
func (g *goRuntime) Diagnostics() (*diagnostics.Diagnostics, error) {
d := map[string]interface{}{
"GOARCH": runtime.GOARCH,
"GOOS": runtime.GOOS,
"GOMAXPROCS": runtime.GOMAXPROCS(-1),
"version": runtime.Version(),
}
return diagnostics.RowFromMap(d), nil
}