mirror of
https://github.com/nikdoof/vsphere-influxdb-go.git
synced 2025-12-19 05:29:21 +00:00
add vendoring with go dep
This commit is contained in:
23
vendor/github.com/influxdata/influxdb/monitor/network.go
generated
vendored
Normal file
23
vendor/github.com/influxdata/influxdb/monitor/network.go
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
package monitor
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/influxdata/influxdb/monitor/diagnostics"
|
||||
)
|
||||
|
||||
// network captures network diagnostics.
|
||||
type network struct{}
|
||||
|
||||
func (n *network) Diagnostics() (*diagnostics.Diagnostics, error) {
|
||||
h, err := os.Hostname()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
d := map[string]interface{}{
|
||||
"hostname": h,
|
||||
}
|
||||
|
||||
return diagnostics.RowFromMap(d), nil
|
||||
}
|
||||
Reference in New Issue
Block a user