2015-09-09 19:43:51 +00:00
|
|
|
package monitor
|
|
|
|
|
2016-02-13 22:56:15 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2016-02-13 22:56:15 +00:00
|
|
|
func (b *build) Diagnostics() (*diagnostics.Diagnostics, error) {
|
2017-01-17 22:50:35 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2017-01-17 22:50:35 +00:00
|
|
|
return diagnostics.RowFromMap(d), nil
|
2015-09-09 19:43:51 +00:00
|
|
|
}
|