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:
Mahmood Ali
2018-11-11 19:36:20 -05:00
parent df694eb3be
commit 2f4c510cb7
16 changed files with 3845 additions and 966 deletions

View File

@@ -72,14 +72,14 @@ var (
Name: "1080ti",
InstanceStats: map[string]*device.DeviceStats{
nvidiaDevice0ID: {
Summary: &device.StatValue{
Summary: &psstructs.StatValue{
IntNumeratorVal: 212,
Unit: "F",
Desc: "Temperature",
},
},
nvidiaDevice1ID: {
Summary: &device.StatValue{
Summary: &psstructs.StatValue{
IntNumeratorVal: 218,
Unit: "F",
Desc: "Temperature",
@@ -94,7 +94,7 @@ var (
Name: "640GT",
InstanceStats: map[string]*device.DeviceStats{
intelDeviceID: {
Summary: &device.StatValue{
Summary: &psstructs.StatValue{
IntNumeratorVal: 220,
Unit: "F",
Desc: "Temperature",

View File

@@ -6,6 +6,7 @@ import (
"github.com/hashicorp/nomad/devices/gpu/nvidia/nvml"
"github.com/hashicorp/nomad/plugins/device"
"github.com/hashicorp/nomad/plugins/shared/structs"
)
const (
@@ -132,8 +133,8 @@ func (d *NvidiaDevice) writeStatsToChannel(stats chan<- *device.StatsResponse, t
}
}
func newNotAvailableDeviceStats(unit, desc string) *device.StatValue {
return &device.StatValue{Unit: unit, Desc: desc, StringVal: notAvailable}
func newNotAvailableDeviceStats(unit, desc string) *structs.StatValue {
return &structs.StatValue{Unit: unit, Desc: desc, StringVal: notAvailable}
}
// statsForGroup is a helper function that populates device.DeviceGroupStats
@@ -158,23 +159,23 @@ func statsForItem(statsItem *nvml.StatsData, timestamp time.Time) *device.Device
// nvml.StatsData holds pointers to values that can be nil
// In case they are nil return stats with 'notAvailable' constant
var (
powerUsageStat *device.StatValue
GPUUtilizationStat *device.StatValue
memoryUtilizationStat *device.StatValue
encoderUtilizationStat *device.StatValue
decoderUtilizationStat *device.StatValue
temperatureStat *device.StatValue
memoryStateStat *device.StatValue
BAR1StateStat *device.StatValue
ECCErrorsL1CacheStat *device.StatValue
ECCErrorsL2CacheStat *device.StatValue
ECCErrorsDeviceStat *device.StatValue
powerUsageStat *structs.StatValue
GPUUtilizationStat *structs.StatValue
memoryUtilizationStat *structs.StatValue
encoderUtilizationStat *structs.StatValue
decoderUtilizationStat *structs.StatValue
temperatureStat *structs.StatValue
memoryStateStat *structs.StatValue
BAR1StateStat *structs.StatValue
ECCErrorsL1CacheStat *structs.StatValue
ECCErrorsL2CacheStat *structs.StatValue
ECCErrorsDeviceStat *structs.StatValue
)
if statsItem.PowerUsageW == nil || statsItem.PowerW == nil {
powerUsageStat = newNotAvailableDeviceStats(PowerUsageUnit, PowerUsageDesc)
} else {
powerUsageStat = &device.StatValue{
powerUsageStat = &structs.StatValue{
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
IntNumeratorVal: int64(*statsItem.PowerUsageW),
@@ -185,7 +186,7 @@ func statsForItem(statsItem *nvml.StatsData, timestamp time.Time) *device.Device
if statsItem.GPUUtilization == nil {
GPUUtilizationStat = newNotAvailableDeviceStats(GPUUtilizationUnit, GPUUtilizationDesc)
} else {
GPUUtilizationStat = &device.StatValue{
GPUUtilizationStat = &structs.StatValue{
Unit: GPUUtilizationUnit,
Desc: GPUUtilizationDesc,
IntNumeratorVal: int64(*statsItem.GPUUtilization),
@@ -195,7 +196,7 @@ func statsForItem(statsItem *nvml.StatsData, timestamp time.Time) *device.Device
if statsItem.MemoryUtilization == nil {
memoryUtilizationStat = newNotAvailableDeviceStats(MemoryUtilizationUnit, MemoryUtilizationDesc)
} else {
memoryUtilizationStat = &device.StatValue{
memoryUtilizationStat = &structs.StatValue{
Unit: MemoryUtilizationUnit,
Desc: MemoryUtilizationDesc,
IntNumeratorVal: int64(*statsItem.MemoryUtilization),
@@ -205,7 +206,7 @@ func statsForItem(statsItem *nvml.StatsData, timestamp time.Time) *device.Device
if statsItem.EncoderUtilization == nil {
encoderUtilizationStat = newNotAvailableDeviceStats(EncoderUtilizationUnit, EncoderUtilizationDesc)
} else {
encoderUtilizationStat = &device.StatValue{
encoderUtilizationStat = &structs.StatValue{
Unit: EncoderUtilizationUnit,
Desc: EncoderUtilizationDesc,
IntNumeratorVal: int64(*statsItem.EncoderUtilization),
@@ -215,7 +216,7 @@ func statsForItem(statsItem *nvml.StatsData, timestamp time.Time) *device.Device
if statsItem.DecoderUtilization == nil {
decoderUtilizationStat = newNotAvailableDeviceStats(DecoderUtilizationUnit, DecoderUtilizationDesc)
} else {
decoderUtilizationStat = &device.StatValue{
decoderUtilizationStat = &structs.StatValue{
Unit: DecoderUtilizationUnit,
Desc: DecoderUtilizationDesc,
IntNumeratorVal: int64(*statsItem.DecoderUtilization),
@@ -225,7 +226,7 @@ func statsForItem(statsItem *nvml.StatsData, timestamp time.Time) *device.Device
if statsItem.TemperatureC == nil {
temperatureStat = newNotAvailableDeviceStats(TemperatureUnit, TemperatureDesc)
} else {
temperatureStat = &device.StatValue{
temperatureStat = &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: int64(*statsItem.TemperatureC),
@@ -235,7 +236,7 @@ func statsForItem(statsItem *nvml.StatsData, timestamp time.Time) *device.Device
if statsItem.UsedMemoryMiB == nil || statsItem.MemoryMiB == nil {
memoryStateStat = newNotAvailableDeviceStats(MemoryStateUnit, MemoryStateDesc)
} else {
memoryStateStat = &device.StatValue{
memoryStateStat = &structs.StatValue{
Unit: MemoryStateUnit,
Desc: MemoryStateDesc,
IntNumeratorVal: int64(*statsItem.UsedMemoryMiB),
@@ -246,7 +247,7 @@ func statsForItem(statsItem *nvml.StatsData, timestamp time.Time) *device.Device
if statsItem.BAR1UsedMiB == nil || statsItem.BAR1MiB == nil {
BAR1StateStat = newNotAvailableDeviceStats(BAR1StateUnit, BAR1StateDesc)
} else {
BAR1StateStat = &device.StatValue{
BAR1StateStat = &structs.StatValue{
Unit: BAR1StateUnit,
Desc: BAR1StateDesc,
IntNumeratorVal: int64(*statsItem.BAR1UsedMiB),
@@ -257,7 +258,7 @@ func statsForItem(statsItem *nvml.StatsData, timestamp time.Time) *device.Device
if statsItem.ECCErrorsL1Cache == nil {
ECCErrorsL1CacheStat = newNotAvailableDeviceStats(ECCErrorsL1CacheUnit, ECCErrorsL1CacheDesc)
} else {
ECCErrorsL1CacheStat = &device.StatValue{
ECCErrorsL1CacheStat = &structs.StatValue{
Unit: ECCErrorsL1CacheUnit,
Desc: ECCErrorsL1CacheDesc,
IntNumeratorVal: int64(*statsItem.ECCErrorsL1Cache),
@@ -267,7 +268,7 @@ func statsForItem(statsItem *nvml.StatsData, timestamp time.Time) *device.Device
if statsItem.ECCErrorsL2Cache == nil {
ECCErrorsL2CacheStat = newNotAvailableDeviceStats(ECCErrorsL2CacheUnit, ECCErrorsL2CacheDesc)
} else {
ECCErrorsL2CacheStat = &device.StatValue{
ECCErrorsL2CacheStat = &structs.StatValue{
Unit: ECCErrorsL2CacheUnit,
Desc: ECCErrorsL2CacheDesc,
IntNumeratorVal: int64(*statsItem.ECCErrorsL2Cache),
@@ -277,7 +278,7 @@ func statsForItem(statsItem *nvml.StatsData, timestamp time.Time) *device.Device
if statsItem.ECCErrorsDevice == nil {
ECCErrorsDeviceStat = newNotAvailableDeviceStats(ECCErrorsDeviceUnit, ECCErrorsDeviceDesc)
} else {
ECCErrorsDeviceStat = &device.StatValue{
ECCErrorsDeviceStat = &structs.StatValue{
Unit: ECCErrorsDeviceUnit,
Desc: ECCErrorsDeviceDesc,
IntNumeratorVal: int64(*statsItem.ECCErrorsDevice),
@@ -285,8 +286,8 @@ func statsForItem(statsItem *nvml.StatsData, timestamp time.Time) *device.Device
}
return &device.DeviceStats{
Summary: temperatureStat,
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: powerUsageStat,
GPUUtilizationAttr: GPUUtilizationStat,
MemoryUtilizationAttr: memoryUtilizationStat,

View File

@@ -10,6 +10,7 @@ import (
"github.com/hashicorp/nomad/devices/gpu/nvidia/nvml"
"github.com/hashicorp/nomad/helper"
"github.com/hashicorp/nomad/plugins/device"
"github.com/hashicorp/nomad/plugins/shared/structs"
"github.com/stretchr/testify/require"
)
@@ -445,13 +446,13 @@ func TestStatsForItem(t *testing.T) {
ECCErrorsDevice: helper.Uint64ToPtr(100),
},
ExpectedResult: &device.DeviceStats{
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 1,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -539,13 +540,13 @@ func TestStatsForItem(t *testing.T) {
ECCErrorsDevice: helper.Uint64ToPtr(100),
},
ExpectedResult: &device.DeviceStats{
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 1,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -632,13 +633,13 @@ func TestStatsForItem(t *testing.T) {
ECCErrorsDevice: helper.Uint64ToPtr(100),
},
ExpectedResult: &device.DeviceStats{
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 1,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -725,13 +726,13 @@ func TestStatsForItem(t *testing.T) {
ECCErrorsDevice: helper.Uint64ToPtr(100),
},
ExpectedResult: &device.DeviceStats{
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 1,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -819,13 +820,13 @@ func TestStatsForItem(t *testing.T) {
ECCErrorsDevice: helper.Uint64ToPtr(100),
},
ExpectedResult: &device.DeviceStats{
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 1,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -913,13 +914,13 @@ func TestStatsForItem(t *testing.T) {
ECCErrorsDevice: helper.Uint64ToPtr(100),
},
ExpectedResult: &device.DeviceStats{
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 1,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -1007,13 +1008,13 @@ func TestStatsForItem(t *testing.T) {
ECCErrorsDevice: helper.Uint64ToPtr(100),
},
ExpectedResult: &device.DeviceStats{
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 1,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -1101,13 +1102,13 @@ func TestStatsForItem(t *testing.T) {
ECCErrorsDevice: helper.Uint64ToPtr(100),
},
ExpectedResult: &device.DeviceStats{
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
StringVal: notAvailable,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -1195,13 +1196,13 @@ func TestStatsForItem(t *testing.T) {
ECCErrorsDevice: helper.Uint64ToPtr(100),
},
ExpectedResult: &device.DeviceStats{
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 1,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -1288,13 +1289,13 @@ func TestStatsForItem(t *testing.T) {
ECCErrorsDevice: helper.Uint64ToPtr(100),
},
ExpectedResult: &device.DeviceStats{
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 1,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -1381,13 +1382,13 @@ func TestStatsForItem(t *testing.T) {
ECCErrorsDevice: helper.Uint64ToPtr(100),
},
ExpectedResult: &device.DeviceStats{
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 1,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -1474,13 +1475,13 @@ func TestStatsForItem(t *testing.T) {
ECCErrorsDevice: helper.Uint64ToPtr(100),
},
ExpectedResult: &device.DeviceStats{
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 1,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -1567,13 +1568,13 @@ func TestStatsForItem(t *testing.T) {
ECCErrorsDevice: helper.Uint64ToPtr(100),
},
ExpectedResult: &device.DeviceStats{
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 1,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -1661,13 +1662,13 @@ func TestStatsForItem(t *testing.T) {
ECCErrorsDevice: helper.Uint64ToPtr(100),
},
ExpectedResult: &device.DeviceStats{
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 1,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -1755,13 +1756,13 @@ func TestStatsForItem(t *testing.T) {
ECCErrorsDevice: nil,
},
ExpectedResult: &device.DeviceStats{
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 1,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -1911,13 +1912,13 @@ func TestStatsForGroup(t *testing.T) {
Name: "DeviceName1",
InstanceStats: map[string]*device.DeviceStats{
"UUID1": {
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 1,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -1981,13 +1982,13 @@ func TestStatsForGroup(t *testing.T) {
Timestamp: time.Date(1974, time.May, 19, 1, 2, 3, 4, time.UTC),
},
"UUID2": {
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 2,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -2051,13 +2052,13 @@ func TestStatsForGroup(t *testing.T) {
Timestamp: time.Date(1974, time.May, 19, 1, 2, 3, 4, time.UTC),
},
"UUID3": {
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 3,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -2232,13 +2233,13 @@ func TestWriteStatsToChannel(t *testing.T) {
Name: "DeviceName1",
InstanceStats: map[string]*device.DeviceStats{
"UUID1": {
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 1,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -2309,13 +2310,13 @@ func TestWriteStatsToChannel(t *testing.T) {
Name: "DeviceName2",
InstanceStats: map[string]*device.DeviceStats{
"UUID2": {
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 2,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -2386,13 +2387,13 @@ func TestWriteStatsToChannel(t *testing.T) {
Name: "DeviceName3",
InstanceStats: map[string]*device.DeviceStats{
"UUID3": {
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 3,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -2543,13 +2544,13 @@ func TestWriteStatsToChannel(t *testing.T) {
Name: "DeviceName1",
InstanceStats: map[string]*device.DeviceStats{
"UUID1": {
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 1,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -2620,13 +2621,13 @@ func TestWriteStatsToChannel(t *testing.T) {
Name: "DeviceName2",
InstanceStats: map[string]*device.DeviceStats{
"UUID3": {
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 3,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -2690,13 +2691,13 @@ func TestWriteStatsToChannel(t *testing.T) {
Timestamp: time.Date(1974, time.May, 19, 1, 2, 3, 4, time.UTC),
},
"UUID2": {
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 2,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -2846,13 +2847,13 @@ func TestWriteStatsToChannel(t *testing.T) {
Name: "DeviceName1",
InstanceStats: map[string]*device.DeviceStats{
"UUID1": {
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 1,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,
@@ -2923,13 +2924,13 @@ func TestWriteStatsToChannel(t *testing.T) {
Name: "DeviceName2",
InstanceStats: map[string]*device.DeviceStats{
"UUID2": {
Summary: &device.StatValue{
Summary: &structs.StatValue{
Unit: TemperatureUnit,
Desc: TemperatureDesc,
IntNumeratorVal: 2,
},
Stats: &device.StatObject{
Attributes: map[string]*device.StatValue{
Stats: &structs.StatObject{
Attributes: map[string]*structs.StatValue{
PowerUsageAttr: {
Unit: PowerUsageUnit,
Desc: PowerUsageDesc,

View File

@@ -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",

View File

@@ -211,48 +211,11 @@ type DeviceGroupStats struct {
type DeviceStats struct {
// Summary exposes a single summary metric that should be the most
// informative to users.
Summary *StatValue
Summary *structs.StatValue
// Stats contains the verbose statistics for the device.
Stats *StatObject
Stats *structs.StatObject
// Timestamp is the time the statistics were collected.
Timestamp time.Time
}
// StatObject is a collection of statistics either exposed at the top
// level or via nested StatObjects.
type StatObject struct {
// Nested is a mapping of object name to a nested stats object.
Nested map[string]*StatObject
// Attributes is a mapping of statistic name to its value.
Attributes map[string]*StatValue
}
// StatValue exposes the values of a particular statistic. The value may be of
// type float, integer, string or boolean. Numeric types can be exposed as a
// single value or as a fraction.
type StatValue struct {
// FloatNumeratorVal exposes a floating point value. If denominator is set
// it is assumed to be a fractional value, otherwise it is a scalar.
FloatNumeratorVal float64
FloatDenominatorVal float64
// IntNumeratorVal exposes a int value. If denominator is set it is assumed
// to be a fractional value, otherwise it is a scalar.
IntNumeratorVal int64
IntDenominatorVal int64
// StringVal exposes a string value. These are likely annotations.
StringVal string
// BoolVal exposes a boolean statistic.
BoolVal bool
// Unit gives the unit type: °F, %, MHz, MB, etc.
Unit string
// Desc provides a human readable description of the statistic.
Desc string
}

View File

@@ -471,7 +471,7 @@ func TestDevicePlugin_Stats(t *testing.T) {
Name: "foo",
InstanceStats: map[string]*DeviceStats{
"1": {
Summary: &StatValue{
Summary: &psstructs.StatValue{
IntNumeratorVal: 10,
IntDenominatorVal: 20,
Unit: "MB",
@@ -488,7 +488,7 @@ func TestDevicePlugin_Stats(t *testing.T) {
Name: "foo",
InstanceStats: map[string]*DeviceStats{
"1": {
Summary: &StatValue{
Summary: &psstructs.StatValue{
FloatNumeratorVal: 10.0,
FloatDenominatorVal: 20.0,
Unit: "MB",
@@ -503,7 +503,7 @@ func TestDevicePlugin_Stats(t *testing.T) {
Name: "bar",
InstanceStats: map[string]*DeviceStats{
"1": {
Summary: &StatValue{
Summary: &psstructs.StatValue{
StringVal: "foo",
Unit: "MB",
Desc: "Unit test",
@@ -517,7 +517,7 @@ func TestDevicePlugin_Stats(t *testing.T) {
Name: "baz",
InstanceStats: map[string]*DeviceStats{
"1": {
Summary: &StatValue{
Summary: &psstructs.StatValue{
BoolVal: true,
Unit: "MB",
Desc: "Unit test",

View File

@@ -37,7 +37,7 @@ func (m *FingerprintRequest) Reset() { *m = FingerprintRequest{} }
func (m *FingerprintRequest) String() string { return proto.CompactTextString(m) }
func (*FingerprintRequest) ProtoMessage() {}
func (*FingerprintRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_device_179311ed8a5d0c36, []int{0}
return fileDescriptor_device_a4d1cccedbd8401c, []int{0}
}
func (m *FingerprintRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FingerprintRequest.Unmarshal(m, b)
@@ -72,7 +72,7 @@ func (m *FingerprintResponse) Reset() { *m = FingerprintResponse{} }
func (m *FingerprintResponse) String() string { return proto.CompactTextString(m) }
func (*FingerprintResponse) ProtoMessage() {}
func (*FingerprintResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_device_179311ed8a5d0c36, []int{1}
return fileDescriptor_device_a4d1cccedbd8401c, []int{1}
}
func (m *FingerprintResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FingerprintResponse.Unmarshal(m, b)
@@ -121,7 +121,7 @@ func (m *DeviceGroup) Reset() { *m = DeviceGroup{} }
func (m *DeviceGroup) String() string { return proto.CompactTextString(m) }
func (*DeviceGroup) ProtoMessage() {}
func (*DeviceGroup) Descriptor() ([]byte, []int) {
return fileDescriptor_device_179311ed8a5d0c36, []int{2}
return fileDescriptor_device_a4d1cccedbd8401c, []int{2}
}
func (m *DeviceGroup) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeviceGroup.Unmarshal(m, b)
@@ -198,7 +198,7 @@ func (m *DetectedDevice) Reset() { *m = DetectedDevice{} }
func (m *DetectedDevice) String() string { return proto.CompactTextString(m) }
func (*DetectedDevice) ProtoMessage() {}
func (*DetectedDevice) Descriptor() ([]byte, []int) {
return fileDescriptor_device_179311ed8a5d0c36, []int{3}
return fileDescriptor_device_a4d1cccedbd8401c, []int{3}
}
func (m *DetectedDevice) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DetectedDevice.Unmarshal(m, b)
@@ -260,7 +260,7 @@ func (m *DeviceLocality) Reset() { *m = DeviceLocality{} }
func (m *DeviceLocality) String() string { return proto.CompactTextString(m) }
func (*DeviceLocality) ProtoMessage() {}
func (*DeviceLocality) Descriptor() ([]byte, []int) {
return fileDescriptor_device_179311ed8a5d0c36, []int{4}
return fileDescriptor_device_a4d1cccedbd8401c, []int{4}
}
func (m *DeviceLocality) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeviceLocality.Unmarshal(m, b)
@@ -301,7 +301,7 @@ func (m *ReserveRequest) Reset() { *m = ReserveRequest{} }
func (m *ReserveRequest) String() string { return proto.CompactTextString(m) }
func (*ReserveRequest) ProtoMessage() {}
func (*ReserveRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_device_179311ed8a5d0c36, []int{5}
return fileDescriptor_device_a4d1cccedbd8401c, []int{5}
}
func (m *ReserveRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReserveRequest.Unmarshal(m, b)
@@ -344,7 +344,7 @@ func (m *ReserveResponse) Reset() { *m = ReserveResponse{} }
func (m *ReserveResponse) String() string { return proto.CompactTextString(m) }
func (*ReserveResponse) ProtoMessage() {}
func (*ReserveResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_device_179311ed8a5d0c36, []int{6}
return fileDescriptor_device_a4d1cccedbd8401c, []int{6}
}
func (m *ReserveResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReserveResponse.Unmarshal(m, b)
@@ -389,7 +389,7 @@ func (m *ContainerReservation) Reset() { *m = ContainerReservation{} }
func (m *ContainerReservation) String() string { return proto.CompactTextString(m) }
func (*ContainerReservation) ProtoMessage() {}
func (*ContainerReservation) Descriptor() ([]byte, []int) {
return fileDescriptor_device_179311ed8a5d0c36, []int{7}
return fileDescriptor_device_a4d1cccedbd8401c, []int{7}
}
func (m *ContainerReservation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ContainerReservation.Unmarshal(m, b)
@@ -448,7 +448,7 @@ func (m *Mount) Reset() { *m = Mount{} }
func (m *Mount) String() string { return proto.CompactTextString(m) }
func (*Mount) ProtoMessage() {}
func (*Mount) Descriptor() ([]byte, []int) {
return fileDescriptor_device_179311ed8a5d0c36, []int{8}
return fileDescriptor_device_a4d1cccedbd8401c, []int{8}
}
func (m *Mount) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Mount.Unmarshal(m, b)
@@ -509,7 +509,7 @@ func (m *DeviceSpec) Reset() { *m = DeviceSpec{} }
func (m *DeviceSpec) String() string { return proto.CompactTextString(m) }
func (*DeviceSpec) ProtoMessage() {}
func (*DeviceSpec) Descriptor() ([]byte, []int) {
return fileDescriptor_device_179311ed8a5d0c36, []int{9}
return fileDescriptor_device_a4d1cccedbd8401c, []int{9}
}
func (m *DeviceSpec) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeviceSpec.Unmarshal(m, b)
@@ -563,7 +563,7 @@ func (m *StatsRequest) Reset() { *m = StatsRequest{} }
func (m *StatsRequest) String() string { return proto.CompactTextString(m) }
func (*StatsRequest) ProtoMessage() {}
func (*StatsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_device_179311ed8a5d0c36, []int{10}
return fileDescriptor_device_a4d1cccedbd8401c, []int{10}
}
func (m *StatsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StatsRequest.Unmarshal(m, b)
@@ -603,7 +603,7 @@ func (m *StatsResponse) Reset() { *m = StatsResponse{} }
func (m *StatsResponse) String() string { return proto.CompactTextString(m) }
func (*StatsResponse) ProtoMessage() {}
func (*StatsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_device_179311ed8a5d0c36, []int{11}
return fileDescriptor_device_a4d1cccedbd8401c, []int{11}
}
func (m *StatsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StatsResponse.Unmarshal(m, b)
@@ -647,7 +647,7 @@ func (m *DeviceGroupStats) Reset() { *m = DeviceGroupStats{} }
func (m *DeviceGroupStats) String() string { return proto.CompactTextString(m) }
func (*DeviceGroupStats) ProtoMessage() {}
func (*DeviceGroupStats) Descriptor() ([]byte, []int) {
return fileDescriptor_device_179311ed8a5d0c36, []int{12}
return fileDescriptor_device_a4d1cccedbd8401c, []int{12}
}
func (m *DeviceGroupStats) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeviceGroupStats.Unmarshal(m, b)
@@ -699,9 +699,9 @@ func (m *DeviceGroupStats) GetInstanceStats() map[string]*DeviceStats {
type DeviceStats struct {
// summary exposes a single summary metric that should be the most
// informative to users.
Summary *StatValue `protobuf:"bytes,1,opt,name=summary,proto3" json:"summary,omitempty"`
Summary *proto1.StatValue `protobuf:"bytes,1,opt,name=summary,proto3" json:"summary,omitempty"`
// stats contains the verbose statistics for the device.
Stats *StatObject `protobuf:"bytes,2,opt,name=stats,proto3" json:"stats,omitempty"`
Stats *proto1.StatObject `protobuf:"bytes,2,opt,name=stats,proto3" json:"stats,omitempty"`
// timestamp is the time the statistics were collected.
Timestamp *timestamp.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
@@ -713,7 +713,7 @@ func (m *DeviceStats) Reset() { *m = DeviceStats{} }
func (m *DeviceStats) String() string { return proto.CompactTextString(m) }
func (*DeviceStats) ProtoMessage() {}
func (*DeviceStats) Descriptor() ([]byte, []int) {
return fileDescriptor_device_179311ed8a5d0c36, []int{13}
return fileDescriptor_device_a4d1cccedbd8401c, []int{13}
}
func (m *DeviceStats) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeviceStats.Unmarshal(m, b)
@@ -733,14 +733,14 @@ func (m *DeviceStats) XXX_DiscardUnknown() {
var xxx_messageInfo_DeviceStats proto.InternalMessageInfo
func (m *DeviceStats) GetSummary() *StatValue {
func (m *DeviceStats) GetSummary() *proto1.StatValue {
if m != nil {
return m.Summary
}
return nil
}
func (m *DeviceStats) GetStats() *StatObject {
func (m *DeviceStats) GetStats() *proto1.StatObject {
if m != nil {
return m.Stats
}
@@ -754,163 +754,6 @@ func (m *DeviceStats) GetTimestamp() *timestamp.Timestamp {
return nil
}
// StatObject is a collection of statistics either exposed at the top
// level or via nested StatObjects.
type StatObject struct {
// nested is a mapping of object name to a nested stats object.
Nested map[string]*StatObject `protobuf:"bytes,1,rep,name=nested,proto3" json:"nested,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// attributes is a mapping of statistic name to its value.
Attributes map[string]*StatValue `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *StatObject) Reset() { *m = StatObject{} }
func (m *StatObject) String() string { return proto.CompactTextString(m) }
func (*StatObject) ProtoMessage() {}
func (*StatObject) Descriptor() ([]byte, []int) {
return fileDescriptor_device_179311ed8a5d0c36, []int{14}
}
func (m *StatObject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StatObject.Unmarshal(m, b)
}
func (m *StatObject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StatObject.Marshal(b, m, deterministic)
}
func (dst *StatObject) XXX_Merge(src proto.Message) {
xxx_messageInfo_StatObject.Merge(dst, src)
}
func (m *StatObject) XXX_Size() int {
return xxx_messageInfo_StatObject.Size(m)
}
func (m *StatObject) XXX_DiscardUnknown() {
xxx_messageInfo_StatObject.DiscardUnknown(m)
}
var xxx_messageInfo_StatObject proto.InternalMessageInfo
func (m *StatObject) GetNested() map[string]*StatObject {
if m != nil {
return m.Nested
}
return nil
}
func (m *StatObject) GetAttributes() map[string]*StatValue {
if m != nil {
return m.Attributes
}
return nil
}
// StatValue exposes the values of a particular statistic. The value may
// be of type double, integer, string or boolean. Numeric types can be
// exposed as a single value or as a fraction.
type StatValue struct {
// float_numerator_val exposes a floating point value. If denominator
// is set it is assumed to be a fractional value, otherwise it is a
// scalar.
FloatNumeratorVal float64 `protobuf:"fixed64,1,opt,name=float_numerator_val,json=floatNumeratorVal,proto3" json:"float_numerator_val,omitempty"`
FloatDenominatorVal float64 `protobuf:"fixed64,2,opt,name=float_denominator_val,json=floatDenominatorVal,proto3" json:"float_denominator_val,omitempty"`
// int_numerator_val exposes a int value. If denominator
// is set it is assumed to be a fractional value, otherwise it is a
// scalar.
IntNumeratorVal int64 `protobuf:"varint,3,opt,name=int_numerator_val,json=intNumeratorVal,proto3" json:"int_numerator_val,omitempty"`
IntDenominatorVal int64 `protobuf:"varint,4,opt,name=int_denominator_val,json=intDenominatorVal,proto3" json:"int_denominator_val,omitempty"`
// string_val exposes a string value. These are likely annotations.
StringVal string `protobuf:"bytes,5,opt,name=string_val,json=stringVal,proto3" json:"string_val,omitempty"`
// bool_val exposes a boolean statistic.
BoolVal bool `protobuf:"varint,6,opt,name=bool_val,json=boolVal,proto3" json:"bool_val,omitempty"`
// unit gives the unit type: °F, %, MHz, MB, etc.
Unit string `protobuf:"bytes,7,opt,name=unit,proto3" json:"unit,omitempty"`
// desc provides a human readable description of the statistic.
Desc string `protobuf:"bytes,8,opt,name=desc,proto3" json:"desc,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *StatValue) Reset() { *m = StatValue{} }
func (m *StatValue) String() string { return proto.CompactTextString(m) }
func (*StatValue) ProtoMessage() {}
func (*StatValue) Descriptor() ([]byte, []int) {
return fileDescriptor_device_179311ed8a5d0c36, []int{15}
}
func (m *StatValue) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StatValue.Unmarshal(m, b)
}
func (m *StatValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StatValue.Marshal(b, m, deterministic)
}
func (dst *StatValue) XXX_Merge(src proto.Message) {
xxx_messageInfo_StatValue.Merge(dst, src)
}
func (m *StatValue) XXX_Size() int {
return xxx_messageInfo_StatValue.Size(m)
}
func (m *StatValue) XXX_DiscardUnknown() {
xxx_messageInfo_StatValue.DiscardUnknown(m)
}
var xxx_messageInfo_StatValue proto.InternalMessageInfo
func (m *StatValue) GetFloatNumeratorVal() float64 {
if m != nil {
return m.FloatNumeratorVal
}
return 0
}
func (m *StatValue) GetFloatDenominatorVal() float64 {
if m != nil {
return m.FloatDenominatorVal
}
return 0
}
func (m *StatValue) GetIntNumeratorVal() int64 {
if m != nil {
return m.IntNumeratorVal
}
return 0
}
func (m *StatValue) GetIntDenominatorVal() int64 {
if m != nil {
return m.IntDenominatorVal
}
return 0
}
func (m *StatValue) GetStringVal() string {
if m != nil {
return m.StringVal
}
return ""
}
func (m *StatValue) GetBoolVal() bool {
if m != nil {
return m.BoolVal
}
return false
}
func (m *StatValue) GetUnit() string {
if m != nil {
return m.Unit
}
return ""
}
func (m *StatValue) GetDesc() string {
if m != nil {
return m.Desc
}
return ""
}
func init() {
proto.RegisterType((*FingerprintRequest)(nil), "hashicorp.nomad.plugins.device.FingerprintRequest")
proto.RegisterType((*FingerprintResponse)(nil), "hashicorp.nomad.plugins.device.FingerprintResponse")
@@ -929,10 +772,6 @@ func init() {
proto.RegisterType((*DeviceGroupStats)(nil), "hashicorp.nomad.plugins.device.DeviceGroupStats")
proto.RegisterMapType((map[string]*DeviceStats)(nil), "hashicorp.nomad.plugins.device.DeviceGroupStats.InstanceStatsEntry")
proto.RegisterType((*DeviceStats)(nil), "hashicorp.nomad.plugins.device.DeviceStats")
proto.RegisterType((*StatObject)(nil), "hashicorp.nomad.plugins.device.StatObject")
proto.RegisterMapType((map[string]*StatValue)(nil), "hashicorp.nomad.plugins.device.StatObject.AttributesEntry")
proto.RegisterMapType((map[string]*StatObject)(nil), "hashicorp.nomad.plugins.device.StatObject.NestedEntry")
proto.RegisterType((*StatValue)(nil), "hashicorp.nomad.plugins.device.StatValue")
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -1145,82 +984,71 @@ var _DevicePlugin_serviceDesc = grpc.ServiceDesc{
}
func init() {
proto.RegisterFile("plugins/device/proto/device.proto", fileDescriptor_device_179311ed8a5d0c36)
proto.RegisterFile("plugins/device/proto/device.proto", fileDescriptor_device_a4d1cccedbd8401c)
}
var fileDescriptor_device_179311ed8a5d0c36 = []byte{
// 1168 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdf, 0x8e, 0xdb, 0xc4,
0x17, 0xfe, 0xe5, 0x7f, 0x72, 0xb2, 0xdd, 0xed, 0xce, 0xee, 0x0f, 0xa5, 0x81, 0xb6, 0x8b, 0x25,
0xa4, 0xb2, 0x50, 0xa7, 0xa4, 0x08, 0xaa, 0x22, 0xa0, 0xed, 0xa6, 0x6c, 0x83, 0x60, 0xb7, 0x72,
0xab, 0x4a, 0x5d, 0x24, 0x2c, 0xc7, 0x9e, 0xc6, 0xd3, 0xda, 0x33, 0xc6, 0x33, 0x4e, 0x15, 0xae,
0xb8, 0xe5, 0x4d, 0xb8, 0xe9, 0x0b, 0xf0, 0x10, 0x3c, 0x04, 0x4f, 0x82, 0xe6, 0x8f, 0x13, 0x27,
0xbb, 0x6d, 0x12, 0xb8, 0xf2, 0xcc, 0x39, 0xe7, 0xfb, 0xce, 0xf1, 0xcc, 0x37, 0x67, 0x06, 0x3e,
0x4c, 0xa2, 0x6c, 0x4c, 0x28, 0xef, 0x05, 0x78, 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0x92, 0x66, 0x89, 0xfb, 0x2a, 0x00, 0x17, 0x29, 0xa1, 0x63, 0x15, 0x56, 0x53, 0x6b, 0xd5,
0xd2, 0x16, 0xe9, 0xbe, 0x02, 0xcd, 0x11, 0x63, 0x91, 0x72, 0xd6, 0xf5, 0x7b, 0x44, 0xce, 0xa5,
0x0b, 0x41, 0x35, 0xa3, 0x44, 0x74, 0x1a, 0xba, 0xa7, 0xc8, 0xb1, 0xb4, 0xc9, 0xc7, 0x49, 0xa7,
0xa9, 0x6d, 0x72, 0xdc, 0xff, 0xbb, 0x0c, 0x5b, 0xfa, 0x30, 0x3e, 0x56, 0xab, 0x8b, 0x7e, 0x85,
0x76, 0xe1, 0xbd, 0x8b, 0xfa, 0xab, 0x76, 0xe1, 0xfc, 0x93, 0xb9, 0x7b, 0x7b, 0x23, 0x8c, 0xee,
0xc7, 0xd6, 0xff, 0x6e, 0x95, 0x50, 0x04, 0x0d, 0xf3, 0xc6, 0x40, 0x2b, 0xdf, 0x42, 0x8b, 0xaf,
0x97, 0x6e, 0x6f, 0xed, 0xf8, 0x3c, 0x1f, 0x0a, 0xa1, 0xa6, 0x1b, 0xd0, 0xa7, 0xeb, 0x28, 0x2d,
0xbf, 0x95, 0xba, 0x37, 0xd7, 0x8c, 0x9e, 0xff, 0xd7, 0x83, 0xc6, 0x59, 0x4d, 0x77, 0x90, 0xba,
0xfa, 0xdc, 0xfe, 0x27, 0x00, 0x00, 0xff, 0xff, 0x78, 0x61, 0x84, 0x9b, 0x38, 0x0d, 0x00, 0x00,
var fileDescriptor_device_a4d1cccedbd8401c = []byte{
// 979 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xef, 0x8e, 0x1b, 0x35,
0x10, 0x27, 0xb9, 0xcb, 0x25, 0x99, 0xdc, 0x5d, 0x8b, 0x7b, 0x42, 0x61, 0x81, 0xf6, 0x58, 0x09,
0xa9, 0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6, 0xb3, 0x96,
0xed, 0xc2, 0x8e, 0xf9, 0xdc, 0xf9, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x12, 0xb9, 0x76, 0xd8, 0xd1,
0x0a, 0x00, 0x00,
}

View File

@@ -5,6 +5,7 @@ option go_package = "proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/duration.proto";
import "github.com/hashicorp/nomad/plugins/shared/structs/proto/attribute.proto";
import "github.com/hashicorp/nomad/plugins/shared/structs/proto/stats.proto";
// DevicePlugin is the API exposed by device plugins
service DevicePlugin {
@@ -164,50 +165,11 @@ message DeviceGroupStats {
message DeviceStats {
// summary exposes a single summary metric that should be the most
// informative to users.
StatValue summary = 1;
hashicorp.nomad.plugins.shared.structs.StatValue summary = 1;
// stats contains the verbose statistics for the device.
StatObject stats = 2;
hashicorp.nomad.plugins.shared.structs.StatObject stats = 2;
// timestamp is the time the statistics were collected.
google.protobuf.Timestamp timestamp = 3;
}
// StatObject is a collection of statistics either exposed at the top
// level or via nested StatObjects.
message StatObject {
// nested is a mapping of object name to a nested stats object.
map<string, StatObject> nested = 1;
// attributes is a mapping of statistic name to its value.
map<string, StatValue> attributes = 2;
}
// StatValue exposes the values of a particular statistic. The value may
// be of type double, integer, string or boolean. Numeric types can be
// exposed as a single value or as a fraction.
message StatValue {
// float_numerator_val exposes a floating point value. If denominator
// is set it is assumed to be a fractional value, otherwise it is a
// scalar.
double float_numerator_val = 1;
double float_denominator_val = 2;
// int_numerator_val exposes a int value. If denominator
// is set it is assumed to be a fractional value, otherwise it is a
// scalar.
int64 int_numerator_val = 3;
int64 int_denominator_val = 4;
// string_val exposes a string value. These are likely annotations.
string string_val = 5;
// bool_val exposes a boolean statistic.
bool bool_val = 6;
// unit gives the unit type: °F, %, MHz, MB, etc.
string unit = 7;
// desc provides a human readable description of the statistic.
string desc = 8;
}

View File

@@ -326,52 +326,12 @@ func convertProtoDeviceStats(in *proto.DeviceStats) *DeviceStats {
}
return &DeviceStats{
Summary: convertProtoStatValue(in.Summary),
Stats: convertProtoStatObject(in.Stats),
Summary: structs.ConvertProtoStatValue(in.Summary),
Stats: structs.ConvertProtoStatObject(in.Stats),
Timestamp: ts,
}
}
// convertProtoStatObject converts between a proto and struct StatObject
func convertProtoStatObject(in *proto.StatObject) *StatObject {
if in == nil {
return nil
}
out := &StatObject{
Nested: make(map[string]*StatObject, len(in.Nested)),
Attributes: make(map[string]*StatValue, len(in.Attributes)),
}
for k, v := range in.Nested {
out.Nested[k] = convertProtoStatObject(v)
}
for k, v := range in.Attributes {
out.Attributes[k] = convertProtoStatValue(v)
}
return out
}
// convertProtoStatValue converts between a proto and struct StatValue
func convertProtoStatValue(in *proto.StatValue) *StatValue {
if in == nil {
return nil
}
return &StatValue{
FloatNumeratorVal: in.FloatNumeratorVal,
FloatDenominatorVal: in.FloatDenominatorVal,
IntNumeratorVal: in.IntNumeratorVal,
IntDenominatorVal: in.IntDenominatorVal,
StringVal: in.StringVal,
BoolVal: in.BoolVal,
Unit: in.Unit,
Desc: in.Desc,
}
}
// convertStructDeviceGroupsStats converts between a list of struct and proto
// DeviceGroupStats
func convertStructDeviceGroupsStats(in []*DeviceGroupStats) []*proto.DeviceGroupStats {
@@ -420,48 +380,8 @@ func convertStructDeviceStats(in *DeviceStats) *proto.DeviceStats {
}
return &proto.DeviceStats{
Summary: convertStructStatValue(in.Summary),
Stats: convertStructStatObject(in.Stats),
Summary: structs.ConvertStructStatValue(in.Summary),
Stats: structs.ConvertStructStatObject(in.Stats),
Timestamp: ts,
}
}
// convertStructStatObject converts between a struct and proto StatObject
func convertStructStatObject(in *StatObject) *proto.StatObject {
if in == nil {
return nil
}
out := &proto.StatObject{
Nested: make(map[string]*proto.StatObject, len(in.Nested)),
Attributes: make(map[string]*proto.StatValue, len(in.Attributes)),
}
for k, v := range in.Nested {
out.Nested[k] = convertStructStatObject(v)
}
for k, v := range in.Attributes {
out.Attributes[k] = convertStructStatValue(v)
}
return out
}
// convertStructStatValue converts between a struct and proto StatValue
func convertStructStatValue(in *StatValue) *proto.StatValue {
if in == nil {
return nil
}
return &proto.StatValue{
FloatNumeratorVal: in.FloatNumeratorVal,
FloatDenominatorVal: in.FloatDenominatorVal,
IntNumeratorVal: in.IntNumeratorVal,
IntDenominatorVal: in.IntDenominatorVal,
StringVal: in.StringVal,
BoolVal: in.BoolVal,
Unit: in.Unit,
Desc: in.Desc,
}
}

View File

@@ -0,0 +1,216 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: plugins/shared/structs/proto/stats.proto
package proto
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// StatObject is a collection of statistics either exposed at the top
// level or via nested StatObjects.
type StatObject struct {
// nested is a mapping of object name to a nested stats object.
Nested map[string]*StatObject `protobuf:"bytes,1,rep,name=nested,proto3" json:"nested,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// attributes is a mapping of statistic name to its value.
Attributes map[string]*StatValue `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *StatObject) Reset() { *m = StatObject{} }
func (m *StatObject) String() string { return proto.CompactTextString(m) }
func (*StatObject) ProtoMessage() {}
func (*StatObject) Descriptor() ([]byte, []int) {
return fileDescriptor_stats_f326973aadc74e22, []int{0}
}
func (m *StatObject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StatObject.Unmarshal(m, b)
}
func (m *StatObject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StatObject.Marshal(b, m, deterministic)
}
func (dst *StatObject) XXX_Merge(src proto.Message) {
xxx_messageInfo_StatObject.Merge(dst, src)
}
func (m *StatObject) XXX_Size() int {
return xxx_messageInfo_StatObject.Size(m)
}
func (m *StatObject) XXX_DiscardUnknown() {
xxx_messageInfo_StatObject.DiscardUnknown(m)
}
var xxx_messageInfo_StatObject proto.InternalMessageInfo
func (m *StatObject) GetNested() map[string]*StatObject {
if m != nil {
return m.Nested
}
return nil
}
func (m *StatObject) GetAttributes() map[string]*StatValue {
if m != nil {
return m.Attributes
}
return nil
}
// StatValue exposes the values of a particular statistic. The value may
// be of type double, integer, string or boolean. Numeric types can be
// exposed as a single value or as a fraction.
type StatValue struct {
// float_numerator_val exposes a floating point value. If denominator
// is set it is assumed to be a fractional value, otherwise it is a
// scalar.
FloatNumeratorVal float64 `protobuf:"fixed64,1,opt,name=float_numerator_val,json=floatNumeratorVal,proto3" json:"float_numerator_val,omitempty"`
FloatDenominatorVal float64 `protobuf:"fixed64,2,opt,name=float_denominator_val,json=floatDenominatorVal,proto3" json:"float_denominator_val,omitempty"`
// int_numerator_val exposes a int value. If denominator
// is set it is assumed to be a fractional value, otherwise it is a
// scalar.
IntNumeratorVal int64 `protobuf:"varint,3,opt,name=int_numerator_val,json=intNumeratorVal,proto3" json:"int_numerator_val,omitempty"`
IntDenominatorVal int64 `protobuf:"varint,4,opt,name=int_denominator_val,json=intDenominatorVal,proto3" json:"int_denominator_val,omitempty"`
// string_val exposes a string value. These are likely annotations.
StringVal string `protobuf:"bytes,5,opt,name=string_val,json=stringVal,proto3" json:"string_val,omitempty"`
// bool_val exposes a boolean statistic.
BoolVal bool `protobuf:"varint,6,opt,name=bool_val,json=boolVal,proto3" json:"bool_val,omitempty"`
// unit gives the unit type: °F, %, MHz, MB, etc.
Unit string `protobuf:"bytes,7,opt,name=unit,proto3" json:"unit,omitempty"`
// desc provides a human readable description of the statistic.
Desc string `protobuf:"bytes,8,opt,name=desc,proto3" json:"desc,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *StatValue) Reset() { *m = StatValue{} }
func (m *StatValue) String() string { return proto.CompactTextString(m) }
func (*StatValue) ProtoMessage() {}
func (*StatValue) Descriptor() ([]byte, []int) {
return fileDescriptor_stats_f326973aadc74e22, []int{1}
}
func (m *StatValue) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StatValue.Unmarshal(m, b)
}
func (m *StatValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StatValue.Marshal(b, m, deterministic)
}
func (dst *StatValue) XXX_Merge(src proto.Message) {
xxx_messageInfo_StatValue.Merge(dst, src)
}
func (m *StatValue) XXX_Size() int {
return xxx_messageInfo_StatValue.Size(m)
}
func (m *StatValue) XXX_DiscardUnknown() {
xxx_messageInfo_StatValue.DiscardUnknown(m)
}
var xxx_messageInfo_StatValue proto.InternalMessageInfo
func (m *StatValue) GetFloatNumeratorVal() float64 {
if m != nil {
return m.FloatNumeratorVal
}
return 0
}
func (m *StatValue) GetFloatDenominatorVal() float64 {
if m != nil {
return m.FloatDenominatorVal
}
return 0
}
func (m *StatValue) GetIntNumeratorVal() int64 {
if m != nil {
return m.IntNumeratorVal
}
return 0
}
func (m *StatValue) GetIntDenominatorVal() int64 {
if m != nil {
return m.IntDenominatorVal
}
return 0
}
func (m *StatValue) GetStringVal() string {
if m != nil {
return m.StringVal
}
return ""
}
func (m *StatValue) GetBoolVal() bool {
if m != nil {
return m.BoolVal
}
return false
}
func (m *StatValue) GetUnit() string {
if m != nil {
return m.Unit
}
return ""
}
func (m *StatValue) GetDesc() string {
if m != nil {
return m.Desc
}
return ""
}
func init() {
proto.RegisterType((*StatObject)(nil), "hashicorp.nomad.plugins.shared.structs.StatObject")
proto.RegisterMapType((map[string]*StatValue)(nil), "hashicorp.nomad.plugins.shared.structs.StatObject.AttributesEntry")
proto.RegisterMapType((map[string]*StatObject)(nil), "hashicorp.nomad.plugins.shared.structs.StatObject.NestedEntry")
proto.RegisterType((*StatValue)(nil), "hashicorp.nomad.plugins.shared.structs.StatValue")
}
func init() {
proto.RegisterFile("plugins/shared/structs/proto/stats.proto", fileDescriptor_stats_f326973aadc74e22)
}
var fileDescriptor_stats_f326973aadc74e22 = []byte{
// 388 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0x4f, 0x8b, 0xd4, 0x30,
0x18, 0xc6, 0x49, 0xbb, 0xf3, 0xef, 0x9d, 0xc3, 0xba, 0x59, 0x84, 0xba, 0x20, 0x94, 0x3d, 0x48,
0xf1, 0x90, 0x62, 0xbd, 0x88, 0x07, 0xc1, 0x45, 0xd1, 0xd3, 0x08, 0x15, 0xe6, 0xe0, 0x65, 0x48,
0xdb, 0x38, 0x13, 0x6d, 0x93, 0x92, 0xbc, 0x1d, 0x98, 0x8f, 0xe4, 0xc1, 0xef, 0x28, 0x49, 0xc7,
0xf9, 0x53, 0x3c, 0x38, 0x7b, 0xea, 0xdb, 0xf7, 0x79, 0x9e, 0xdf, 0x13, 0x02, 0x81, 0xa4, 0xad,
0xbb, 0xb5, 0x54, 0x36, 0xb5, 0x1b, 0x6e, 0x44, 0x95, 0x5a, 0x34, 0x5d, 0x89, 0x36, 0x6d, 0x8d,
0x46, 0x9d, 0x5a, 0xe4, 0x68, 0x99, 0x9f, 0xe9, 0x8b, 0x0d, 0xb7, 0x1b, 0x59, 0x6a, 0xd3, 0x32,
0xa5, 0x1b, 0x5e, 0xb1, 0x7d, 0x92, 0xf5, 0x49, 0xb6, 0x4f, 0xde, 0xff, 0x0a, 0x01, 0xbe, 0x22,
0xc7, 0x2f, 0xc5, 0x0f, 0x51, 0x22, 0x5d, 0xc2, 0x58, 0x09, 0x8b, 0xa2, 0x8a, 0x48, 0x1c, 0x26,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xb3, 0x59, 0xbf, 0x71, 0xf2, 0x33, 0x98, 0x16, 0x5a, 0xd7,
0x5e, 0x1c, 0xc7, 0x24, 0x99, 0xe6, 0x13, 0xf7, 0xef, 0x24, 0x0a, 0x57, 0x9d, 0x92, 0x18, 0x4d,
0x7c, 0xc6, 0xcf, 0x6e, 0x57, 0x09, 0x5b, 0x46, 0xd3, 0x7e, 0xe7, 0xe6, 0x87, 0xc9, 0xb7, 0x91,
0x7f, 0x0c, 0xc5, 0xd8, 0x7f, 0x5e, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x74, 0xc8, 0xbd, 0x36,
0x3f, 0x03, 0x00, 0x00,
}

View File

@@ -0,0 +1,42 @@
syntax = "proto3";
package hashicorp.nomad.plugins.shared.structs;
option go_package = "proto";
// StatObject is a collection of statistics either exposed at the top
// level or via nested StatObjects.
message StatObject {
// nested is a mapping of object name to a nested stats object.
map<string, StatObject> nested = 1;
// attributes is a mapping of statistic name to its value.
map<string, StatValue> attributes = 2;
}
// StatValue exposes the values of a particular statistic. The value may
// be of type double, integer, string or boolean. Numeric types can be
// exposed as a single value or as a fraction.
message StatValue {
// float_numerator_val exposes a floating point value. If denominator
// is set it is assumed to be a fractional value, otherwise it is a
// scalar.
double float_numerator_val = 1;
double float_denominator_val = 2;
// int_numerator_val exposes a int value. If denominator
// is set it is assumed to be a fractional value, otherwise it is a
// scalar.
int64 int_numerator_val = 3;
int64 int_denominator_val = 4;
// string_val exposes a string value. These are likely annotations.
string string_val = 5;
// bool_val exposes a boolean statistic.
bool bool_val = 6;
// unit gives the unit type: °F, %, MHz, MB, etc.
string unit = 7;
// desc provides a human readable description of the statistic.
string desc = 8;
}

View File

@@ -0,0 +1,38 @@
package structs
// StatObject is a collection of statistics either exposed at the top
// level or via nested StatObjects.
type StatObject struct {
// Nested is a mapping of object name to a nested stats object.
Nested map[string]*StatObject
// Attributes is a mapping of statistic name to its value.
Attributes map[string]*StatValue
}
// StatValue exposes the values of a particular statistic. The value may be of
// type float, integer, string or boolean. Numeric types can be exposed as a
// single value or as a fraction.
type StatValue struct {
// FloatNumeratorVal exposes a floating point value. If denominator is set
// it is assumed to be a fractional value, otherwise it is a scalar.
FloatNumeratorVal float64
FloatDenominatorVal float64
// IntNumeratorVal exposes a int value. If denominator is set it is assumed
// to be a fractional value, otherwise it is a scalar.
IntNumeratorVal int64
IntDenominatorVal int64
// StringVal exposes a string value. These are likely annotations.
StringVal string
// BoolVal exposes a boolean statistic.
BoolVal bool
// Unit gives the unit type: °F, %, MHz, MB, etc.
Unit string
// Desc provides a human readable description of the statistic.
Desc string
}

View File

@@ -101,3 +101,83 @@ func CopyMapStringAttribute(in map[string]*Attribute) map[string]*Attribute {
}
return out
}
// ConvertProtoStatObject converts between a proto and struct StatObject
func ConvertProtoStatObject(in *proto.StatObject) *StatObject {
if in == nil {
return nil
}
out := &StatObject{
Nested: make(map[string]*StatObject, len(in.Nested)),
Attributes: make(map[string]*StatValue, len(in.Attributes)),
}
for k, v := range in.Nested {
out.Nested[k] = ConvertProtoStatObject(v)
}
for k, v := range in.Attributes {
out.Attributes[k] = ConvertProtoStatValue(v)
}
return out
}
// ConvertProtoStatValue converts between a proto and struct StatValue
func ConvertProtoStatValue(in *proto.StatValue) *StatValue {
if in == nil {
return nil
}
return &StatValue{
FloatNumeratorVal: in.FloatNumeratorVal,
FloatDenominatorVal: in.FloatDenominatorVal,
IntNumeratorVal: in.IntNumeratorVal,
IntDenominatorVal: in.IntDenominatorVal,
StringVal: in.StringVal,
BoolVal: in.BoolVal,
Unit: in.Unit,
Desc: in.Desc,
}
}
// ConvertStructStatObject converts between a struct and proto StatObject
func ConvertStructStatObject(in *StatObject) *proto.StatObject {
if in == nil {
return nil
}
out := &proto.StatObject{
Nested: make(map[string]*proto.StatObject, len(in.Nested)),
Attributes: make(map[string]*proto.StatValue, len(in.Attributes)),
}
for k, v := range in.Nested {
out.Nested[k] = ConvertStructStatObject(v)
}
for k, v := range in.Attributes {
out.Attributes[k] = ConvertStructStatValue(v)
}
return out
}
// ConvertStructStatValue converts between a struct and proto StatValue
func ConvertStructStatValue(in *StatValue) *proto.StatValue {
if in == nil {
return nil
}
return &proto.StatValue{
FloatNumeratorVal: in.FloatNumeratorVal,
FloatDenominatorVal: in.FloatDenominatorVal,
IntNumeratorVal: in.IntNumeratorVal,
IntDenominatorVal: in.IntDenominatorVal,
StringVal: in.StringVal,
BoolVal: in.BoolVal,
Unit: in.Unit,
Desc: in.Desc,
}
}

View File

@@ -0,0 +1,443 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/protobuf/wrappers.proto
package wrappers // import "github.com/golang/protobuf/ptypes/wrappers"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// Wrapper message for `double`.
//
// The JSON representation for `DoubleValue` is JSON number.
type DoubleValue struct {
// The double value.
Value float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DoubleValue) Reset() { *m = DoubleValue{} }
func (m *DoubleValue) String() string { return proto.CompactTextString(m) }
func (*DoubleValue) ProtoMessage() {}
func (*DoubleValue) Descriptor() ([]byte, []int) {
return fileDescriptor_wrappers_16c7c35c009f3253, []int{0}
}
func (*DoubleValue) XXX_WellKnownType() string { return "DoubleValue" }
func (m *DoubleValue) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DoubleValue.Unmarshal(m, b)
}
func (m *DoubleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DoubleValue.Marshal(b, m, deterministic)
}
func (dst *DoubleValue) XXX_Merge(src proto.Message) {
xxx_messageInfo_DoubleValue.Merge(dst, src)
}
func (m *DoubleValue) XXX_Size() int {
return xxx_messageInfo_DoubleValue.Size(m)
}
func (m *DoubleValue) XXX_DiscardUnknown() {
xxx_messageInfo_DoubleValue.DiscardUnknown(m)
}
var xxx_messageInfo_DoubleValue proto.InternalMessageInfo
func (m *DoubleValue) GetValue() float64 {
if m != nil {
return m.Value
}
return 0
}
// Wrapper message for `float`.
//
// The JSON representation for `FloatValue` is JSON number.
type FloatValue struct {
// The float value.
Value float32 `protobuf:"fixed32,1,opt,name=value" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *FloatValue) Reset() { *m = FloatValue{} }
func (m *FloatValue) String() string { return proto.CompactTextString(m) }
func (*FloatValue) ProtoMessage() {}
func (*FloatValue) Descriptor() ([]byte, []int) {
return fileDescriptor_wrappers_16c7c35c009f3253, []int{1}
}
func (*FloatValue) XXX_WellKnownType() string { return "FloatValue" }
func (m *FloatValue) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FloatValue.Unmarshal(m, b)
}
func (m *FloatValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_FloatValue.Marshal(b, m, deterministic)
}
func (dst *FloatValue) XXX_Merge(src proto.Message) {
xxx_messageInfo_FloatValue.Merge(dst, src)
}
func (m *FloatValue) XXX_Size() int {
return xxx_messageInfo_FloatValue.Size(m)
}
func (m *FloatValue) XXX_DiscardUnknown() {
xxx_messageInfo_FloatValue.DiscardUnknown(m)
}
var xxx_messageInfo_FloatValue proto.InternalMessageInfo
func (m *FloatValue) GetValue() float32 {
if m != nil {
return m.Value
}
return 0
}
// Wrapper message for `int64`.
//
// The JSON representation for `Int64Value` is JSON string.
type Int64Value struct {
// The int64 value.
Value int64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Int64Value) Reset() { *m = Int64Value{} }
func (m *Int64Value) String() string { return proto.CompactTextString(m) }
func (*Int64Value) ProtoMessage() {}
func (*Int64Value) Descriptor() ([]byte, []int) {
return fileDescriptor_wrappers_16c7c35c009f3253, []int{2}
}
func (*Int64Value) XXX_WellKnownType() string { return "Int64Value" }
func (m *Int64Value) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Int64Value.Unmarshal(m, b)
}
func (m *Int64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Int64Value.Marshal(b, m, deterministic)
}
func (dst *Int64Value) XXX_Merge(src proto.Message) {
xxx_messageInfo_Int64Value.Merge(dst, src)
}
func (m *Int64Value) XXX_Size() int {
return xxx_messageInfo_Int64Value.Size(m)
}
func (m *Int64Value) XXX_DiscardUnknown() {
xxx_messageInfo_Int64Value.DiscardUnknown(m)
}
var xxx_messageInfo_Int64Value proto.InternalMessageInfo
func (m *Int64Value) GetValue() int64 {
if m != nil {
return m.Value
}
return 0
}
// Wrapper message for `uint64`.
//
// The JSON representation for `UInt64Value` is JSON string.
type UInt64Value struct {
// The uint64 value.
Value uint64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UInt64Value) Reset() { *m = UInt64Value{} }
func (m *UInt64Value) String() string { return proto.CompactTextString(m) }
func (*UInt64Value) ProtoMessage() {}
func (*UInt64Value) Descriptor() ([]byte, []int) {
return fileDescriptor_wrappers_16c7c35c009f3253, []int{3}
}
func (*UInt64Value) XXX_WellKnownType() string { return "UInt64Value" }
func (m *UInt64Value) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UInt64Value.Unmarshal(m, b)
}
func (m *UInt64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UInt64Value.Marshal(b, m, deterministic)
}
func (dst *UInt64Value) XXX_Merge(src proto.Message) {
xxx_messageInfo_UInt64Value.Merge(dst, src)
}
func (m *UInt64Value) XXX_Size() int {
return xxx_messageInfo_UInt64Value.Size(m)
}
func (m *UInt64Value) XXX_DiscardUnknown() {
xxx_messageInfo_UInt64Value.DiscardUnknown(m)
}
var xxx_messageInfo_UInt64Value proto.InternalMessageInfo
func (m *UInt64Value) GetValue() uint64 {
if m != nil {
return m.Value
}
return 0
}
// Wrapper message for `int32`.
//
// The JSON representation for `Int32Value` is JSON number.
type Int32Value struct {
// The int32 value.
Value int32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Int32Value) Reset() { *m = Int32Value{} }
func (m *Int32Value) String() string { return proto.CompactTextString(m) }
func (*Int32Value) ProtoMessage() {}
func (*Int32Value) Descriptor() ([]byte, []int) {
return fileDescriptor_wrappers_16c7c35c009f3253, []int{4}
}
func (*Int32Value) XXX_WellKnownType() string { return "Int32Value" }
func (m *Int32Value) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Int32Value.Unmarshal(m, b)
}
func (m *Int32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Int32Value.Marshal(b, m, deterministic)
}
func (dst *Int32Value) XXX_Merge(src proto.Message) {
xxx_messageInfo_Int32Value.Merge(dst, src)
}
func (m *Int32Value) XXX_Size() int {
return xxx_messageInfo_Int32Value.Size(m)
}
func (m *Int32Value) XXX_DiscardUnknown() {
xxx_messageInfo_Int32Value.DiscardUnknown(m)
}
var xxx_messageInfo_Int32Value proto.InternalMessageInfo
func (m *Int32Value) GetValue() int32 {
if m != nil {
return m.Value
}
return 0
}
// Wrapper message for `uint32`.
//
// The JSON representation for `UInt32Value` is JSON number.
type UInt32Value struct {
// The uint32 value.
Value uint32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UInt32Value) Reset() { *m = UInt32Value{} }
func (m *UInt32Value) String() string { return proto.CompactTextString(m) }
func (*UInt32Value) ProtoMessage() {}
func (*UInt32Value) Descriptor() ([]byte, []int) {
return fileDescriptor_wrappers_16c7c35c009f3253, []int{5}
}
func (*UInt32Value) XXX_WellKnownType() string { return "UInt32Value" }
func (m *UInt32Value) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UInt32Value.Unmarshal(m, b)
}
func (m *UInt32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UInt32Value.Marshal(b, m, deterministic)
}
func (dst *UInt32Value) XXX_Merge(src proto.Message) {
xxx_messageInfo_UInt32Value.Merge(dst, src)
}
func (m *UInt32Value) XXX_Size() int {
return xxx_messageInfo_UInt32Value.Size(m)
}
func (m *UInt32Value) XXX_DiscardUnknown() {
xxx_messageInfo_UInt32Value.DiscardUnknown(m)
}
var xxx_messageInfo_UInt32Value proto.InternalMessageInfo
func (m *UInt32Value) GetValue() uint32 {
if m != nil {
return m.Value
}
return 0
}
// Wrapper message for `bool`.
//
// The JSON representation for `BoolValue` is JSON `true` and `false`.
type BoolValue struct {
// The bool value.
Value bool `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BoolValue) Reset() { *m = BoolValue{} }
func (m *BoolValue) String() string { return proto.CompactTextString(m) }
func (*BoolValue) ProtoMessage() {}
func (*BoolValue) Descriptor() ([]byte, []int) {
return fileDescriptor_wrappers_16c7c35c009f3253, []int{6}
}
func (*BoolValue) XXX_WellKnownType() string { return "BoolValue" }
func (m *BoolValue) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BoolValue.Unmarshal(m, b)
}
func (m *BoolValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BoolValue.Marshal(b, m, deterministic)
}
func (dst *BoolValue) XXX_Merge(src proto.Message) {
xxx_messageInfo_BoolValue.Merge(dst, src)
}
func (m *BoolValue) XXX_Size() int {
return xxx_messageInfo_BoolValue.Size(m)
}
func (m *BoolValue) XXX_DiscardUnknown() {
xxx_messageInfo_BoolValue.DiscardUnknown(m)
}
var xxx_messageInfo_BoolValue proto.InternalMessageInfo
func (m *BoolValue) GetValue() bool {
if m != nil {
return m.Value
}
return false
}
// Wrapper message for `string`.
//
// The JSON representation for `StringValue` is JSON string.
type StringValue struct {
// The string value.
Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *StringValue) Reset() { *m = StringValue{} }
func (m *StringValue) String() string { return proto.CompactTextString(m) }
func (*StringValue) ProtoMessage() {}
func (*StringValue) Descriptor() ([]byte, []int) {
return fileDescriptor_wrappers_16c7c35c009f3253, []int{7}
}
func (*StringValue) XXX_WellKnownType() string { return "StringValue" }
func (m *StringValue) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StringValue.Unmarshal(m, b)
}
func (m *StringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StringValue.Marshal(b, m, deterministic)
}
func (dst *StringValue) XXX_Merge(src proto.Message) {
xxx_messageInfo_StringValue.Merge(dst, src)
}
func (m *StringValue) XXX_Size() int {
return xxx_messageInfo_StringValue.Size(m)
}
func (m *StringValue) XXX_DiscardUnknown() {
xxx_messageInfo_StringValue.DiscardUnknown(m)
}
var xxx_messageInfo_StringValue proto.InternalMessageInfo
func (m *StringValue) GetValue() string {
if m != nil {
return m.Value
}
return ""
}
// Wrapper message for `bytes`.
//
// The JSON representation for `BytesValue` is JSON string.
type BytesValue struct {
// The bytes value.
Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BytesValue) Reset() { *m = BytesValue{} }
func (m *BytesValue) String() string { return proto.CompactTextString(m) }
func (*BytesValue) ProtoMessage() {}
func (*BytesValue) Descriptor() ([]byte, []int) {
return fileDescriptor_wrappers_16c7c35c009f3253, []int{8}
}
func (*BytesValue) XXX_WellKnownType() string { return "BytesValue" }
func (m *BytesValue) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BytesValue.Unmarshal(m, b)
}
func (m *BytesValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BytesValue.Marshal(b, m, deterministic)
}
func (dst *BytesValue) XXX_Merge(src proto.Message) {
xxx_messageInfo_BytesValue.Merge(dst, src)
}
func (m *BytesValue) XXX_Size() int {
return xxx_messageInfo_BytesValue.Size(m)
}
func (m *BytesValue) XXX_DiscardUnknown() {
xxx_messageInfo_BytesValue.DiscardUnknown(m)
}
var xxx_messageInfo_BytesValue proto.InternalMessageInfo
func (m *BytesValue) GetValue() []byte {
if m != nil {
return m.Value
}
return nil
}
func init() {
proto.RegisterType((*DoubleValue)(nil), "google.protobuf.DoubleValue")
proto.RegisterType((*FloatValue)(nil), "google.protobuf.FloatValue")
proto.RegisterType((*Int64Value)(nil), "google.protobuf.Int64Value")
proto.RegisterType((*UInt64Value)(nil), "google.protobuf.UInt64Value")
proto.RegisterType((*Int32Value)(nil), "google.protobuf.Int32Value")
proto.RegisterType((*UInt32Value)(nil), "google.protobuf.UInt32Value")
proto.RegisterType((*BoolValue)(nil), "google.protobuf.BoolValue")
proto.RegisterType((*StringValue)(nil), "google.protobuf.StringValue")
proto.RegisterType((*BytesValue)(nil), "google.protobuf.BytesValue")
}
func init() {
proto.RegisterFile("google/protobuf/wrappers.proto", fileDescriptor_wrappers_16c7c35c009f3253)
}
var fileDescriptor_wrappers_16c7c35c009f3253 = []byte{
// 259 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f,
0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x2f, 0x4a, 0x2c,
0x28, 0x48, 0x2d, 0x2a, 0xd6, 0x03, 0x8b, 0x08, 0xf1, 0x43, 0xe4, 0xf5, 0x60, 0xf2, 0x4a, 0xca,
0x5c, 0xdc, 0x2e, 0xf9, 0xa5, 0x49, 0x39, 0xa9, 0x61, 0x89, 0x39, 0xa5, 0xa9, 0x42, 0x22, 0x5c,
0xac, 0x65, 0x20, 0x86, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x63, 0x10, 0x84, 0xa3, 0xa4, 0xc4, 0xc5,
0xe5, 0x96, 0x93, 0x9f, 0x58, 0x82, 0x45, 0x0d, 0x13, 0x92, 0x1a, 0xcf, 0xbc, 0x12, 0x33, 0x13,
0x2c, 0x6a, 0x98, 0x61, 0x6a, 0x94, 0xb9, 0xb8, 0x43, 0x71, 0x29, 0x62, 0x41, 0x35, 0xc8, 0xd8,
0x08, 0x8b, 0x1a, 0x56, 0x34, 0x83, 0xb0, 0x2a, 0xe2, 0x85, 0x29, 0x52, 0xe4, 0xe2, 0x74, 0xca,
0xcf, 0xcf, 0xc1, 0xa2, 0x84, 0x03, 0xc9, 0x9c, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0x74, 0x2c, 0x8a,
0x38, 0x91, 0x1c, 0xe4, 0x54, 0x59, 0x92, 0x5a, 0x8c, 0x45, 0x0d, 0x0f, 0x54, 0x8d, 0x53, 0x0d,
0x97, 0x70, 0x72, 0x7e, 0xae, 0x1e, 0x5a, 0xe8, 0x3a, 0xf1, 0x86, 0x43, 0x83, 0x3f, 0x00, 0x24,
0x12, 0xc0, 0x18, 0xa5, 0x95, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f,
0x9e, 0x9f, 0x93, 0x98, 0x97, 0x8e, 0x88, 0xaa, 0x82, 0x92, 0xca, 0x82, 0xd4, 0x62, 0x78, 0x8c,
0xfd, 0x60, 0x64, 0x5c, 0xc4, 0xc4, 0xec, 0x1e, 0xe0, 0xb4, 0x8a, 0x49, 0xce, 0x1d, 0x62, 0x6e,
0x00, 0x54, 0xa9, 0x5e, 0x78, 0x6a, 0x4e, 0x8e, 0x77, 0x5e, 0x7e, 0x79, 0x5e, 0x08, 0x48, 0x4b,
0x12, 0x1b, 0xd8, 0x0c, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x19, 0x6c, 0xb9, 0xb8, 0xfe,
0x01, 0x00, 0x00,
}

View File

@@ -0,0 +1,118 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Wrappers for primitive (non-message) types. These types are useful
// for embedding primitives in the `google.protobuf.Any` type and for places
// where we need to distinguish between the absence of a primitive
// typed field and its default value.
syntax = "proto3";
package google.protobuf;
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option cc_enable_arenas = true;
option go_package = "github.com/golang/protobuf/ptypes/wrappers";
option java_package = "com.google.protobuf";
option java_outer_classname = "WrappersProto";
option java_multiple_files = true;
option objc_class_prefix = "GPB";
// Wrapper message for `double`.
//
// The JSON representation for `DoubleValue` is JSON number.
message DoubleValue {
// The double value.
double value = 1;
}
// Wrapper message for `float`.
//
// The JSON representation for `FloatValue` is JSON number.
message FloatValue {
// The float value.
float value = 1;
}
// Wrapper message for `int64`.
//
// The JSON representation for `Int64Value` is JSON string.
message Int64Value {
// The int64 value.
int64 value = 1;
}
// Wrapper message for `uint64`.
//
// The JSON representation for `UInt64Value` is JSON string.
message UInt64Value {
// The uint64 value.
uint64 value = 1;
}
// Wrapper message for `int32`.
//
// The JSON representation for `Int32Value` is JSON number.
message Int32Value {
// The int32 value.
int32 value = 1;
}
// Wrapper message for `uint32`.
//
// The JSON representation for `UInt32Value` is JSON number.
message UInt32Value {
// The uint32 value.
uint32 value = 1;
}
// Wrapper message for `bool`.
//
// The JSON representation for `BoolValue` is JSON `true` and `false`.
message BoolValue {
// The bool value.
bool value = 1;
}
// Wrapper message for `string`.
//
// The JSON representation for `StringValue` is JSON string.
message StringValue {
// The string value.
string value = 1;
}
// Wrapper message for `bytes`.
//
// The JSON representation for `BytesValue` is JSON string.
message BytesValue {
// The bytes value.
bytes value = 1;
}

3132
vendor/vendor.json vendored

File diff suppressed because it is too large Load Diff