Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 1 | // Code generated by protoc-gen-go. DO NOT EDIT. |
| 2 | // source: dmi/hw_metrics_mgmt_service.proto |
| 3 | |
| 4 | package dmi |
| 5 | |
| 6 | import ( |
| 7 | context "context" |
| 8 | fmt "fmt" |
| 9 | proto "github.com/golang/protobuf/proto" |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 10 | empty "github.com/golang/protobuf/ptypes/empty" |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 11 | grpc "google.golang.org/grpc" |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 12 | codes "google.golang.org/grpc/codes" |
| 13 | status "google.golang.org/grpc/status" |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 14 | math "math" |
| 15 | ) |
| 16 | |
| 17 | // Reference imports to suppress errors if they are not otherwise used. |
| 18 | var _ = proto.Marshal |
| 19 | var _ = fmt.Errorf |
| 20 | var _ = math.Inf |
| 21 | |
| 22 | // This is a compile-time assertion to ensure that this generated file |
| 23 | // is compatible with the proto package it is being compiled against. |
| 24 | // A compilation error at this line likely means your copy of the |
| 25 | // proto package needs to be updated. |
| 26 | const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package |
| 27 | |
| 28 | type MetricNames int32 |
| 29 | |
| 30 | const ( |
| 31 | MetricNames_METRIC_NAME_UNDEFINED MetricNames = 0 |
| 32 | // FAN related metrics |
| 33 | MetricNames_METRIC_FAN_SPEED MetricNames = 1 |
| 34 | // CPU related metrics |
| 35 | MetricNames_METRIC_CPU_TEMP MetricNames = 100 |
| 36 | MetricNames_METRIC_CPU_USAGE_PERCENTAGE MetricNames = 101 |
| 37 | // Transceiver related metrics |
| 38 | MetricNames_METRIC_TRANSCEIVER_TEMP MetricNames = 200 |
| 39 | MetricNames_METRIC_TRANSCEIVER_VOLTAGE MetricNames = 201 |
| 40 | MetricNames_METRIC_TRANSCEIVER_BIAS MetricNames = 202 |
| 41 | MetricNames_METRIC_TRANSCEIVER_RX_POWER MetricNames = 203 |
| 42 | MetricNames_METRIC_TRANSCEIVER_TX_POWER MetricNames = 204 |
| 43 | MetricNames_METRIC_TRANSCEIVER_WAVELENGTH MetricNames = 205 |
| 44 | // Disk related metrics |
| 45 | MetricNames_METRIC_DISK_TEMP MetricNames = 300 |
| 46 | MetricNames_METRIC_DISK_CAPACITY MetricNames = 301 |
| 47 | MetricNames_METRIC_DISK_USAGE MetricNames = 302 |
| 48 | MetricNames_METRIC_DISK_USAGE_PERCENTAGE MetricNames = 303 |
| 49 | MetricNames_METRIC_DISK_READ_WRITE_PERCENTAGE MetricNames = 304 |
| 50 | MetricNames_METRIC_DISK_FAULTY_CELLS_PERCENTAGE MetricNames = 305 |
| 51 | // RAM related metrics |
| 52 | MetricNames_METRIC_RAM_TEMP MetricNames = 400 |
| 53 | MetricNames_METRIC_RAM_CAPACITY MetricNames = 401 |
| 54 | MetricNames_METRIC_RAM_USAGE MetricNames = 402 |
| 55 | MetricNames_METRIC_RAM_USAGE_PERCENTAGE MetricNames = 403 |
| 56 | // Power related metrics |
| 57 | MetricNames_METRIC_POWER_MAX MetricNames = 500 |
| 58 | MetricNames_METRIC_POWER_USAGE MetricNames = 501 |
| 59 | MetricNames_METRIC_POWER_USAGE_PERCENTAGE MetricNames = 502 |
| 60 | // Chassis related metrics |
| 61 | MetricNames_METRIC_INNER_SURROUNDING_TEMP MetricNames = 600 |
| 62 | ) |
| 63 | |
| 64 | var MetricNames_name = map[int32]string{ |
| 65 | 0: "METRIC_NAME_UNDEFINED", |
| 66 | 1: "METRIC_FAN_SPEED", |
| 67 | 100: "METRIC_CPU_TEMP", |
| 68 | 101: "METRIC_CPU_USAGE_PERCENTAGE", |
| 69 | 200: "METRIC_TRANSCEIVER_TEMP", |
| 70 | 201: "METRIC_TRANSCEIVER_VOLTAGE", |
| 71 | 202: "METRIC_TRANSCEIVER_BIAS", |
| 72 | 203: "METRIC_TRANSCEIVER_RX_POWER", |
| 73 | 204: "METRIC_TRANSCEIVER_TX_POWER", |
| 74 | 205: "METRIC_TRANSCEIVER_WAVELENGTH", |
| 75 | 300: "METRIC_DISK_TEMP", |
| 76 | 301: "METRIC_DISK_CAPACITY", |
| 77 | 302: "METRIC_DISK_USAGE", |
| 78 | 303: "METRIC_DISK_USAGE_PERCENTAGE", |
| 79 | 304: "METRIC_DISK_READ_WRITE_PERCENTAGE", |
| 80 | 305: "METRIC_DISK_FAULTY_CELLS_PERCENTAGE", |
| 81 | 400: "METRIC_RAM_TEMP", |
| 82 | 401: "METRIC_RAM_CAPACITY", |
| 83 | 402: "METRIC_RAM_USAGE", |
| 84 | 403: "METRIC_RAM_USAGE_PERCENTAGE", |
| 85 | 500: "METRIC_POWER_MAX", |
| 86 | 501: "METRIC_POWER_USAGE", |
| 87 | 502: "METRIC_POWER_USAGE_PERCENTAGE", |
| 88 | 600: "METRIC_INNER_SURROUNDING_TEMP", |
| 89 | } |
| 90 | |
| 91 | var MetricNames_value = map[string]int32{ |
| 92 | "METRIC_NAME_UNDEFINED": 0, |
| 93 | "METRIC_FAN_SPEED": 1, |
| 94 | "METRIC_CPU_TEMP": 100, |
| 95 | "METRIC_CPU_USAGE_PERCENTAGE": 101, |
| 96 | "METRIC_TRANSCEIVER_TEMP": 200, |
| 97 | "METRIC_TRANSCEIVER_VOLTAGE": 201, |
| 98 | "METRIC_TRANSCEIVER_BIAS": 202, |
| 99 | "METRIC_TRANSCEIVER_RX_POWER": 203, |
| 100 | "METRIC_TRANSCEIVER_TX_POWER": 204, |
| 101 | "METRIC_TRANSCEIVER_WAVELENGTH": 205, |
| 102 | "METRIC_DISK_TEMP": 300, |
| 103 | "METRIC_DISK_CAPACITY": 301, |
| 104 | "METRIC_DISK_USAGE": 302, |
| 105 | "METRIC_DISK_USAGE_PERCENTAGE": 303, |
| 106 | "METRIC_DISK_READ_WRITE_PERCENTAGE": 304, |
| 107 | "METRIC_DISK_FAULTY_CELLS_PERCENTAGE": 305, |
| 108 | "METRIC_RAM_TEMP": 400, |
| 109 | "METRIC_RAM_CAPACITY": 401, |
| 110 | "METRIC_RAM_USAGE": 402, |
| 111 | "METRIC_RAM_USAGE_PERCENTAGE": 403, |
| 112 | "METRIC_POWER_MAX": 500, |
| 113 | "METRIC_POWER_USAGE": 501, |
| 114 | "METRIC_POWER_USAGE_PERCENTAGE": 502, |
| 115 | "METRIC_INNER_SURROUNDING_TEMP": 600, |
| 116 | } |
| 117 | |
| 118 | func (x MetricNames) String() string { |
| 119 | return proto.EnumName(MetricNames_name, int32(x)) |
| 120 | } |
| 121 | |
| 122 | func (MetricNames) EnumDescriptor() ([]byte, []int) { |
| 123 | return fileDescriptor_6b6c2f1384c11ff5, []int{0} |
| 124 | } |
| 125 | |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 126 | type ListMetricsResponse_Reason int32 |
| 127 | |
| 128 | const ( |
amit.ghosh | bd2022e | 2021-02-22 05:58:53 +0100 | [diff] [blame] | 129 | ListMetricsResponse_UNDEFINED_REASON ListMetricsResponse_Reason = 0 |
| 130 | ListMetricsResponse_UNKNOWN_DEVICE ListMetricsResponse_Reason = 1 |
| 131 | ListMetricsResponse_INTERNAL_ERROR ListMetricsResponse_Reason = 2 |
| 132 | ListMetricsResponse_DEVICE_UNREACHABLE ListMetricsResponse_Reason = 3 |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 133 | ) |
| 134 | |
| 135 | var ListMetricsResponse_Reason_name = map[int32]string{ |
| 136 | 0: "UNDEFINED_REASON", |
| 137 | 1: "UNKNOWN_DEVICE", |
| 138 | 2: "INTERNAL_ERROR", |
amit.ghosh | bd2022e | 2021-02-22 05:58:53 +0100 | [diff] [blame] | 139 | 3: "DEVICE_UNREACHABLE", |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 140 | } |
| 141 | |
| 142 | var ListMetricsResponse_Reason_value = map[string]int32{ |
amit.ghosh | bd2022e | 2021-02-22 05:58:53 +0100 | [diff] [blame] | 143 | "UNDEFINED_REASON": 0, |
| 144 | "UNKNOWN_DEVICE": 1, |
| 145 | "INTERNAL_ERROR": 2, |
| 146 | "DEVICE_UNREACHABLE": 3, |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 147 | } |
| 148 | |
| 149 | func (x ListMetricsResponse_Reason) String() string { |
| 150 | return proto.EnumName(ListMetricsResponse_Reason_name, int32(x)) |
| 151 | } |
| 152 | |
| 153 | func (ListMetricsResponse_Reason) EnumDescriptor() ([]byte, []int) { |
| 154 | return fileDescriptor_6b6c2f1384c11ff5, []int{2, 0} |
| 155 | } |
| 156 | |
| 157 | type MetricsConfigurationResponse_Reason int32 |
| 158 | |
| 159 | const ( |
| 160 | MetricsConfigurationResponse_UNDEFINED_REASON MetricsConfigurationResponse_Reason = 0 |
| 161 | MetricsConfigurationResponse_UNKNOWN_DEVICE MetricsConfigurationResponse_Reason = 1 |
| 162 | MetricsConfigurationResponse_INTERNAL_ERROR MetricsConfigurationResponse_Reason = 2 |
| 163 | MetricsConfigurationResponse_POLL_INTERVAL_UNSUPPORTED MetricsConfigurationResponse_Reason = 3 |
| 164 | MetricsConfigurationResponse_INVALID_METRIC MetricsConfigurationResponse_Reason = 4 |
amit.ghosh | bd2022e | 2021-02-22 05:58:53 +0100 | [diff] [blame] | 165 | MetricsConfigurationResponse_DEVICE_UNREACHABLE MetricsConfigurationResponse_Reason = 5 |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 166 | ) |
| 167 | |
| 168 | var MetricsConfigurationResponse_Reason_name = map[int32]string{ |
| 169 | 0: "UNDEFINED_REASON", |
| 170 | 1: "UNKNOWN_DEVICE", |
| 171 | 2: "INTERNAL_ERROR", |
| 172 | 3: "POLL_INTERVAL_UNSUPPORTED", |
| 173 | 4: "INVALID_METRIC", |
amit.ghosh | bd2022e | 2021-02-22 05:58:53 +0100 | [diff] [blame] | 174 | 5: "DEVICE_UNREACHABLE", |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 175 | } |
| 176 | |
| 177 | var MetricsConfigurationResponse_Reason_value = map[string]int32{ |
| 178 | "UNDEFINED_REASON": 0, |
| 179 | "UNKNOWN_DEVICE": 1, |
| 180 | "INTERNAL_ERROR": 2, |
| 181 | "POLL_INTERVAL_UNSUPPORTED": 3, |
| 182 | "INVALID_METRIC": 4, |
amit.ghosh | bd2022e | 2021-02-22 05:58:53 +0100 | [diff] [blame] | 183 | "DEVICE_UNREACHABLE": 5, |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 184 | } |
| 185 | |
| 186 | func (x MetricsConfigurationResponse_Reason) String() string { |
| 187 | return proto.EnumName(MetricsConfigurationResponse_Reason_name, int32(x)) |
| 188 | } |
| 189 | |
| 190 | func (MetricsConfigurationResponse_Reason) EnumDescriptor() ([]byte, []int) { |
| 191 | return fileDescriptor_6b6c2f1384c11ff5, []int{4, 0} |
| 192 | } |
| 193 | |
| 194 | type GetMetricResponse_Reason int32 |
| 195 | |
| 196 | const ( |
amit.ghosh | bd2022e | 2021-02-22 05:58:53 +0100 | [diff] [blame] | 197 | GetMetricResponse_UNDEFINED_REASON GetMetricResponse_Reason = 0 |
| 198 | GetMetricResponse_UNKNOWN_DEVICE GetMetricResponse_Reason = 1 |
| 199 | GetMetricResponse_UNKNOWN_COMPONENT GetMetricResponse_Reason = 2 |
| 200 | GetMetricResponse_INTERNAL_ERROR GetMetricResponse_Reason = 3 |
| 201 | GetMetricResponse_INVALID_METRIC GetMetricResponse_Reason = 4 |
| 202 | GetMetricResponse_DEVICE_UNREACHABLE GetMetricResponse_Reason = 5 |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 203 | ) |
| 204 | |
| 205 | var GetMetricResponse_Reason_name = map[int32]string{ |
| 206 | 0: "UNDEFINED_REASON", |
| 207 | 1: "UNKNOWN_DEVICE", |
| 208 | 2: "UNKNOWN_COMPONENT", |
| 209 | 3: "INTERNAL_ERROR", |
| 210 | 4: "INVALID_METRIC", |
amit.ghosh | bd2022e | 2021-02-22 05:58:53 +0100 | [diff] [blame] | 211 | 5: "DEVICE_UNREACHABLE", |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 212 | } |
| 213 | |
| 214 | var GetMetricResponse_Reason_value = map[string]int32{ |
amit.ghosh | bd2022e | 2021-02-22 05:58:53 +0100 | [diff] [blame] | 215 | "UNDEFINED_REASON": 0, |
| 216 | "UNKNOWN_DEVICE": 1, |
| 217 | "UNKNOWN_COMPONENT": 2, |
| 218 | "INTERNAL_ERROR": 3, |
| 219 | "INVALID_METRIC": 4, |
| 220 | "DEVICE_UNREACHABLE": 5, |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 221 | } |
| 222 | |
| 223 | func (x GetMetricResponse_Reason) String() string { |
| 224 | return proto.EnumName(GetMetricResponse_Reason_name, int32(x)) |
| 225 | } |
| 226 | |
| 227 | func (GetMetricResponse_Reason) EnumDescriptor() ([]byte, []int) { |
| 228 | return fileDescriptor_6b6c2f1384c11ff5, []int{8, 0} |
| 229 | } |
| 230 | |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 231 | type MetricConfig struct { |
| 232 | MetricId MetricNames `protobuf:"varint,1,opt,name=metric_id,json=metricId,proto3,enum=dmi.MetricNames" json:"metric_id,omitempty"` |
| 233 | // Whether the device manager is collecting and reporting this metric or not |
| 234 | IsConfigured bool `protobuf:"varint,2,opt,name=is_configured,json=isConfigured,proto3" json:"is_configured,omitempty"` |
| 235 | // Number of seconds between two consecutive polls of the particular metric |
| 236 | // Each device manager implemenation could have it's per metric default poll frequency which |
| 237 | // can be requested to be changed using this value |
| 238 | PollInterval uint32 `protobuf:"varint,3,opt,name=poll_interval,json=pollInterval,proto3" json:"poll_interval,omitempty"` |
| 239 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 240 | XXX_unrecognized []byte `json:"-"` |
| 241 | XXX_sizecache int32 `json:"-"` |
| 242 | } |
| 243 | |
| 244 | func (m *MetricConfig) Reset() { *m = MetricConfig{} } |
| 245 | func (m *MetricConfig) String() string { return proto.CompactTextString(m) } |
| 246 | func (*MetricConfig) ProtoMessage() {} |
| 247 | func (*MetricConfig) Descriptor() ([]byte, []int) { |
| 248 | return fileDescriptor_6b6c2f1384c11ff5, []int{0} |
| 249 | } |
| 250 | |
| 251 | func (m *MetricConfig) XXX_Unmarshal(b []byte) error { |
| 252 | return xxx_messageInfo_MetricConfig.Unmarshal(m, b) |
| 253 | } |
| 254 | func (m *MetricConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 255 | return xxx_messageInfo_MetricConfig.Marshal(b, m, deterministic) |
| 256 | } |
| 257 | func (m *MetricConfig) XXX_Merge(src proto.Message) { |
| 258 | xxx_messageInfo_MetricConfig.Merge(m, src) |
| 259 | } |
| 260 | func (m *MetricConfig) XXX_Size() int { |
| 261 | return xxx_messageInfo_MetricConfig.Size(m) |
| 262 | } |
| 263 | func (m *MetricConfig) XXX_DiscardUnknown() { |
| 264 | xxx_messageInfo_MetricConfig.DiscardUnknown(m) |
| 265 | } |
| 266 | |
| 267 | var xxx_messageInfo_MetricConfig proto.InternalMessageInfo |
| 268 | |
| 269 | func (m *MetricConfig) GetMetricId() MetricNames { |
| 270 | if m != nil { |
| 271 | return m.MetricId |
| 272 | } |
| 273 | return MetricNames_METRIC_NAME_UNDEFINED |
| 274 | } |
| 275 | |
| 276 | func (m *MetricConfig) GetIsConfigured() bool { |
| 277 | if m != nil { |
| 278 | return m.IsConfigured |
| 279 | } |
| 280 | return false |
| 281 | } |
| 282 | |
| 283 | func (m *MetricConfig) GetPollInterval() uint32 { |
| 284 | if m != nil { |
| 285 | return m.PollInterval |
| 286 | } |
| 287 | return 0 |
| 288 | } |
| 289 | |
| 290 | type MetricsConfig struct { |
| 291 | Metrics []*MetricConfig `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty"` |
| 292 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 293 | XXX_unrecognized []byte `json:"-"` |
| 294 | XXX_sizecache int32 `json:"-"` |
| 295 | } |
| 296 | |
| 297 | func (m *MetricsConfig) Reset() { *m = MetricsConfig{} } |
| 298 | func (m *MetricsConfig) String() string { return proto.CompactTextString(m) } |
| 299 | func (*MetricsConfig) ProtoMessage() {} |
| 300 | func (*MetricsConfig) Descriptor() ([]byte, []int) { |
| 301 | return fileDescriptor_6b6c2f1384c11ff5, []int{1} |
| 302 | } |
| 303 | |
| 304 | func (m *MetricsConfig) XXX_Unmarshal(b []byte) error { |
| 305 | return xxx_messageInfo_MetricsConfig.Unmarshal(m, b) |
| 306 | } |
| 307 | func (m *MetricsConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 308 | return xxx_messageInfo_MetricsConfig.Marshal(b, m, deterministic) |
| 309 | } |
| 310 | func (m *MetricsConfig) XXX_Merge(src proto.Message) { |
| 311 | xxx_messageInfo_MetricsConfig.Merge(m, src) |
| 312 | } |
| 313 | func (m *MetricsConfig) XXX_Size() int { |
| 314 | return xxx_messageInfo_MetricsConfig.Size(m) |
| 315 | } |
| 316 | func (m *MetricsConfig) XXX_DiscardUnknown() { |
| 317 | xxx_messageInfo_MetricsConfig.DiscardUnknown(m) |
| 318 | } |
| 319 | |
| 320 | var xxx_messageInfo_MetricsConfig proto.InternalMessageInfo |
| 321 | |
| 322 | func (m *MetricsConfig) GetMetrics() []*MetricConfig { |
| 323 | if m != nil { |
| 324 | return m.Metrics |
| 325 | } |
| 326 | return nil |
| 327 | } |
| 328 | |
| 329 | type ListMetricsResponse struct { |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 330 | Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=dmi.Status" json:"status,omitempty"` |
| 331 | Reason ListMetricsResponse_Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=dmi.ListMetricsResponse_Reason" json:"reason,omitempty"` |
| 332 | Metrics *MetricsConfig `protobuf:"bytes,3,opt,name=metrics,proto3" json:"metrics,omitempty"` |
amit.ghosh | 8ab1e6e | 2021-02-23 07:40:17 +0100 | [diff] [blame] | 333 | ReasonDetail string `protobuf:"bytes,4,opt,name=reason_detail,json=reasonDetail,proto3" json:"reason_detail,omitempty"` |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 334 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 335 | XXX_unrecognized []byte `json:"-"` |
| 336 | XXX_sizecache int32 `json:"-"` |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 337 | } |
| 338 | |
| 339 | func (m *ListMetricsResponse) Reset() { *m = ListMetricsResponse{} } |
| 340 | func (m *ListMetricsResponse) String() string { return proto.CompactTextString(m) } |
| 341 | func (*ListMetricsResponse) ProtoMessage() {} |
| 342 | func (*ListMetricsResponse) Descriptor() ([]byte, []int) { |
| 343 | return fileDescriptor_6b6c2f1384c11ff5, []int{2} |
| 344 | } |
| 345 | |
| 346 | func (m *ListMetricsResponse) XXX_Unmarshal(b []byte) error { |
| 347 | return xxx_messageInfo_ListMetricsResponse.Unmarshal(m, b) |
| 348 | } |
| 349 | func (m *ListMetricsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 350 | return xxx_messageInfo_ListMetricsResponse.Marshal(b, m, deterministic) |
| 351 | } |
| 352 | func (m *ListMetricsResponse) XXX_Merge(src proto.Message) { |
| 353 | xxx_messageInfo_ListMetricsResponse.Merge(m, src) |
| 354 | } |
| 355 | func (m *ListMetricsResponse) XXX_Size() int { |
| 356 | return xxx_messageInfo_ListMetricsResponse.Size(m) |
| 357 | } |
| 358 | func (m *ListMetricsResponse) XXX_DiscardUnknown() { |
| 359 | xxx_messageInfo_ListMetricsResponse.DiscardUnknown(m) |
| 360 | } |
| 361 | |
| 362 | var xxx_messageInfo_ListMetricsResponse proto.InternalMessageInfo |
| 363 | |
| 364 | func (m *ListMetricsResponse) GetStatus() Status { |
| 365 | if m != nil { |
| 366 | return m.Status |
| 367 | } |
| 368 | return Status_UNDEFINED_STATUS |
| 369 | } |
| 370 | |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 371 | func (m *ListMetricsResponse) GetReason() ListMetricsResponse_Reason { |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 372 | if m != nil { |
| 373 | return m.Reason |
| 374 | } |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 375 | return ListMetricsResponse_UNDEFINED_REASON |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 376 | } |
| 377 | |
| 378 | func (m *ListMetricsResponse) GetMetrics() *MetricsConfig { |
| 379 | if m != nil { |
| 380 | return m.Metrics |
| 381 | } |
| 382 | return nil |
| 383 | } |
| 384 | |
amit.ghosh | 8ab1e6e | 2021-02-23 07:40:17 +0100 | [diff] [blame] | 385 | func (m *ListMetricsResponse) GetReasonDetail() string { |
| 386 | if m != nil { |
| 387 | return m.ReasonDetail |
| 388 | } |
| 389 | return "" |
| 390 | } |
| 391 | |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 392 | type MetricsConfigurationRequest struct { |
| 393 | DeviceUuid *Uuid `protobuf:"bytes,1,opt,name=device_uuid,json=deviceUuid,proto3" json:"device_uuid,omitempty"` |
| 394 | // Types that are valid to be assigned to Operation: |
| 395 | // *MetricsConfigurationRequest_Changes |
| 396 | // *MetricsConfigurationRequest_ResetToDefault |
| 397 | Operation isMetricsConfigurationRequest_Operation `protobuf_oneof:"operation"` |
| 398 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 399 | XXX_unrecognized []byte `json:"-"` |
| 400 | XXX_sizecache int32 `json:"-"` |
| 401 | } |
| 402 | |
| 403 | func (m *MetricsConfigurationRequest) Reset() { *m = MetricsConfigurationRequest{} } |
| 404 | func (m *MetricsConfigurationRequest) String() string { return proto.CompactTextString(m) } |
| 405 | func (*MetricsConfigurationRequest) ProtoMessage() {} |
| 406 | func (*MetricsConfigurationRequest) Descriptor() ([]byte, []int) { |
| 407 | return fileDescriptor_6b6c2f1384c11ff5, []int{3} |
| 408 | } |
| 409 | |
| 410 | func (m *MetricsConfigurationRequest) XXX_Unmarshal(b []byte) error { |
| 411 | return xxx_messageInfo_MetricsConfigurationRequest.Unmarshal(m, b) |
| 412 | } |
| 413 | func (m *MetricsConfigurationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 414 | return xxx_messageInfo_MetricsConfigurationRequest.Marshal(b, m, deterministic) |
| 415 | } |
| 416 | func (m *MetricsConfigurationRequest) XXX_Merge(src proto.Message) { |
| 417 | xxx_messageInfo_MetricsConfigurationRequest.Merge(m, src) |
| 418 | } |
| 419 | func (m *MetricsConfigurationRequest) XXX_Size() int { |
| 420 | return xxx_messageInfo_MetricsConfigurationRequest.Size(m) |
| 421 | } |
| 422 | func (m *MetricsConfigurationRequest) XXX_DiscardUnknown() { |
| 423 | xxx_messageInfo_MetricsConfigurationRequest.DiscardUnknown(m) |
| 424 | } |
| 425 | |
| 426 | var xxx_messageInfo_MetricsConfigurationRequest proto.InternalMessageInfo |
| 427 | |
| 428 | func (m *MetricsConfigurationRequest) GetDeviceUuid() *Uuid { |
| 429 | if m != nil { |
| 430 | return m.DeviceUuid |
| 431 | } |
| 432 | return nil |
| 433 | } |
| 434 | |
| 435 | type isMetricsConfigurationRequest_Operation interface { |
| 436 | isMetricsConfigurationRequest_Operation() |
| 437 | } |
| 438 | |
| 439 | type MetricsConfigurationRequest_Changes struct { |
| 440 | Changes *MetricsConfig `protobuf:"bytes,2,opt,name=changes,proto3,oneof"` |
| 441 | } |
| 442 | |
| 443 | type MetricsConfigurationRequest_ResetToDefault struct { |
| 444 | ResetToDefault bool `protobuf:"varint,3,opt,name=reset_to_default,json=resetToDefault,proto3,oneof"` |
| 445 | } |
| 446 | |
| 447 | func (*MetricsConfigurationRequest_Changes) isMetricsConfigurationRequest_Operation() {} |
| 448 | |
| 449 | func (*MetricsConfigurationRequest_ResetToDefault) isMetricsConfigurationRequest_Operation() {} |
| 450 | |
| 451 | func (m *MetricsConfigurationRequest) GetOperation() isMetricsConfigurationRequest_Operation { |
| 452 | if m != nil { |
| 453 | return m.Operation |
| 454 | } |
| 455 | return nil |
| 456 | } |
| 457 | |
| 458 | func (m *MetricsConfigurationRequest) GetChanges() *MetricsConfig { |
| 459 | if x, ok := m.GetOperation().(*MetricsConfigurationRequest_Changes); ok { |
| 460 | return x.Changes |
| 461 | } |
| 462 | return nil |
| 463 | } |
| 464 | |
| 465 | func (m *MetricsConfigurationRequest) GetResetToDefault() bool { |
| 466 | if x, ok := m.GetOperation().(*MetricsConfigurationRequest_ResetToDefault); ok { |
| 467 | return x.ResetToDefault |
| 468 | } |
| 469 | return false |
| 470 | } |
| 471 | |
| 472 | // XXX_OneofWrappers is for the internal use of the proto package. |
| 473 | func (*MetricsConfigurationRequest) XXX_OneofWrappers() []interface{} { |
| 474 | return []interface{}{ |
| 475 | (*MetricsConfigurationRequest_Changes)(nil), |
| 476 | (*MetricsConfigurationRequest_ResetToDefault)(nil), |
| 477 | } |
| 478 | } |
| 479 | |
| 480 | type MetricsConfigurationResponse struct { |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 481 | Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=dmi.Status" json:"status,omitempty"` |
| 482 | Reason MetricsConfigurationResponse_Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=dmi.MetricsConfigurationResponse_Reason" json:"reason,omitempty"` |
amit.ghosh | 8ab1e6e | 2021-02-23 07:40:17 +0100 | [diff] [blame] | 483 | ReasonDetail string `protobuf:"bytes,3,opt,name=reason_detail,json=reasonDetail,proto3" json:"reason_detail,omitempty"` |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 484 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 485 | XXX_unrecognized []byte `json:"-"` |
| 486 | XXX_sizecache int32 `json:"-"` |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 487 | } |
| 488 | |
| 489 | func (m *MetricsConfigurationResponse) Reset() { *m = MetricsConfigurationResponse{} } |
| 490 | func (m *MetricsConfigurationResponse) String() string { return proto.CompactTextString(m) } |
| 491 | func (*MetricsConfigurationResponse) ProtoMessage() {} |
| 492 | func (*MetricsConfigurationResponse) Descriptor() ([]byte, []int) { |
| 493 | return fileDescriptor_6b6c2f1384c11ff5, []int{4} |
| 494 | } |
| 495 | |
| 496 | func (m *MetricsConfigurationResponse) XXX_Unmarshal(b []byte) error { |
| 497 | return xxx_messageInfo_MetricsConfigurationResponse.Unmarshal(m, b) |
| 498 | } |
| 499 | func (m *MetricsConfigurationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 500 | return xxx_messageInfo_MetricsConfigurationResponse.Marshal(b, m, deterministic) |
| 501 | } |
| 502 | func (m *MetricsConfigurationResponse) XXX_Merge(src proto.Message) { |
| 503 | xxx_messageInfo_MetricsConfigurationResponse.Merge(m, src) |
| 504 | } |
| 505 | func (m *MetricsConfigurationResponse) XXX_Size() int { |
| 506 | return xxx_messageInfo_MetricsConfigurationResponse.Size(m) |
| 507 | } |
| 508 | func (m *MetricsConfigurationResponse) XXX_DiscardUnknown() { |
| 509 | xxx_messageInfo_MetricsConfigurationResponse.DiscardUnknown(m) |
| 510 | } |
| 511 | |
| 512 | var xxx_messageInfo_MetricsConfigurationResponse proto.InternalMessageInfo |
| 513 | |
| 514 | func (m *MetricsConfigurationResponse) GetStatus() Status { |
| 515 | if m != nil { |
| 516 | return m.Status |
| 517 | } |
| 518 | return Status_UNDEFINED_STATUS |
| 519 | } |
| 520 | |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 521 | func (m *MetricsConfigurationResponse) GetReason() MetricsConfigurationResponse_Reason { |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 522 | if m != nil { |
| 523 | return m.Reason |
| 524 | } |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 525 | return MetricsConfigurationResponse_UNDEFINED_REASON |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 526 | } |
| 527 | |
amit.ghosh | 8ab1e6e | 2021-02-23 07:40:17 +0100 | [diff] [blame] | 528 | func (m *MetricsConfigurationResponse) GetReasonDetail() string { |
| 529 | if m != nil { |
| 530 | return m.ReasonDetail |
| 531 | } |
| 532 | return "" |
| 533 | } |
| 534 | |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 535 | type MetricMetaData struct { |
| 536 | DeviceUuid *Uuid `protobuf:"bytes,1,opt,name=device_uuid,json=deviceUuid,proto3" json:"device_uuid,omitempty"` |
| 537 | // uuid of the component |
| 538 | ComponentUuid *Uuid `protobuf:"bytes,2,opt,name=component_uuid,json=componentUuid,proto3" json:"component_uuid,omitempty"` |
| 539 | ComponentName string `protobuf:"bytes,3,opt,name=component_name,json=componentName,proto3" json:"component_name,omitempty"` |
| 540 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 541 | XXX_unrecognized []byte `json:"-"` |
| 542 | XXX_sizecache int32 `json:"-"` |
| 543 | } |
| 544 | |
| 545 | func (m *MetricMetaData) Reset() { *m = MetricMetaData{} } |
| 546 | func (m *MetricMetaData) String() string { return proto.CompactTextString(m) } |
| 547 | func (*MetricMetaData) ProtoMessage() {} |
| 548 | func (*MetricMetaData) Descriptor() ([]byte, []int) { |
| 549 | return fileDescriptor_6b6c2f1384c11ff5, []int{5} |
| 550 | } |
| 551 | |
| 552 | func (m *MetricMetaData) XXX_Unmarshal(b []byte) error { |
| 553 | return xxx_messageInfo_MetricMetaData.Unmarshal(m, b) |
| 554 | } |
| 555 | func (m *MetricMetaData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 556 | return xxx_messageInfo_MetricMetaData.Marshal(b, m, deterministic) |
| 557 | } |
| 558 | func (m *MetricMetaData) XXX_Merge(src proto.Message) { |
| 559 | xxx_messageInfo_MetricMetaData.Merge(m, src) |
| 560 | } |
| 561 | func (m *MetricMetaData) XXX_Size() int { |
| 562 | return xxx_messageInfo_MetricMetaData.Size(m) |
| 563 | } |
| 564 | func (m *MetricMetaData) XXX_DiscardUnknown() { |
| 565 | xxx_messageInfo_MetricMetaData.DiscardUnknown(m) |
| 566 | } |
| 567 | |
| 568 | var xxx_messageInfo_MetricMetaData proto.InternalMessageInfo |
| 569 | |
| 570 | func (m *MetricMetaData) GetDeviceUuid() *Uuid { |
| 571 | if m != nil { |
| 572 | return m.DeviceUuid |
| 573 | } |
| 574 | return nil |
| 575 | } |
| 576 | |
| 577 | func (m *MetricMetaData) GetComponentUuid() *Uuid { |
| 578 | if m != nil { |
| 579 | return m.ComponentUuid |
| 580 | } |
| 581 | return nil |
| 582 | } |
| 583 | |
| 584 | func (m *MetricMetaData) GetComponentName() string { |
| 585 | if m != nil { |
| 586 | return m.ComponentName |
| 587 | } |
| 588 | return "" |
| 589 | } |
| 590 | |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 591 | // The Metrics are conveyed to external systems either by submitting them on a message bus or using gRPC server streaming. |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 592 | // The topic to which are Metrics are submitted would be configured as startup |
| 593 | // configuration of the components |
| 594 | type Metric struct { |
| 595 | MetricId MetricNames `protobuf:"varint,1,opt,name=metric_id,json=metricId,proto3,enum=dmi.MetricNames" json:"metric_id,omitempty"` |
| 596 | MetricMetadata *MetricMetaData `protobuf:"bytes,2,opt,name=metric_metadata,json=metricMetadata,proto3" json:"metric_metadata,omitempty"` |
| 597 | Value *ComponentSensorData `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` |
| 598 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 599 | XXX_unrecognized []byte `json:"-"` |
| 600 | XXX_sizecache int32 `json:"-"` |
| 601 | } |
| 602 | |
| 603 | func (m *Metric) Reset() { *m = Metric{} } |
| 604 | func (m *Metric) String() string { return proto.CompactTextString(m) } |
| 605 | func (*Metric) ProtoMessage() {} |
| 606 | func (*Metric) Descriptor() ([]byte, []int) { |
| 607 | return fileDescriptor_6b6c2f1384c11ff5, []int{6} |
| 608 | } |
| 609 | |
| 610 | func (m *Metric) XXX_Unmarshal(b []byte) error { |
| 611 | return xxx_messageInfo_Metric.Unmarshal(m, b) |
| 612 | } |
| 613 | func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 614 | return xxx_messageInfo_Metric.Marshal(b, m, deterministic) |
| 615 | } |
| 616 | func (m *Metric) XXX_Merge(src proto.Message) { |
| 617 | xxx_messageInfo_Metric.Merge(m, src) |
| 618 | } |
| 619 | func (m *Metric) XXX_Size() int { |
| 620 | return xxx_messageInfo_Metric.Size(m) |
| 621 | } |
| 622 | func (m *Metric) XXX_DiscardUnknown() { |
| 623 | xxx_messageInfo_Metric.DiscardUnknown(m) |
| 624 | } |
| 625 | |
| 626 | var xxx_messageInfo_Metric proto.InternalMessageInfo |
| 627 | |
| 628 | func (m *Metric) GetMetricId() MetricNames { |
| 629 | if m != nil { |
| 630 | return m.MetricId |
| 631 | } |
| 632 | return MetricNames_METRIC_NAME_UNDEFINED |
| 633 | } |
| 634 | |
| 635 | func (m *Metric) GetMetricMetadata() *MetricMetaData { |
| 636 | if m != nil { |
| 637 | return m.MetricMetadata |
| 638 | } |
| 639 | return nil |
| 640 | } |
| 641 | |
| 642 | func (m *Metric) GetValue() *ComponentSensorData { |
| 643 | if m != nil { |
| 644 | return m.Value |
| 645 | } |
| 646 | return nil |
| 647 | } |
| 648 | |
| 649 | type GetMetricRequest struct { |
| 650 | MetaData *MetricMetaData `protobuf:"bytes,1,opt,name=meta_data,json=metaData,proto3" json:"meta_data,omitempty"` |
| 651 | MetricId MetricNames `protobuf:"varint,2,opt,name=metric_id,json=metricId,proto3,enum=dmi.MetricNames" json:"metric_id,omitempty"` |
| 652 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 653 | XXX_unrecognized []byte `json:"-"` |
| 654 | XXX_sizecache int32 `json:"-"` |
| 655 | } |
| 656 | |
| 657 | func (m *GetMetricRequest) Reset() { *m = GetMetricRequest{} } |
| 658 | func (m *GetMetricRequest) String() string { return proto.CompactTextString(m) } |
| 659 | func (*GetMetricRequest) ProtoMessage() {} |
| 660 | func (*GetMetricRequest) Descriptor() ([]byte, []int) { |
| 661 | return fileDescriptor_6b6c2f1384c11ff5, []int{7} |
| 662 | } |
| 663 | |
| 664 | func (m *GetMetricRequest) XXX_Unmarshal(b []byte) error { |
| 665 | return xxx_messageInfo_GetMetricRequest.Unmarshal(m, b) |
| 666 | } |
| 667 | func (m *GetMetricRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 668 | return xxx_messageInfo_GetMetricRequest.Marshal(b, m, deterministic) |
| 669 | } |
| 670 | func (m *GetMetricRequest) XXX_Merge(src proto.Message) { |
| 671 | xxx_messageInfo_GetMetricRequest.Merge(m, src) |
| 672 | } |
| 673 | func (m *GetMetricRequest) XXX_Size() int { |
| 674 | return xxx_messageInfo_GetMetricRequest.Size(m) |
| 675 | } |
| 676 | func (m *GetMetricRequest) XXX_DiscardUnknown() { |
| 677 | xxx_messageInfo_GetMetricRequest.DiscardUnknown(m) |
| 678 | } |
| 679 | |
| 680 | var xxx_messageInfo_GetMetricRequest proto.InternalMessageInfo |
| 681 | |
| 682 | func (m *GetMetricRequest) GetMetaData() *MetricMetaData { |
| 683 | if m != nil { |
| 684 | return m.MetaData |
| 685 | } |
| 686 | return nil |
| 687 | } |
| 688 | |
| 689 | func (m *GetMetricRequest) GetMetricId() MetricNames { |
| 690 | if m != nil { |
| 691 | return m.MetricId |
| 692 | } |
| 693 | return MetricNames_METRIC_NAME_UNDEFINED |
| 694 | } |
| 695 | |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 696 | type GetMetricResponse struct { |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 697 | Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=dmi.Status" json:"status,omitempty"` |
| 698 | Reason GetMetricResponse_Reason `protobuf:"varint,2,opt,name=reason,proto3,enum=dmi.GetMetricResponse_Reason" json:"reason,omitempty"` |
| 699 | Metric *Metric `protobuf:"bytes,3,opt,name=metric,proto3" json:"metric,omitempty"` |
amit.ghosh | 8ab1e6e | 2021-02-23 07:40:17 +0100 | [diff] [blame] | 700 | ReasonDetail string `protobuf:"bytes,4,opt,name=reason_detail,json=reasonDetail,proto3" json:"reason_detail,omitempty"` |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 701 | XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| 702 | XXX_unrecognized []byte `json:"-"` |
| 703 | XXX_sizecache int32 `json:"-"` |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 704 | } |
| 705 | |
| 706 | func (m *GetMetricResponse) Reset() { *m = GetMetricResponse{} } |
| 707 | func (m *GetMetricResponse) String() string { return proto.CompactTextString(m) } |
| 708 | func (*GetMetricResponse) ProtoMessage() {} |
| 709 | func (*GetMetricResponse) Descriptor() ([]byte, []int) { |
| 710 | return fileDescriptor_6b6c2f1384c11ff5, []int{8} |
| 711 | } |
| 712 | |
| 713 | func (m *GetMetricResponse) XXX_Unmarshal(b []byte) error { |
| 714 | return xxx_messageInfo_GetMetricResponse.Unmarshal(m, b) |
| 715 | } |
| 716 | func (m *GetMetricResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 717 | return xxx_messageInfo_GetMetricResponse.Marshal(b, m, deterministic) |
| 718 | } |
| 719 | func (m *GetMetricResponse) XXX_Merge(src proto.Message) { |
| 720 | xxx_messageInfo_GetMetricResponse.Merge(m, src) |
| 721 | } |
| 722 | func (m *GetMetricResponse) XXX_Size() int { |
| 723 | return xxx_messageInfo_GetMetricResponse.Size(m) |
| 724 | } |
| 725 | func (m *GetMetricResponse) XXX_DiscardUnknown() { |
| 726 | xxx_messageInfo_GetMetricResponse.DiscardUnknown(m) |
| 727 | } |
| 728 | |
| 729 | var xxx_messageInfo_GetMetricResponse proto.InternalMessageInfo |
| 730 | |
| 731 | func (m *GetMetricResponse) GetStatus() Status { |
| 732 | if m != nil { |
| 733 | return m.Status |
| 734 | } |
| 735 | return Status_UNDEFINED_STATUS |
| 736 | } |
| 737 | |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 738 | func (m *GetMetricResponse) GetReason() GetMetricResponse_Reason { |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 739 | if m != nil { |
| 740 | return m.Reason |
| 741 | } |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 742 | return GetMetricResponse_UNDEFINED_REASON |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 743 | } |
| 744 | |
| 745 | func (m *GetMetricResponse) GetMetric() *Metric { |
| 746 | if m != nil { |
| 747 | return m.Metric |
| 748 | } |
| 749 | return nil |
| 750 | } |
| 751 | |
amit.ghosh | 8ab1e6e | 2021-02-23 07:40:17 +0100 | [diff] [blame] | 752 | func (m *GetMetricResponse) GetReasonDetail() string { |
| 753 | if m != nil { |
| 754 | return m.ReasonDetail |
| 755 | } |
| 756 | return "" |
| 757 | } |
| 758 | |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 759 | func init() { |
| 760 | proto.RegisterEnum("dmi.MetricNames", MetricNames_name, MetricNames_value) |
amit.ghosh | ae47303 | 2021-01-10 11:59:10 +0100 | [diff] [blame] | 761 | proto.RegisterEnum("dmi.ListMetricsResponse_Reason", ListMetricsResponse_Reason_name, ListMetricsResponse_Reason_value) |
| 762 | proto.RegisterEnum("dmi.MetricsConfigurationResponse_Reason", MetricsConfigurationResponse_Reason_name, MetricsConfigurationResponse_Reason_value) |
| 763 | proto.RegisterEnum("dmi.GetMetricResponse_Reason", GetMetricResponse_Reason_name, GetMetricResponse_Reason_value) |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 764 | proto.RegisterType((*MetricConfig)(nil), "dmi.MetricConfig") |
| 765 | proto.RegisterType((*MetricsConfig)(nil), "dmi.MetricsConfig") |
| 766 | proto.RegisterType((*ListMetricsResponse)(nil), "dmi.ListMetricsResponse") |
| 767 | proto.RegisterType((*MetricsConfigurationRequest)(nil), "dmi.MetricsConfigurationRequest") |
| 768 | proto.RegisterType((*MetricsConfigurationResponse)(nil), "dmi.MetricsConfigurationResponse") |
| 769 | proto.RegisterType((*MetricMetaData)(nil), "dmi.MetricMetaData") |
| 770 | proto.RegisterType((*Metric)(nil), "dmi.Metric") |
| 771 | proto.RegisterType((*GetMetricRequest)(nil), "dmi.GetMetricRequest") |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 772 | proto.RegisterType((*GetMetricResponse)(nil), "dmi.GetMetricResponse") |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 773 | } |
| 774 | |
| 775 | func init() { proto.RegisterFile("dmi/hw_metrics_mgmt_service.proto", fileDescriptor_6b6c2f1384c11ff5) } |
| 776 | |
| 777 | var fileDescriptor_6b6c2f1384c11ff5 = []byte{ |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 778 | // 1242 bytes of a gzipped FileDescriptorProto |
amit.ghosh | 8ab1e6e | 2021-02-23 07:40:17 +0100 | [diff] [blame] | 779 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4d, 0x6f, 0xdb, 0x46, |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 780 | 0x13, 0x36, 0xa9, 0xc4, 0x89, 0x57, 0xb6, 0x42, 0xaf, 0xf3, 0xa1, 0x28, 0xc9, 0x1b, 0x59, 0xc1, |
| 781 | 0x5b, 0x08, 0x69, 0x23, 0x05, 0x0e, 0xfa, 0x9d, 0x43, 0x69, 0x72, 0x63, 0x13, 0x91, 0x28, 0x61, |
| 782 | 0x45, 0xda, 0x49, 0x0f, 0x5d, 0x6c, 0xc4, 0xb5, 0x4c, 0x40, 0x24, 0x55, 0x92, 0x72, 0xd0, 0x5f, |
| 783 | 0x50, 0xf4, 0xd6, 0xb4, 0xe8, 0x4f, 0x68, 0x4f, 0xfd, 0x4a, 0x7f, 0x40, 0x6f, 0x05, 0xfa, 0x79, |
| 784 | 0x6f, 0xff, 0x47, 0xdb, 0x73, 0xc1, 0x5d, 0x4a, 0x59, 0xcb, 0x72, 0x53, 0x17, 0xbd, 0x49, 0xcf, |
| 785 | 0x3c, 0x33, 0xf3, 0xcc, 0xcc, 0x72, 0x76, 0xc1, 0xba, 0x17, 0xf8, 0xcd, 0xfd, 0xc7, 0x24, 0x60, |
| 786 | 0x69, 0xec, 0xf7, 0x13, 0x12, 0x0c, 0x82, 0x94, 0x24, 0x2c, 0x3e, 0xf0, 0xfb, 0xac, 0x31, 0x8a, |
| 787 | 0xa3, 0x34, 0x82, 0x05, 0x2f, 0xf0, 0x2b, 0xab, 0x19, 0xaf, 0x1f, 0x05, 0x41, 0x14, 0x26, 0x02, |
| 788 | 0xaf, 0x2c, 0x0b, 0xd7, 0xfc, 0xdf, 0x95, 0x41, 0x14, 0x0d, 0x86, 0xac, 0xc9, 0xff, 0x3d, 0x1a, |
| 789 | 0xef, 0x35, 0x59, 0x30, 0x4a, 0xdf, 0x13, 0xc6, 0xda, 0xfb, 0x0a, 0x58, 0x6e, 0xf3, 0x0c, 0x46, |
| 790 | 0x14, 0xee, 0xf9, 0x03, 0x78, 0x0b, 0x2c, 0x89, 0x8c, 0xc4, 0xf7, 0xca, 0x4a, 0x55, 0xa9, 0x97, |
| 791 | 0x36, 0xb4, 0x86, 0x17, 0xf8, 0x0d, 0xc1, 0xb2, 0x69, 0xc0, 0x12, 0x7c, 0x56, 0x50, 0x2c, 0x0f, |
| 792 | 0xde, 0x00, 0x2b, 0x7e, 0x42, 0xfa, 0xdc, 0x77, 0x1c, 0x33, 0xaf, 0xac, 0x56, 0x95, 0xfa, 0x59, |
| 793 | 0xbc, 0xec, 0x27, 0xc6, 0x14, 0xcb, 0x48, 0xa3, 0x68, 0x38, 0x24, 0x7e, 0x98, 0xb2, 0xf8, 0x80, |
| 794 | 0x0e, 0xcb, 0x85, 0xaa, 0x52, 0x5f, 0xc1, 0xcb, 0x19, 0x68, 0xe5, 0x58, 0xed, 0x2e, 0x58, 0x11, |
| 795 | 0x29, 0x72, 0x4f, 0xf8, 0x22, 0x38, 0x93, 0xd7, 0x5e, 0x56, 0xaa, 0x85, 0x7a, 0x71, 0x63, 0x55, |
| 796 | 0xd2, 0x21, 0x38, 0x78, 0xc2, 0xa8, 0x7d, 0xa6, 0x82, 0xb5, 0x96, 0x9f, 0xa4, 0x79, 0x08, 0xcc, |
| 797 | 0x92, 0x51, 0x14, 0x26, 0x0c, 0xde, 0x00, 0x8b, 0x49, 0x4a, 0xd3, 0x71, 0x92, 0xd7, 0x52, 0xe4, |
| 798 | 0x31, 0x7a, 0x1c, 0xc2, 0xb9, 0x09, 0xbe, 0x0a, 0x16, 0x63, 0x46, 0x93, 0x28, 0xe4, 0xea, 0x4b, |
| 799 | 0x1b, 0xd7, 0x39, 0x69, 0x4e, 0xb8, 0x06, 0xe6, 0x34, 0x9c, 0xd3, 0xe1, 0x4b, 0xcf, 0x24, 0x66, |
| 800 | 0x25, 0x15, 0x37, 0xa0, 0x24, 0x31, 0x99, 0xd1, 0x98, 0xb5, 0x41, 0xf8, 0x11, 0x8f, 0xa5, 0xd4, |
| 801 | 0x1f, 0x96, 0x4f, 0x55, 0x95, 0xfa, 0x12, 0x5e, 0x16, 0xa0, 0xc9, 0xb1, 0xda, 0x3b, 0x60, 0x51, |
| 802 | 0x24, 0x81, 0xe7, 0x81, 0xe6, 0xda, 0x26, 0xba, 0x67, 0xd9, 0xc8, 0x24, 0x18, 0xe9, 0xbd, 0x8e, |
| 803 | 0xad, 0x2d, 0x40, 0x08, 0x4a, 0xae, 0x7d, 0xdf, 0xee, 0xec, 0xda, 0xc4, 0x44, 0x3b, 0x96, 0x81, |
| 804 | 0x34, 0x25, 0xc3, 0x2c, 0xdb, 0x41, 0xd8, 0xd6, 0x5b, 0x04, 0x61, 0xdc, 0xc1, 0x9a, 0x0a, 0x2f, |
| 805 | 0x02, 0x28, 0xec, 0xc4, 0xb5, 0x31, 0xd2, 0x8d, 0x6d, 0x7d, 0xb3, 0x85, 0xb4, 0x42, 0xed, 0x1b, |
| 806 | 0x05, 0x5c, 0x39, 0xa4, 0x6f, 0x1c, 0xd3, 0xd4, 0x8f, 0x42, 0xcc, 0xde, 0x1d, 0xb3, 0x24, 0x85, |
| 807 | 0x37, 0x41, 0xd1, 0x63, 0xd9, 0x19, 0x23, 0xe3, 0x71, 0x7e, 0x02, 0x8a, 0x1b, 0x4b, 0xbc, 0x2c, |
| 808 | 0x77, 0xec, 0x7b, 0x18, 0x08, 0x6b, 0xf6, 0x1b, 0x36, 0xc0, 0x99, 0xfe, 0x3e, 0x0d, 0x07, 0x2c, |
| 809 | 0xe1, 0x8d, 0x9b, 0x5b, 0xfe, 0xf6, 0x02, 0x9e, 0x90, 0xe0, 0x4d, 0xa0, 0xc5, 0x2c, 0x61, 0x29, |
| 810 | 0x49, 0x23, 0xe2, 0xb1, 0x3d, 0x3a, 0x1e, 0xa6, 0xbc, 0x6f, 0x67, 0xb7, 0x17, 0x70, 0x89, 0x5b, |
| 811 | 0x9c, 0xc8, 0x14, 0xf8, 0x66, 0x11, 0x2c, 0x45, 0x23, 0x26, 0xb4, 0xd5, 0xbe, 0x55, 0xc1, 0xd5, |
| 812 | 0xf9, 0xa2, 0x4f, 0x32, 0xe6, 0xb7, 0x66, 0xc6, 0x5c, 0x3f, 0xaa, 0x76, 0x26, 0xee, 0xec, 0xbc, |
| 813 | 0x8f, 0x4c, 0xb0, 0x30, 0x67, 0x82, 0x4f, 0x94, 0xff, 0x68, 0x84, 0xd7, 0xc0, 0xe5, 0x6e, 0xa7, |
| 814 | 0xd5, 0x22, 0xdc, 0xb0, 0xa3, 0xb7, 0x88, 0x6b, 0xf7, 0xdc, 0x6e, 0xb7, 0x83, 0x1d, 0x64, 0x6a, |
| 815 | 0x05, 0xe1, 0xb2, 0xa3, 0xb7, 0x2c, 0x93, 0xb4, 0x91, 0x83, 0x2d, 0x43, 0x3b, 0x75, 0xcc, 0xd4, |
| 816 | 0x4f, 0xd7, 0x3e, 0x51, 0x40, 0x49, 0x14, 0xda, 0x66, 0x29, 0x35, 0x69, 0x4a, 0x4f, 0x34, 0xe8, |
| 817 | 0xdb, 0xa0, 0xd4, 0x8f, 0x82, 0x51, 0x14, 0xb2, 0x30, 0x15, 0x74, 0x75, 0x96, 0xbe, 0x32, 0x25, |
| 818 | 0x70, 0x8f, 0xff, 0xcb, 0x1e, 0x21, 0x0d, 0x58, 0xde, 0xaa, 0x67, 0xb4, 0x6c, 0x93, 0xd4, 0x3e, |
| 819 | 0x55, 0xc0, 0xa2, 0xd0, 0x75, 0xd2, 0xc5, 0x73, 0x17, 0x9c, 0xcb, 0xe9, 0x01, 0x4b, 0xa9, 0x47, |
| 820 | 0x53, 0x9a, 0x6b, 0x5a, 0x93, 0x9c, 0x26, 0xc5, 0xe2, 0x52, 0x30, 0xfd, 0x9f, 0x51, 0x61, 0x03, |
| 821 | 0x9c, 0x3e, 0xa0, 0xc3, 0x31, 0xcb, 0x3f, 0xdb, 0x32, 0xf7, 0x31, 0x26, 0xd2, 0x7a, 0x2c, 0x4c, |
| 822 | 0xa2, 0x98, 0x3b, 0x0a, 0x5a, 0x2d, 0x01, 0xda, 0x16, 0xcb, 0xb7, 0xc1, 0xe4, 0x4b, 0xb9, 0xcd, |
| 823 | 0x05, 0x53, 0xc2, 0x73, 0x2b, 0xc7, 0xe7, 0xce, 0x34, 0x8b, 0x96, 0x1f, 0x2a, 0x51, 0x7d, 0x5e, |
| 824 | 0x89, 0xb5, 0xef, 0x54, 0xb0, 0x2a, 0x65, 0x3d, 0xc9, 0x51, 0x7f, 0x79, 0xe6, 0xa8, 0x5f, 0xe3, |
| 825 | 0xa4, 0x23, 0xc1, 0x8e, 0x9e, 0xef, 0x45, 0x91, 0x3d, 0xef, 0x4b, 0x51, 0x52, 0x87, 0x73, 0xd3, |
| 826 | 0x3f, 0x5b, 0x63, 0x1f, 0xfc, 0x9b, 0x8f, 0xe0, 0x02, 0x58, 0x9d, 0x60, 0x46, 0xa7, 0xdd, 0xed, |
| 827 | 0xd8, 0xc8, 0x76, 0x34, 0x75, 0xce, 0xb7, 0x71, 0xa2, 0xc3, 0x7f, 0xf3, 0xb7, 0xd3, 0xa0, 0x28, |
| 828 | 0x75, 0x18, 0x5e, 0x06, 0x17, 0x84, 0x0f, 0xb1, 0xf5, 0x76, 0x46, 0xce, 0xc5, 0x69, 0x0b, 0x99, |
| 829 | 0xd6, 0xdc, 0x74, 0x4f, 0xb7, 0x49, 0xaf, 0x8b, 0x90, 0xa9, 0x29, 0x70, 0x0d, 0x9c, 0xcb, 0x51, |
| 830 | 0xa3, 0xeb, 0x12, 0x07, 0xb5, 0xbb, 0x9a, 0x07, 0xaf, 0x83, 0x2b, 0x12, 0xe8, 0xf6, 0xf4, 0x2d, |
| 831 | 0x44, 0xba, 0x08, 0x1b, 0xc8, 0x76, 0xf4, 0x2d, 0xa4, 0x31, 0x78, 0x15, 0x5c, 0xca, 0x09, 0x0e, |
| 832 | 0xd6, 0xed, 0x9e, 0x81, 0xac, 0x1d, 0x84, 0x85, 0xf7, 0xf7, 0x0a, 0xbc, 0x0e, 0x2a, 0x73, 0xac, |
| 833 | 0x3b, 0x9d, 0x16, 0xf7, 0xfe, 0x41, 0x39, 0xc6, 0x7d, 0xd3, 0xd2, 0x7b, 0xda, 0x8f, 0x0a, 0xac, |
| 834 | 0x4e, 0xb3, 0xcb, 0x56, 0xfc, 0x80, 0x74, 0x3b, 0xbb, 0x08, 0x6b, 0x3f, 0x1d, 0xc7, 0x70, 0x26, |
| 835 | 0x8c, 0x9f, 0x15, 0x58, 0x03, 0xd7, 0xe6, 0x30, 0x76, 0xf5, 0x1d, 0xd4, 0x42, 0xf6, 0x96, 0xb3, |
| 836 | 0xad, 0xfd, 0x92, 0x8d, 0x64, 0xd2, 0x10, 0xd3, 0xea, 0xdd, 0x17, 0xea, 0x3f, 0x57, 0xe1, 0x65, |
| 837 | 0x70, 0x5e, 0x86, 0x0d, 0xbd, 0xab, 0x1b, 0x96, 0xf3, 0x50, 0xfb, 0x22, 0xbb, 0x78, 0x56, 0x65, |
| 838 | 0x13, 0x6f, 0x8c, 0xf6, 0xa5, 0x0a, 0xd7, 0xc1, 0xd5, 0x23, 0xb8, 0xdc, 0xb0, 0xaf, 0x54, 0xf8, |
| 839 | 0x02, 0x58, 0x97, 0x29, 0x18, 0xe9, 0x26, 0xd9, 0xc5, 0x96, 0x73, 0x88, 0xf7, 0xb5, 0x0a, 0xeb, |
| 840 | 0xe0, 0x86, 0xcc, 0xbb, 0xa7, 0xbb, 0x2d, 0xe7, 0x21, 0x31, 0x50, 0xab, 0xd5, 0x93, 0x99, 0x4f, |
| 841 | 0x55, 0x78, 0x7e, 0x3a, 0x39, 0xac, 0xb7, 0x85, 0xfa, 0x0f, 0x0b, 0xb0, 0x0c, 0xd6, 0x24, 0x74, |
| 842 | 0x2a, 0xfe, 0x49, 0x41, 0x2a, 0x37, 0xb3, 0x08, 0xed, 0x1f, 0x15, 0xa4, 0x5e, 0x4e, 0x61, 0x39, |
| 843 | 0xd1, 0xc7, 0xb2, 0x23, 0x6f, 0x2f, 0x69, 0xeb, 0x0f, 0xb4, 0xdf, 0x0b, 0xf0, 0x12, 0x80, 0x87, |
| 844 | 0x60, 0x11, 0xf1, 0x8f, 0x82, 0xd4, 0x7b, 0xc9, 0x20, 0xc7, 0xfc, 0x53, 0xe6, 0x58, 0xb6, 0x8d, |
| 845 | 0x30, 0xe9, 0xb9, 0x18, 0x77, 0x5c, 0xdb, 0xb4, 0xec, 0x2d, 0x51, 0xca, 0xaf, 0xa7, 0x36, 0x9e, |
| 846 | 0xaa, 0xe0, 0x7f, 0x36, 0x4d, 0xfd, 0x03, 0x96, 0xdf, 0x63, 0x6d, 0x1a, 0xd2, 0x01, 0x0b, 0xf8, |
| 847 | 0x16, 0xe3, 0x6f, 0x45, 0xf8, 0x1a, 0x28, 0x4a, 0x4f, 0x19, 0x78, 0x8e, 0x7f, 0xd3, 0xdb, 0x34, |
| 848 | 0xf6, 0x1e, 0xd3, 0x98, 0x59, 0x66, 0xa5, 0x7c, 0xdc, 0x6b, 0x07, 0x52, 0x50, 0x71, 0x47, 0x1e, |
| 849 | 0x4d, 0xd9, 0xbc, 0x3b, 0x12, 0x56, 0xff, 0xe6, 0xfa, 0xe4, 0x1b, 0xb2, 0xb2, 0xfe, 0xdc, 0x0b, |
| 850 | 0x16, 0xbe, 0x01, 0x96, 0xa6, 0x5b, 0x09, 0x5e, 0x98, 0xdd, 0x52, 0x22, 0xcc, 0xc5, 0xf9, 0xcb, |
| 851 | 0x0b, 0xbe, 0x02, 0x56, 0x7a, 0x69, 0xcc, 0x68, 0x30, 0x29, 0xed, 0x62, 0x43, 0x3c, 0x75, 0x1b, |
| 852 | 0x93, 0xa7, 0x6e, 0x03, 0x65, 0x4f, 0xdd, 0x8a, 0xbc, 0xc6, 0x6e, 0x2b, 0x9b, 0x6f, 0xbe, 0xfd, |
| 853 | 0xfa, 0xc0, 0x4f, 0xf7, 0xc7, 0x8f, 0x1a, 0xfd, 0x28, 0x68, 0x46, 0x23, 0x16, 0xf6, 0xa3, 0xd8, |
| 854 | 0x6b, 0x8a, 0xfb, 0xee, 0x56, 0x30, 0x6d, 0xe0, 0x2d, 0xfe, 0x5e, 0xdd, 0xa3, 0x7d, 0xd6, 0x3c, |
| 855 | 0xb8, 0xd3, 0x1c, 0x44, 0x4d, 0x2f, 0xf0, 0x1f, 0x2d, 0xf2, 0xd8, 0x77, 0xfe, 0x0a, 0x00, 0x00, |
| 856 | 0xff, 0xff, 0x04, 0xda, 0xd9, 0x9e, 0x9f, 0x0b, 0x00, 0x00, |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 857 | } |
| 858 | |
| 859 | // Reference imports to suppress errors if they are not otherwise used. |
| 860 | var _ context.Context |
| 861 | var _ grpc.ClientConn |
| 862 | |
| 863 | // This is a compile-time assertion to ensure that this generated file |
| 864 | // is compatible with the grpc package it is being compiled against. |
| 865 | const _ = grpc.SupportPackageIsVersion4 |
| 866 | |
| 867 | // NativeMetricsManagementServiceClient is the client API for NativeMetricsManagementService service. |
| 868 | // |
| 869 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. |
| 870 | type NativeMetricsManagementServiceClient interface { |
| 871 | // List the supported metrics for the passed device. |
| 872 | // This would be the first call that you make to know about the metrics that a particular device supports and |
| 873 | // then use the UpdateMetricsConfiguration API to monitor only the required metrics. |
| 874 | ListMetrics(ctx context.Context, in *HardwareID, opts ...grpc.CallOption) (*ListMetricsResponse, error) |
| 875 | // Updates the configuration of the list of metrics in the request |
| 876 | // Acts upon single metric configuration, collection of a single metric can be started/stopped |
| 877 | // by changing its configuration. |
| 878 | // |
| 879 | // This configuration is persisted across restart of the device or the device manager |
| 880 | UpdateMetricsConfiguration(ctx context.Context, in *MetricsConfigurationRequest, opts ...grpc.CallOption) (*MetricsConfigurationResponse, error) |
| 881 | // Get the instantenous value of a metric |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 882 | GetMetric(ctx context.Context, in *GetMetricRequest, opts ...grpc.CallOption) (*GetMetricResponse, error) |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 883 | // Initiate the server streaming of the metrics |
| 884 | StreamMetrics(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (NativeMetricsManagementService_StreamMetricsClient, error) |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 885 | } |
| 886 | |
| 887 | type nativeMetricsManagementServiceClient struct { |
| 888 | cc *grpc.ClientConn |
| 889 | } |
| 890 | |
| 891 | func NewNativeMetricsManagementServiceClient(cc *grpc.ClientConn) NativeMetricsManagementServiceClient { |
| 892 | return &nativeMetricsManagementServiceClient{cc} |
| 893 | } |
| 894 | |
| 895 | func (c *nativeMetricsManagementServiceClient) ListMetrics(ctx context.Context, in *HardwareID, opts ...grpc.CallOption) (*ListMetricsResponse, error) { |
| 896 | out := new(ListMetricsResponse) |
| 897 | err := c.cc.Invoke(ctx, "/dmi.NativeMetricsManagementService/ListMetrics", in, out, opts...) |
| 898 | if err != nil { |
| 899 | return nil, err |
| 900 | } |
| 901 | return out, nil |
| 902 | } |
| 903 | |
| 904 | func (c *nativeMetricsManagementServiceClient) UpdateMetricsConfiguration(ctx context.Context, in *MetricsConfigurationRequest, opts ...grpc.CallOption) (*MetricsConfigurationResponse, error) { |
| 905 | out := new(MetricsConfigurationResponse) |
| 906 | err := c.cc.Invoke(ctx, "/dmi.NativeMetricsManagementService/UpdateMetricsConfiguration", in, out, opts...) |
| 907 | if err != nil { |
| 908 | return nil, err |
| 909 | } |
| 910 | return out, nil |
| 911 | } |
| 912 | |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 913 | func (c *nativeMetricsManagementServiceClient) GetMetric(ctx context.Context, in *GetMetricRequest, opts ...grpc.CallOption) (*GetMetricResponse, error) { |
| 914 | out := new(GetMetricResponse) |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 915 | err := c.cc.Invoke(ctx, "/dmi.NativeMetricsManagementService/GetMetric", in, out, opts...) |
| 916 | if err != nil { |
| 917 | return nil, err |
| 918 | } |
| 919 | return out, nil |
| 920 | } |
| 921 | |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 922 | func (c *nativeMetricsManagementServiceClient) StreamMetrics(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (NativeMetricsManagementService_StreamMetricsClient, error) { |
| 923 | stream, err := c.cc.NewStream(ctx, &_NativeMetricsManagementService_serviceDesc.Streams[0], "/dmi.NativeMetricsManagementService/StreamMetrics", opts...) |
| 924 | if err != nil { |
| 925 | return nil, err |
| 926 | } |
| 927 | x := &nativeMetricsManagementServiceStreamMetricsClient{stream} |
| 928 | if err := x.ClientStream.SendMsg(in); err != nil { |
| 929 | return nil, err |
| 930 | } |
| 931 | if err := x.ClientStream.CloseSend(); err != nil { |
| 932 | return nil, err |
| 933 | } |
| 934 | return x, nil |
| 935 | } |
| 936 | |
| 937 | type NativeMetricsManagementService_StreamMetricsClient interface { |
| 938 | Recv() (*Metric, error) |
| 939 | grpc.ClientStream |
| 940 | } |
| 941 | |
| 942 | type nativeMetricsManagementServiceStreamMetricsClient struct { |
| 943 | grpc.ClientStream |
| 944 | } |
| 945 | |
| 946 | func (x *nativeMetricsManagementServiceStreamMetricsClient) Recv() (*Metric, error) { |
| 947 | m := new(Metric) |
| 948 | if err := x.ClientStream.RecvMsg(m); err != nil { |
| 949 | return nil, err |
| 950 | } |
| 951 | return m, nil |
| 952 | } |
| 953 | |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 954 | // NativeMetricsManagementServiceServer is the server API for NativeMetricsManagementService service. |
| 955 | type NativeMetricsManagementServiceServer interface { |
| 956 | // List the supported metrics for the passed device. |
| 957 | // This would be the first call that you make to know about the metrics that a particular device supports and |
| 958 | // then use the UpdateMetricsConfiguration API to monitor only the required metrics. |
| 959 | ListMetrics(context.Context, *HardwareID) (*ListMetricsResponse, error) |
| 960 | // Updates the configuration of the list of metrics in the request |
| 961 | // Acts upon single metric configuration, collection of a single metric can be started/stopped |
| 962 | // by changing its configuration. |
| 963 | // |
| 964 | // This configuration is persisted across restart of the device or the device manager |
| 965 | UpdateMetricsConfiguration(context.Context, *MetricsConfigurationRequest) (*MetricsConfigurationResponse, error) |
| 966 | // Get the instantenous value of a metric |
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 967 | GetMetric(context.Context, *GetMetricRequest) (*GetMetricResponse, error) |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 968 | // Initiate the server streaming of the metrics |
| 969 | StreamMetrics(*empty.Empty, NativeMetricsManagementService_StreamMetricsServer) error |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 970 | } |
| 971 | |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 972 | // UnimplementedNativeMetricsManagementServiceServer can be embedded to have forward compatible implementations. |
| 973 | type UnimplementedNativeMetricsManagementServiceServer struct { |
| 974 | } |
| 975 | |
| 976 | func (*UnimplementedNativeMetricsManagementServiceServer) ListMetrics(ctx context.Context, req *HardwareID) (*ListMetricsResponse, error) { |
| 977 | return nil, status.Errorf(codes.Unimplemented, "method ListMetrics not implemented") |
| 978 | } |
| 979 | func (*UnimplementedNativeMetricsManagementServiceServer) UpdateMetricsConfiguration(ctx context.Context, req *MetricsConfigurationRequest) (*MetricsConfigurationResponse, error) { |
| 980 | return nil, status.Errorf(codes.Unimplemented, "method UpdateMetricsConfiguration not implemented") |
| 981 | } |
| 982 | func (*UnimplementedNativeMetricsManagementServiceServer) GetMetric(ctx context.Context, req *GetMetricRequest) (*GetMetricResponse, error) { |
| 983 | return nil, status.Errorf(codes.Unimplemented, "method GetMetric not implemented") |
| 984 | } |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 985 | func (*UnimplementedNativeMetricsManagementServiceServer) StreamMetrics(req *empty.Empty, srv NativeMetricsManagementService_StreamMetricsServer) error { |
| 986 | return status.Errorf(codes.Unimplemented, "method StreamMetrics not implemented") |
| 987 | } |
Andrea Campanella | c795b7d | 2021-04-14 13:24:44 +0200 | [diff] [blame] | 988 | |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 989 | func RegisterNativeMetricsManagementServiceServer(s *grpc.Server, srv NativeMetricsManagementServiceServer) { |
| 990 | s.RegisterService(&_NativeMetricsManagementService_serviceDesc, srv) |
| 991 | } |
| 992 | |
| 993 | func _NativeMetricsManagementService_ListMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 994 | in := new(HardwareID) |
| 995 | if err := dec(in); err != nil { |
| 996 | return nil, err |
| 997 | } |
| 998 | if interceptor == nil { |
| 999 | return srv.(NativeMetricsManagementServiceServer).ListMetrics(ctx, in) |
| 1000 | } |
| 1001 | info := &grpc.UnaryServerInfo{ |
| 1002 | Server: srv, |
| 1003 | FullMethod: "/dmi.NativeMetricsManagementService/ListMetrics", |
| 1004 | } |
| 1005 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 1006 | return srv.(NativeMetricsManagementServiceServer).ListMetrics(ctx, req.(*HardwareID)) |
| 1007 | } |
| 1008 | return interceptor(ctx, in, info, handler) |
| 1009 | } |
| 1010 | |
| 1011 | func _NativeMetricsManagementService_UpdateMetricsConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 1012 | in := new(MetricsConfigurationRequest) |
| 1013 | if err := dec(in); err != nil { |
| 1014 | return nil, err |
| 1015 | } |
| 1016 | if interceptor == nil { |
| 1017 | return srv.(NativeMetricsManagementServiceServer).UpdateMetricsConfiguration(ctx, in) |
| 1018 | } |
| 1019 | info := &grpc.UnaryServerInfo{ |
| 1020 | Server: srv, |
| 1021 | FullMethod: "/dmi.NativeMetricsManagementService/UpdateMetricsConfiguration", |
| 1022 | } |
| 1023 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 1024 | return srv.(NativeMetricsManagementServiceServer).UpdateMetricsConfiguration(ctx, req.(*MetricsConfigurationRequest)) |
| 1025 | } |
| 1026 | return interceptor(ctx, in, info, handler) |
| 1027 | } |
| 1028 | |
| 1029 | func _NativeMetricsManagementService_GetMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 1030 | in := new(GetMetricRequest) |
| 1031 | if err := dec(in); err != nil { |
| 1032 | return nil, err |
| 1033 | } |
| 1034 | if interceptor == nil { |
| 1035 | return srv.(NativeMetricsManagementServiceServer).GetMetric(ctx, in) |
| 1036 | } |
| 1037 | info := &grpc.UnaryServerInfo{ |
| 1038 | Server: srv, |
| 1039 | FullMethod: "/dmi.NativeMetricsManagementService/GetMetric", |
| 1040 | } |
| 1041 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 1042 | return srv.(NativeMetricsManagementServiceServer).GetMetric(ctx, req.(*GetMetricRequest)) |
| 1043 | } |
| 1044 | return interceptor(ctx, in, info, handler) |
| 1045 | } |
| 1046 | |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 1047 | func _NativeMetricsManagementService_StreamMetrics_Handler(srv interface{}, stream grpc.ServerStream) error { |
| 1048 | m := new(empty.Empty) |
| 1049 | if err := stream.RecvMsg(m); err != nil { |
| 1050 | return err |
| 1051 | } |
| 1052 | return srv.(NativeMetricsManagementServiceServer).StreamMetrics(m, &nativeMetricsManagementServiceStreamMetricsServer{stream}) |
| 1053 | } |
| 1054 | |
| 1055 | type NativeMetricsManagementService_StreamMetricsServer interface { |
| 1056 | Send(*Metric) error |
| 1057 | grpc.ServerStream |
| 1058 | } |
| 1059 | |
| 1060 | type nativeMetricsManagementServiceStreamMetricsServer struct { |
| 1061 | grpc.ServerStream |
| 1062 | } |
| 1063 | |
| 1064 | func (x *nativeMetricsManagementServiceStreamMetricsServer) Send(m *Metric) error { |
| 1065 | return x.ServerStream.SendMsg(m) |
| 1066 | } |
| 1067 | |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 1068 | var _NativeMetricsManagementService_serviceDesc = grpc.ServiceDesc{ |
| 1069 | ServiceName: "dmi.NativeMetricsManagementService", |
| 1070 | HandlerType: (*NativeMetricsManagementServiceServer)(nil), |
| 1071 | Methods: []grpc.MethodDesc{ |
| 1072 | { |
| 1073 | MethodName: "ListMetrics", |
| 1074 | Handler: _NativeMetricsManagementService_ListMetrics_Handler, |
| 1075 | }, |
| 1076 | { |
| 1077 | MethodName: "UpdateMetricsConfiguration", |
| 1078 | Handler: _NativeMetricsManagementService_UpdateMetricsConfiguration_Handler, |
| 1079 | }, |
| 1080 | { |
| 1081 | MethodName: "GetMetric", |
| 1082 | Handler: _NativeMetricsManagementService_GetMetric_Handler, |
| 1083 | }, |
| 1084 | }, |
Chandrakanth Nalkudre Gowda | 68590a4 | 2021-04-22 15:19:21 +0530 | [diff] [blame] | 1085 | Streams: []grpc.StreamDesc{ |
| 1086 | { |
| 1087 | StreamName: "StreamMetrics", |
| 1088 | Handler: _NativeMetricsManagementService_StreamMetrics_Handler, |
| 1089 | ServerStreams: true, |
| 1090 | }, |
| 1091 | }, |
Amit Ghosh | 09f2836 | 2020-06-12 21:52:19 +0100 | [diff] [blame] | 1092 | Metadata: "dmi/hw_metrics_mgmt_service.proto", |
| 1093 | } |