2018-11-12 00:36:20 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package hashicorp.nomad.plugins.shared.structs;
|
|
|
|
option go_package = "proto";
|
|
|
|
|
2018-11-13 15:06:44 +00:00
|
|
|
import "google/protobuf/wrappers.proto";
|
|
|
|
|
2018-11-12 00:36:20 +00:00
|
|
|
// 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.
|
2018-11-13 15:06:44 +00:00
|
|
|
google.protobuf.DoubleValue float_numerator_val = 1;
|
|
|
|
google.protobuf.DoubleValue float_denominator_val = 2;
|
2018-11-12 00:36:20 +00:00
|
|
|
|
|
|
|
// int_numerator_val exposes a int value. If denominator
|
|
|
|
// is set it is assumed to be a fractional value, otherwise it is a
|
|
|
|
// scalar.
|
2018-11-13 15:06:44 +00:00
|
|
|
google.protobuf.Int64Value int_numerator_val = 3;
|
|
|
|
google.protobuf.Int64Value int_denominator_val = 4;
|
2018-11-12 00:36:20 +00:00
|
|
|
|
|
|
|
// string_val exposes a string value. These are likely annotations.
|
2018-11-13 15:06:44 +00:00
|
|
|
google.protobuf.StringValue string_val = 5;
|
2018-11-12 00:36:20 +00:00
|
|
|
|
|
|
|
// bool_val exposes a boolean statistic.
|
2018-11-13 15:06:44 +00:00
|
|
|
google.protobuf.BoolValue bool_val = 6;
|
2018-11-12 00:36:20 +00:00
|
|
|
|
|
|
|
// unit gives the unit type: °F, %, MHz, MB, etc.
|
|
|
|
string unit = 7;
|
|
|
|
|
|
|
|
// desc provides a human readable description of the statistic.
|
|
|
|
string desc = 8;
|
|
|
|
}
|