mirror of
https://github.com/Oxalide/vsphere-influxdb-go.git
synced 2023-10-10 13:36:51 +02:00
23 lines
476 B
Go
23 lines
476 B
Go
package monitor
|
|
|
|
import "github.com/influxdata/influxdb/monitor/diagnostics"
|
|
|
|
// build holds information of the build of the current executable.
|
|
type build struct {
|
|
Version string
|
|
Commit string
|
|
Branch string
|
|
Time string
|
|
}
|
|
|
|
func (b *build) Diagnostics() (*diagnostics.Diagnostics, error) {
|
|
d := map[string]interface{}{
|
|
"Version": b.Version,
|
|
"Commit": b.Commit,
|
|
"Branch": b.Branch,
|
|
"Build Time": b.Time,
|
|
}
|
|
|
|
return diagnostics.RowFromMap(d), nil
|
|
}
|