influxdb/monitor/build_info.go

23 lines
476 B
Go
Raw Normal View History

2015-09-09 19:43:51 +00:00
package monitor
import "github.com/influxdata/influxdb/monitor/diagnostics"
2016-12-30 20:34:53 +00:00
// build holds information of the build of the current executable.
2015-09-09 19:43:51 +00:00
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) {
d := 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 diagnostics.RowFromMap(d), nil
2015-09-09 19:43:51 +00:00
}