github.com/ferranbt/nomad@v0.9.3-0.20190607002617-85c449b7667c/plugins/shared/structs/proto/stats.proto (about) 1 syntax = "proto3"; 2 package hashicorp.nomad.plugins.shared.structs; 3 option go_package = "proto"; 4 5 import "google/protobuf/wrappers.proto"; 6 7 // StatObject is a collection of statistics either exposed at the top 8 // level or via nested StatObjects. 9 message StatObject { 10 // nested is a mapping of object name to a nested stats object. 11 map<string, StatObject> nested = 1; 12 13 // attributes is a mapping of statistic name to its value. 14 map<string, StatValue> attributes = 2; 15 } 16 17 // StatValue exposes the values of a particular statistic. The value may 18 // be of type double, integer, string or boolean. Numeric types can be 19 // exposed as a single value or as a fraction. 20 message StatValue { 21 // float_numerator_val exposes a floating point value. If denominator 22 // is set it is assumed to be a fractional value, otherwise it is a 23 // scalar. 24 google.protobuf.DoubleValue float_numerator_val = 1; 25 google.protobuf.DoubleValue float_denominator_val = 2; 26 27 // int_numerator_val exposes a int value. If denominator 28 // is set it is assumed to be a fractional value, otherwise it is a 29 // scalar. 30 google.protobuf.Int64Value int_numerator_val = 3; 31 google.protobuf.Int64Value int_denominator_val = 4; 32 33 // string_val exposes a string value. These are likely annotations. 34 google.protobuf.StringValue string_val = 5; 35 36 // bool_val exposes a boolean statistic. 37 google.protobuf.BoolValue bool_val = 6; 38 39 // unit gives the unit type: °F, %, MHz, MB, etc. 40 string unit = 7; 41 42 // desc provides a human readable description of the statistic. 43 string desc = 8; 44 }