influxdb/monitor/build_info.go

23 lines
462 B
Go
Raw Normal View History

2015-09-09 19:43:51 +00:00
package monitor
import "github.com/influxdata/influxdb/monitor/diagnostics"
2015-09-09 19:43:51 +00:00
// system captures build diagnostics
type build struct {
Version string
Commit string
Branch string
2015-09-25 06:32:47 +00:00
Time string
2015-09-09 19:43:51 +00:00
}
func (b *build) Diagnostics() (*diagnostics.Diagnostics, error) {
2015-09-09 19:43:51 +00:00
diagnostics := map[string]interface{}{
2015-09-25 06:32:47 +00:00
"Version": b.Version,
"Commit": b.Commit,
"Branch": b.Branch,
"Build Time": b.Time,
2015-09-09 19:43:51 +00:00
}
return DiagnosticsFromMap(diagnostics), nil
2015-09-09 19:43:51 +00:00
}