mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Move Stat{Object|Value} to plugins/shared/structs
Moving them as they may be useful for other packages/plugins besides devices.
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
"github.com/hashicorp/nomad/plugins/base"
|
||||
"github.com/hashicorp/nomad/plugins/device"
|
||||
"github.com/hashicorp/nomad/plugins/shared/hclspec"
|
||||
"github.com/hashicorp/nomad/plugins/shared/structs"
|
||||
"github.com/kr/pretty"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
@@ -335,13 +336,13 @@ func (d *FsDevice) collectStats() (*device.DeviceGroupStats, error) {
|
||||
}
|
||||
|
||||
s := &device.DeviceStats{
|
||||
Summary: &device.StatValue{
|
||||
Summary: &structs.StatValue{
|
||||
IntNumeratorVal: f.Size(),
|
||||
Unit: "bytes",
|
||||
Desc: "Filesize in bytes",
|
||||
},
|
||||
Stats: &device.StatObject{
|
||||
Attributes: map[string]*device.StatValue{
|
||||
Stats: &structs.StatObject{
|
||||
Attributes: map[string]*structs.StatValue{
|
||||
"size": {
|
||||
IntNumeratorVal: f.Size(),
|
||||
Unit: "bytes",
|
||||
|
||||
Reference in New Issue
Block a user