github.com/openebs/node-disk-manager@v1.9.1-0.20230225014141-4531f06ffa1e/spec/ndm/ndm.pb.go (about) 1 // 2 //Copyright 2020 The OpenEBS Authors 3 //Licensed under the Apache License, Version 2.0 (the "License"); 4 //you may not use this file except in compliance with the License. 5 //You may obtain a copy of the License at 6 //http://www.apache.org/licenses/LICENSE-2.0 7 //Unless required by applicable law or agreed to in writing, software 8 //distributed under the License is distributed on an "AS IS" BASIS, 9 //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 //See the License for the specific language governing permissions and 11 //limitations under the License. 12 13 // After editing this file, run make protos. Minimum version should be 3.12 14 15 // Code generated by protoc-gen-go. DO NOT EDIT. 16 // versions: 17 // protoc-gen-go v1.24.0 18 // protoc v3.12.1 19 // source: ndm.proto 20 21 package ndm 22 23 import ( 24 context "context" 25 proto "github.com/golang/protobuf/proto" 26 grpc "google.golang.org/grpc" 27 codes "google.golang.org/grpc/codes" 28 status "google.golang.org/grpc/status" 29 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 30 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 31 reflect "reflect" 32 sync "sync" 33 ) 34 35 const ( 36 // Verify that this generated code is sufficiently up-to-date. 37 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 38 // Verify that runtime/protoimpl is sufficiently up-to-date. 39 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 40 ) 41 42 // This is a compile-time assertion that a sufficiently up-to-date version 43 // of the legacy proto package is being used. 44 const _ = proto.ProtoPackageIsVersion4 45 46 type Message struct { 47 state protoimpl.MessageState 48 sizeCache protoimpl.SizeCache 49 unknownFields protoimpl.UnknownFields 50 51 Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` 52 } 53 54 func (x *Message) Reset() { 55 *x = Message{} 56 if protoimpl.UnsafeEnabled { 57 mi := &file_ndm_proto_msgTypes[0] 58 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 59 ms.StoreMessageInfo(mi) 60 } 61 } 62 63 func (x *Message) String() string { 64 return protoimpl.X.MessageStringOf(x) 65 } 66 67 func (*Message) ProtoMessage() {} 68 69 func (x *Message) ProtoReflect() protoreflect.Message { 70 mi := &file_ndm_proto_msgTypes[0] 71 if protoimpl.UnsafeEnabled && x != nil { 72 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 73 if ms.LoadMessageInfo() == nil { 74 ms.StoreMessageInfo(mi) 75 } 76 return ms 77 } 78 return mi.MessageOf(x) 79 } 80 81 // Deprecated: Use Message.ProtoReflect.Descriptor instead. 82 func (*Message) Descriptor() ([]byte, []int) { 83 return file_ndm_proto_rawDescGZIP(), []int{0} 84 } 85 86 func (x *Message) GetMsg() string { 87 if x != nil { 88 return x.Msg 89 } 90 return "" 91 } 92 93 type Hugepages struct { 94 state protoimpl.MessageState 95 sizeCache protoimpl.SizeCache 96 unknownFields protoimpl.UnknownFields 97 98 Pages int32 `protobuf:"varint,1,opt,name=pages,proto3" json:"pages,omitempty"` 99 } 100 101 func (x *Hugepages) Reset() { 102 *x = Hugepages{} 103 if protoimpl.UnsafeEnabled { 104 mi := &file_ndm_proto_msgTypes[1] 105 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 106 ms.StoreMessageInfo(mi) 107 } 108 } 109 110 func (x *Hugepages) String() string { 111 return protoimpl.X.MessageStringOf(x) 112 } 113 114 func (*Hugepages) ProtoMessage() {} 115 116 func (x *Hugepages) ProtoReflect() protoreflect.Message { 117 mi := &file_ndm_proto_msgTypes[1] 118 if protoimpl.UnsafeEnabled && x != nil { 119 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 120 if ms.LoadMessageInfo() == nil { 121 ms.StoreMessageInfo(mi) 122 } 123 return ms 124 } 125 return mi.MessageOf(x) 126 } 127 128 // Deprecated: Use Hugepages.ProtoReflect.Descriptor instead. 129 func (*Hugepages) Descriptor() ([]byte, []int) { 130 return file_ndm_proto_rawDescGZIP(), []int{1} 131 } 132 133 func (x *Hugepages) GetPages() int32 { 134 if x != nil { 135 return x.Pages 136 } 137 return 0 138 } 139 140 type HugepagesResult struct { 141 state protoimpl.MessageState 142 sizeCache protoimpl.SizeCache 143 unknownFields protoimpl.UnknownFields 144 145 Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` 146 } 147 148 func (x *HugepagesResult) Reset() { 149 *x = HugepagesResult{} 150 if protoimpl.UnsafeEnabled { 151 mi := &file_ndm_proto_msgTypes[2] 152 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 153 ms.StoreMessageInfo(mi) 154 } 155 } 156 157 func (x *HugepagesResult) String() string { 158 return protoimpl.X.MessageStringOf(x) 159 } 160 161 func (*HugepagesResult) ProtoMessage() {} 162 163 func (x *HugepagesResult) ProtoReflect() protoreflect.Message { 164 mi := &file_ndm_proto_msgTypes[2] 165 if protoimpl.UnsafeEnabled && x != nil { 166 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 167 if ms.LoadMessageInfo() == nil { 168 ms.StoreMessageInfo(mi) 169 } 170 return ms 171 } 172 return mi.MessageOf(x) 173 } 174 175 // Deprecated: Use HugepagesResult.ProtoReflect.Descriptor instead. 176 func (*HugepagesResult) Descriptor() ([]byte, []int) { 177 return file_ndm_proto_rawDescGZIP(), []int{2} 178 } 179 180 func (x *HugepagesResult) GetResult() bool { 181 if x != nil { 182 return x.Result 183 } 184 return false 185 } 186 187 type BlockDeviceDetails struct { 188 state protoimpl.MessageState 189 sizeCache protoimpl.SizeCache 190 unknownFields protoimpl.UnknownFields 191 192 Compliance string `protobuf:"bytes,1,opt,name=Compliance,proto3" json:"Compliance,omitempty"` 193 Vendor string `protobuf:"bytes,2,opt,name=Vendor,proto3" json:"Vendor,omitempty"` 194 Model string `protobuf:"bytes,3,opt,name=Model,proto3" json:"Model,omitempty"` 195 SerialNumber string `protobuf:"bytes,4,opt,name=SerialNumber,proto3" json:"SerialNumber,omitempty"` 196 FirmwareRevision string `protobuf:"bytes,5,opt,name=FirmwareRevision,proto3" json:"FirmwareRevision,omitempty"` 197 WWN string `protobuf:"bytes,6,opt,name=WWN,proto3" json:"WWN,omitempty"` 198 Capacity uint64 `protobuf:"varint,7,opt,name=Capacity,proto3" json:"Capacity,omitempty"` 199 LBSize uint32 `protobuf:"varint,8,opt,name=LBSize,proto3" json:"LBSize,omitempty"` 200 PBSize uint32 `protobuf:"varint,9,opt,name=PBSize,proto3" json:"PBSize,omitempty"` 201 RotationRate uint32 `protobuf:"varint,10,opt,name=RotationRate,proto3" json:"RotationRate,omitempty"` 202 ATAMajorVersion string `protobuf:"bytes,11,opt,name=ATAMajorVersion,proto3" json:"ATAMajorVersion,omitempty"` 203 ATAMinorVersion string `protobuf:"bytes,12,opt,name=ATAMinorVersion,proto3" json:"ATAMinorVersion,omitempty"` 204 AtaTransport string `protobuf:"bytes,13,opt,name=AtaTransport,proto3" json:"AtaTransport,omitempty"` 205 } 206 207 func (x *BlockDeviceDetails) Reset() { 208 *x = BlockDeviceDetails{} 209 if protoimpl.UnsafeEnabled { 210 mi := &file_ndm_proto_msgTypes[3] 211 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 212 ms.StoreMessageInfo(mi) 213 } 214 } 215 216 func (x *BlockDeviceDetails) String() string { 217 return protoimpl.X.MessageStringOf(x) 218 } 219 220 func (*BlockDeviceDetails) ProtoMessage() {} 221 222 func (x *BlockDeviceDetails) ProtoReflect() protoreflect.Message { 223 mi := &file_ndm_proto_msgTypes[3] 224 if protoimpl.UnsafeEnabled && x != nil { 225 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 226 if ms.LoadMessageInfo() == nil { 227 ms.StoreMessageInfo(mi) 228 } 229 return ms 230 } 231 return mi.MessageOf(x) 232 } 233 234 // Deprecated: Use BlockDeviceDetails.ProtoReflect.Descriptor instead. 235 func (*BlockDeviceDetails) Descriptor() ([]byte, []int) { 236 return file_ndm_proto_rawDescGZIP(), []int{3} 237 } 238 239 func (x *BlockDeviceDetails) GetCompliance() string { 240 if x != nil { 241 return x.Compliance 242 } 243 return "" 244 } 245 246 func (x *BlockDeviceDetails) GetVendor() string { 247 if x != nil { 248 return x.Vendor 249 } 250 return "" 251 } 252 253 func (x *BlockDeviceDetails) GetModel() string { 254 if x != nil { 255 return x.Model 256 } 257 return "" 258 } 259 260 func (x *BlockDeviceDetails) GetSerialNumber() string { 261 if x != nil { 262 return x.SerialNumber 263 } 264 return "" 265 } 266 267 func (x *BlockDeviceDetails) GetFirmwareRevision() string { 268 if x != nil { 269 return x.FirmwareRevision 270 } 271 return "" 272 } 273 274 func (x *BlockDeviceDetails) GetWWN() string { 275 if x != nil { 276 return x.WWN 277 } 278 return "" 279 } 280 281 func (x *BlockDeviceDetails) GetCapacity() uint64 { 282 if x != nil { 283 return x.Capacity 284 } 285 return 0 286 } 287 288 func (x *BlockDeviceDetails) GetLBSize() uint32 { 289 if x != nil { 290 return x.LBSize 291 } 292 return 0 293 } 294 295 func (x *BlockDeviceDetails) GetPBSize() uint32 { 296 if x != nil { 297 return x.PBSize 298 } 299 return 0 300 } 301 302 func (x *BlockDeviceDetails) GetRotationRate() uint32 { 303 if x != nil { 304 return x.RotationRate 305 } 306 return 0 307 } 308 309 func (x *BlockDeviceDetails) GetATAMajorVersion() string { 310 if x != nil { 311 return x.ATAMajorVersion 312 } 313 return "" 314 } 315 316 func (x *BlockDeviceDetails) GetATAMinorVersion() string { 317 if x != nil { 318 return x.ATAMinorVersion 319 } 320 return "" 321 } 322 323 func (x *BlockDeviceDetails) GetAtaTransport() string { 324 if x != nil { 325 return x.AtaTransport 326 } 327 return "" 328 } 329 330 type BlockDevice struct { 331 state protoimpl.MessageState 332 sizeCache protoimpl.SizeCache 333 unknownFields protoimpl.UnknownFields 334 335 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 336 // Type can be Disk, Loop, LVM, etc 337 Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` 338 Partitions []string `protobuf:"bytes,3,rep,name=partitions,proto3" json:"partitions,omitempty"` // Other fields about disk can be added here 339 } 340 341 func (x *BlockDevice) Reset() { 342 *x = BlockDevice{} 343 if protoimpl.UnsafeEnabled { 344 mi := &file_ndm_proto_msgTypes[4] 345 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 346 ms.StoreMessageInfo(mi) 347 } 348 } 349 350 func (x *BlockDevice) String() string { 351 return protoimpl.X.MessageStringOf(x) 352 } 353 354 func (*BlockDevice) ProtoMessage() {} 355 356 func (x *BlockDevice) ProtoReflect() protoreflect.Message { 357 mi := &file_ndm_proto_msgTypes[4] 358 if protoimpl.UnsafeEnabled && x != nil { 359 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 360 if ms.LoadMessageInfo() == nil { 361 ms.StoreMessageInfo(mi) 362 } 363 return ms 364 } 365 return mi.MessageOf(x) 366 } 367 368 // Deprecated: Use BlockDevice.ProtoReflect.Descriptor instead. 369 func (*BlockDevice) Descriptor() ([]byte, []int) { 370 return file_ndm_proto_rawDescGZIP(), []int{4} 371 } 372 373 func (x *BlockDevice) GetName() string { 374 if x != nil { 375 return x.Name 376 } 377 return "" 378 } 379 380 func (x *BlockDevice) GetType() string { 381 if x != nil { 382 return x.Type 383 } 384 return "" 385 } 386 387 func (x *BlockDevice) GetPartitions() []string { 388 if x != nil { 389 return x.Partitions 390 } 391 return nil 392 } 393 394 type BlockDevices struct { 395 state protoimpl.MessageState 396 sizeCache protoimpl.SizeCache 397 unknownFields protoimpl.UnknownFields 398 399 Blockdevices []*BlockDevice `protobuf:"bytes,1,rep,name=blockdevices,proto3" json:"blockdevices,omitempty"` 400 } 401 402 func (x *BlockDevices) Reset() { 403 *x = BlockDevices{} 404 if protoimpl.UnsafeEnabled { 405 mi := &file_ndm_proto_msgTypes[5] 406 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 407 ms.StoreMessageInfo(mi) 408 } 409 } 410 411 func (x *BlockDevices) String() string { 412 return protoimpl.X.MessageStringOf(x) 413 } 414 415 func (*BlockDevices) ProtoMessage() {} 416 417 func (x *BlockDevices) ProtoReflect() protoreflect.Message { 418 mi := &file_ndm_proto_msgTypes[5] 419 if protoimpl.UnsafeEnabled && x != nil { 420 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 421 if ms.LoadMessageInfo() == nil { 422 ms.StoreMessageInfo(mi) 423 } 424 return ms 425 } 426 return mi.MessageOf(x) 427 } 428 429 // Deprecated: Use BlockDevices.ProtoReflect.Descriptor instead. 430 func (*BlockDevices) Descriptor() ([]byte, []int) { 431 return file_ndm_proto_rawDescGZIP(), []int{5} 432 } 433 434 func (x *BlockDevices) GetBlockdevices() []*BlockDevice { 435 if x != nil { 436 return x.Blockdevices 437 } 438 return nil 439 } 440 441 type Status struct { 442 state protoimpl.MessageState 443 sizeCache protoimpl.SizeCache 444 unknownFields protoimpl.UnknownFields 445 446 Status bool `protobuf:"varint,1,opt,name=Status,proto3" json:"Status,omitempty"` 447 } 448 449 func (x *Status) Reset() { 450 *x = Status{} 451 if protoimpl.UnsafeEnabled { 452 mi := &file_ndm_proto_msgTypes[6] 453 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 454 ms.StoreMessageInfo(mi) 455 } 456 } 457 458 func (x *Status) String() string { 459 return protoimpl.X.MessageStringOf(x) 460 } 461 462 func (*Status) ProtoMessage() {} 463 464 func (x *Status) ProtoReflect() protoreflect.Message { 465 mi := &file_ndm_proto_msgTypes[6] 466 if protoimpl.UnsafeEnabled && x != nil { 467 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 468 if ms.LoadMessageInfo() == nil { 469 ms.StoreMessageInfo(mi) 470 } 471 return ms 472 } 473 return mi.MessageOf(x) 474 } 475 476 // Deprecated: Use Status.ProtoReflect.Descriptor instead. 477 func (*Status) Descriptor() ([]byte, []int) { 478 return file_ndm_proto_rawDescGZIP(), []int{6} 479 } 480 481 func (x *Status) GetStatus() bool { 482 if x != nil { 483 return x.Status 484 } 485 return false 486 } 487 488 type VersionInfo struct { 489 state protoimpl.MessageState 490 sizeCache protoimpl.SizeCache 491 unknownFields protoimpl.UnknownFields 492 493 Version string `protobuf:"bytes,1,opt,name=Version,proto3" json:"Version,omitempty"` 494 GitCommit string `protobuf:"bytes,2,opt,name=GitCommit,proto3" json:"GitCommit,omitempty"` 495 } 496 497 func (x *VersionInfo) Reset() { 498 *x = VersionInfo{} 499 if protoimpl.UnsafeEnabled { 500 mi := &file_ndm_proto_msgTypes[7] 501 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 502 ms.StoreMessageInfo(mi) 503 } 504 } 505 506 func (x *VersionInfo) String() string { 507 return protoimpl.X.MessageStringOf(x) 508 } 509 510 func (*VersionInfo) ProtoMessage() {} 511 512 func (x *VersionInfo) ProtoReflect() protoreflect.Message { 513 mi := &file_ndm_proto_msgTypes[7] 514 if protoimpl.UnsafeEnabled && x != nil { 515 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 516 if ms.LoadMessageInfo() == nil { 517 ms.StoreMessageInfo(mi) 518 } 519 return ms 520 } 521 return mi.MessageOf(x) 522 } 523 524 // Deprecated: Use VersionInfo.ProtoReflect.Descriptor instead. 525 func (*VersionInfo) Descriptor() ([]byte, []int) { 526 return file_ndm_proto_rawDescGZIP(), []int{7} 527 } 528 529 func (x *VersionInfo) GetVersion() string { 530 if x != nil { 531 return x.Version 532 } 533 return "" 534 } 535 536 func (x *VersionInfo) GetGitCommit() string { 537 if x != nil { 538 return x.GitCommit 539 } 540 return "" 541 } 542 543 type NodeName struct { 544 state protoimpl.MessageState 545 sizeCache protoimpl.SizeCache 546 unknownFields protoimpl.UnknownFields 547 548 NodeName string `protobuf:"bytes,1,opt,name=NodeName,proto3" json:"NodeName,omitempty"` 549 } 550 551 func (x *NodeName) Reset() { 552 *x = NodeName{} 553 if protoimpl.UnsafeEnabled { 554 mi := &file_ndm_proto_msgTypes[8] 555 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 556 ms.StoreMessageInfo(mi) 557 } 558 } 559 560 func (x *NodeName) String() string { 561 return protoimpl.X.MessageStringOf(x) 562 } 563 564 func (*NodeName) ProtoMessage() {} 565 566 func (x *NodeName) ProtoReflect() protoreflect.Message { 567 mi := &file_ndm_proto_msgTypes[8] 568 if protoimpl.UnsafeEnabled && x != nil { 569 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 570 if ms.LoadMessageInfo() == nil { 571 ms.StoreMessageInfo(mi) 572 } 573 return ms 574 } 575 return mi.MessageOf(x) 576 } 577 578 // Deprecated: Use NodeName.ProtoReflect.Descriptor instead. 579 func (*NodeName) Descriptor() ([]byte, []int) { 580 return file_ndm_proto_rawDescGZIP(), []int{8} 581 } 582 583 func (x *NodeName) GetNodeName() string { 584 if x != nil { 585 return x.NodeName 586 } 587 return "" 588 } 589 590 type Null struct { 591 state protoimpl.MessageState 592 sizeCache protoimpl.SizeCache 593 unknownFields protoimpl.UnknownFields 594 } 595 596 func (x *Null) Reset() { 597 *x = Null{} 598 if protoimpl.UnsafeEnabled { 599 mi := &file_ndm_proto_msgTypes[9] 600 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 601 ms.StoreMessageInfo(mi) 602 } 603 } 604 605 func (x *Null) String() string { 606 return protoimpl.X.MessageStringOf(x) 607 } 608 609 func (*Null) ProtoMessage() {} 610 611 func (x *Null) ProtoReflect() protoreflect.Message { 612 mi := &file_ndm_proto_msgTypes[9] 613 if protoimpl.UnsafeEnabled && x != nil { 614 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 615 if ms.LoadMessageInfo() == nil { 616 ms.StoreMessageInfo(mi) 617 } 618 return ms 619 } 620 return mi.MessageOf(x) 621 } 622 623 // Deprecated: Use Null.ProtoReflect.Descriptor instead. 624 func (*Null) Descriptor() ([]byte, []int) { 625 return file_ndm_proto_rawDescGZIP(), []int{9} 626 } 627 628 var File_ndm_proto protoreflect.FileDescriptor 629 630 var file_ndm_proto_rawDesc = []byte{ 631 0x0a, 0x09, 0x6e, 0x64, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x6e, 0x64, 0x6d, 632 0x22, 0x1b, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 633 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x21, 0x0a, 634 0x09, 0x48, 0x75, 0x67, 0x65, 0x70, 0x61, 0x67, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 635 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 636 0x22, 0x29, 0x0a, 0x0f, 0x48, 0x75, 0x67, 0x65, 0x70, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 637 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 638 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xac, 0x03, 0x0a, 0x12, 639 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 640 0x6c, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 641 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e, 642 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 643 0x28, 0x09, 0x52, 0x06, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x4d, 0x6f, 644 0x64, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 645 0x12, 0x22, 0x0a, 0x0c, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 646 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x75, 647 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x10, 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 648 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 649 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 650 0x12, 0x10, 0x0a, 0x03, 0x57, 0x57, 0x4e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x57, 651 0x57, 0x4e, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x07, 652 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x43, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x16, 653 0x0a, 0x06, 0x4c, 0x42, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 654 0x4c, 0x42, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x42, 0x53, 0x69, 0x7a, 0x65, 655 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x50, 0x42, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 656 0x0a, 0x0c, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x18, 0x0a, 657 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 658 0x74, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x41, 0x54, 0x41, 0x4d, 0x61, 0x6a, 0x6f, 0x72, 0x56, 0x65, 659 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x41, 0x54, 0x41, 660 0x4d, 0x61, 0x6a, 0x6f, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 661 0x41, 0x54, 0x41, 0x4d, 0x69, 0x6e, 0x6f, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 662 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x41, 0x54, 0x41, 0x4d, 0x69, 0x6e, 0x6f, 0x72, 0x56, 663 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x41, 0x74, 0x61, 0x54, 0x72, 0x61, 664 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x41, 0x74, 665 0x61, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x55, 0x0a, 0x0b, 0x42, 0x6c, 666 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 667 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 668 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 669 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 670 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 671 0x73, 0x22, 0x44, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 672 0x73, 0x12, 0x34, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 673 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6e, 0x64, 0x6d, 0x2e, 0x42, 0x6c, 674 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 675 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x22, 0x20, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 676 0x73, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 677 0x08, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x45, 0x0a, 0x0b, 0x56, 0x65, 0x72, 678 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 679 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 680 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 681 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 682 0x22, 0x26, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 683 0x4e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 684 0x4e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x06, 0x0a, 0x04, 0x4e, 0x75, 0x6c, 0x6c, 685 0x32, 0x32, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2a, 0x0a, 0x0b, 0x46, 0x69, 0x6e, 0x64, 686 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x09, 0x2e, 0x6e, 0x64, 0x6d, 0x2e, 0x4e, 0x75, 687 0x6c, 0x6c, 0x1a, 0x10, 0x2e, 0x6e, 0x64, 0x6d, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 688 0x49, 0x6e, 0x66, 0x6f, 0x32, 0xca, 0x02, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a, 689 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x09, 0x2e, 0x6e, 0x64, 0x6d, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 690 0x1a, 0x0d, 0x2e, 0x6e, 0x64, 0x6d, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 691 0x30, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x76, 0x69, 692 0x63, 0x65, 0x73, 0x12, 0x09, 0x2e, 0x6e, 0x64, 0x6d, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x1a, 0x11, 693 0x2e, 0x6e, 0x64, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 694 0x73, 0x12, 0x25, 0x0a, 0x0b, 0x49, 0x53, 0x43, 0x53, 0x49, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 695 0x12, 0x09, 0x2e, 0x6e, 0x64, 0x6d, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x1a, 0x0b, 0x2e, 0x6e, 0x64, 696 0x6d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x43, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 697 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 698 0x6c, 0x73, 0x12, 0x10, 0x2e, 0x6e, 0x64, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 699 0x76, 0x69, 0x63, 0x65, 0x1a, 0x17, 0x2e, 0x6e, 0x64, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 700 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x34, 0x0a, 701 0x0c, 0x53, 0x65, 0x74, 0x48, 0x75, 0x67, 0x65, 0x70, 0x61, 0x67, 0x65, 0x73, 0x12, 0x0e, 0x2e, 702 0x6e, 0x64, 0x6d, 0x2e, 0x48, 0x75, 0x67, 0x65, 0x70, 0x61, 0x67, 0x65, 0x73, 0x1a, 0x14, 0x2e, 703 0x6e, 0x64, 0x6d, 0x2e, 0x48, 0x75, 0x67, 0x65, 0x70, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 704 0x75, 0x6c, 0x74, 0x12, 0x29, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x48, 0x75, 0x67, 0x65, 0x70, 0x61, 705 0x67, 0x65, 0x73, 0x12, 0x09, 0x2e, 0x6e, 0x64, 0x6d, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x1a, 0x0e, 706 0x2e, 0x6e, 0x64, 0x6d, 0x2e, 0x48, 0x75, 0x67, 0x65, 0x70, 0x61, 0x67, 0x65, 0x73, 0x12, 0x21, 707 0x0a, 0x06, 0x52, 0x65, 0x73, 0x63, 0x61, 0x6e, 0x12, 0x09, 0x2e, 0x6e, 0x64, 0x6d, 0x2e, 0x4e, 708 0x75, 0x6c, 0x6c, 0x1a, 0x0c, 0x2e, 0x6e, 0x64, 0x6d, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 709 0x65, 0x42, 0x0a, 0x5a, 0x08, 0x73, 0x70, 0x65, 0x63, 0x2f, 0x6e, 0x64, 0x6d, 0x62, 0x06, 0x70, 710 0x72, 0x6f, 0x74, 0x6f, 0x33, 711 } 712 713 var ( 714 file_ndm_proto_rawDescOnce sync.Once 715 file_ndm_proto_rawDescData = file_ndm_proto_rawDesc 716 ) 717 718 func file_ndm_proto_rawDescGZIP() []byte { 719 file_ndm_proto_rawDescOnce.Do(func() { 720 file_ndm_proto_rawDescData = protoimpl.X.CompressGZIP(file_ndm_proto_rawDescData) 721 }) 722 return file_ndm_proto_rawDescData 723 } 724 725 var file_ndm_proto_msgTypes = make([]protoimpl.MessageInfo, 10) 726 var file_ndm_proto_goTypes = []interface{}{ 727 (*Message)(nil), // 0: ndm.Message 728 (*Hugepages)(nil), // 1: ndm.Hugepages 729 (*HugepagesResult)(nil), // 2: ndm.HugepagesResult 730 (*BlockDeviceDetails)(nil), // 3: ndm.BlockDeviceDetails 731 (*BlockDevice)(nil), // 4: ndm.BlockDevice 732 (*BlockDevices)(nil), // 5: ndm.BlockDevices 733 (*Status)(nil), // 6: ndm.Status 734 (*VersionInfo)(nil), // 7: ndm.VersionInfo 735 (*NodeName)(nil), // 8: ndm.NodeName 736 (*Null)(nil), // 9: ndm.Null 737 } 738 var file_ndm_proto_depIdxs = []int32{ 739 4, // 0: ndm.BlockDevices.blockdevices:type_name -> ndm.BlockDevice 740 9, // 1: ndm.Info.FindVersion:input_type -> ndm.Null 741 9, // 2: ndm.Node.Name:input_type -> ndm.Null 742 9, // 3: ndm.Node.ListBlockDevices:input_type -> ndm.Null 743 9, // 4: ndm.Node.ISCSIStatus:input_type -> ndm.Null 744 4, // 5: ndm.Node.ListBlockDeviceDetails:input_type -> ndm.BlockDevice 745 1, // 6: ndm.Node.SetHugepages:input_type -> ndm.Hugepages 746 9, // 7: ndm.Node.GetHugepages:input_type -> ndm.Null 747 9, // 8: ndm.Node.Rescan:input_type -> ndm.Null 748 7, // 9: ndm.Info.FindVersion:output_type -> ndm.VersionInfo 749 8, // 10: ndm.Node.Name:output_type -> ndm.NodeName 750 5, // 11: ndm.Node.ListBlockDevices:output_type -> ndm.BlockDevices 751 6, // 12: ndm.Node.ISCSIStatus:output_type -> ndm.Status 752 3, // 13: ndm.Node.ListBlockDeviceDetails:output_type -> ndm.BlockDeviceDetails 753 2, // 14: ndm.Node.SetHugepages:output_type -> ndm.HugepagesResult 754 1, // 15: ndm.Node.GetHugepages:output_type -> ndm.Hugepages 755 0, // 16: ndm.Node.Rescan:output_type -> ndm.Message 756 9, // [9:17] is the sub-list for method output_type 757 1, // [1:9] is the sub-list for method input_type 758 1, // [1:1] is the sub-list for extension type_name 759 1, // [1:1] is the sub-list for extension extendee 760 0, // [0:1] is the sub-list for field type_name 761 } 762 763 func init() { file_ndm_proto_init() } 764 func file_ndm_proto_init() { 765 if File_ndm_proto != nil { 766 return 767 } 768 if !protoimpl.UnsafeEnabled { 769 file_ndm_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 770 switch v := v.(*Message); i { 771 case 0: 772 return &v.state 773 case 1: 774 return &v.sizeCache 775 case 2: 776 return &v.unknownFields 777 default: 778 return nil 779 } 780 } 781 file_ndm_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 782 switch v := v.(*Hugepages); i { 783 case 0: 784 return &v.state 785 case 1: 786 return &v.sizeCache 787 case 2: 788 return &v.unknownFields 789 default: 790 return nil 791 } 792 } 793 file_ndm_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 794 switch v := v.(*HugepagesResult); i { 795 case 0: 796 return &v.state 797 case 1: 798 return &v.sizeCache 799 case 2: 800 return &v.unknownFields 801 default: 802 return nil 803 } 804 } 805 file_ndm_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { 806 switch v := v.(*BlockDeviceDetails); i { 807 case 0: 808 return &v.state 809 case 1: 810 return &v.sizeCache 811 case 2: 812 return &v.unknownFields 813 default: 814 return nil 815 } 816 } 817 file_ndm_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { 818 switch v := v.(*BlockDevice); i { 819 case 0: 820 return &v.state 821 case 1: 822 return &v.sizeCache 823 case 2: 824 return &v.unknownFields 825 default: 826 return nil 827 } 828 } 829 file_ndm_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { 830 switch v := v.(*BlockDevices); i { 831 case 0: 832 return &v.state 833 case 1: 834 return &v.sizeCache 835 case 2: 836 return &v.unknownFields 837 default: 838 return nil 839 } 840 } 841 file_ndm_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { 842 switch v := v.(*Status); i { 843 case 0: 844 return &v.state 845 case 1: 846 return &v.sizeCache 847 case 2: 848 return &v.unknownFields 849 default: 850 return nil 851 } 852 } 853 file_ndm_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { 854 switch v := v.(*VersionInfo); i { 855 case 0: 856 return &v.state 857 case 1: 858 return &v.sizeCache 859 case 2: 860 return &v.unknownFields 861 default: 862 return nil 863 } 864 } 865 file_ndm_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { 866 switch v := v.(*NodeName); i { 867 case 0: 868 return &v.state 869 case 1: 870 return &v.sizeCache 871 case 2: 872 return &v.unknownFields 873 default: 874 return nil 875 } 876 } 877 file_ndm_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { 878 switch v := v.(*Null); i { 879 case 0: 880 return &v.state 881 case 1: 882 return &v.sizeCache 883 case 2: 884 return &v.unknownFields 885 default: 886 return nil 887 } 888 } 889 } 890 type x struct{} 891 out := protoimpl.TypeBuilder{ 892 File: protoimpl.DescBuilder{ 893 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 894 RawDescriptor: file_ndm_proto_rawDesc, 895 NumEnums: 0, 896 NumMessages: 10, 897 NumExtensions: 0, 898 NumServices: 2, 899 }, 900 GoTypes: file_ndm_proto_goTypes, 901 DependencyIndexes: file_ndm_proto_depIdxs, 902 MessageInfos: file_ndm_proto_msgTypes, 903 }.Build() 904 File_ndm_proto = out.File 905 file_ndm_proto_rawDesc = nil 906 file_ndm_proto_goTypes = nil 907 file_ndm_proto_depIdxs = nil 908 } 909 910 // Reference imports to suppress errors if they are not otherwise used. 911 var _ context.Context 912 var _ grpc.ClientConnInterface 913 914 // This is a compile-time assertion to ensure that this generated file 915 // is compatible with the grpc package it is being compiled against. 916 const _ = grpc.SupportPackageIsVersion6 917 918 // InfoClient is the client API for Info service. 919 // 920 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 921 type InfoClient interface { 922 // FindVersion Method gets the version information of the NDM components installed 923 FindVersion(ctx context.Context, in *Null, opts ...grpc.CallOption) (*VersionInfo, error) 924 } 925 926 type infoClient struct { 927 cc grpc.ClientConnInterface 928 } 929 930 func NewInfoClient(cc grpc.ClientConnInterface) InfoClient { 931 return &infoClient{cc} 932 } 933 934 func (c *infoClient) FindVersion(ctx context.Context, in *Null, opts ...grpc.CallOption) (*VersionInfo, error) { 935 out := new(VersionInfo) 936 err := c.cc.Invoke(ctx, "/ndm.Info/FindVersion", in, out, opts...) 937 if err != nil { 938 return nil, err 939 } 940 return out, nil 941 } 942 943 // InfoServer is the server API for Info service. 944 type InfoServer interface { 945 // FindVersion Method gets the version information of the NDM components installed 946 FindVersion(context.Context, *Null) (*VersionInfo, error) 947 } 948 949 // UnimplementedInfoServer can be embedded to have forward compatible implementations. 950 type UnimplementedInfoServer struct { 951 } 952 953 func (*UnimplementedInfoServer) FindVersion(context.Context, *Null) (*VersionInfo, error) { 954 return nil, status.Errorf(codes.Unimplemented, "method FindVersion not implemented") 955 } 956 957 func RegisterInfoServer(s *grpc.Server, srv InfoServer) { 958 s.RegisterService(&_Info_serviceDesc, srv) 959 } 960 961 func _Info_FindVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 962 in := new(Null) 963 if err := dec(in); err != nil { 964 return nil, err 965 } 966 if interceptor == nil { 967 return srv.(InfoServer).FindVersion(ctx, in) 968 } 969 info := &grpc.UnaryServerInfo{ 970 Server: srv, 971 FullMethod: "/ndm.Info/FindVersion", 972 } 973 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 974 return srv.(InfoServer).FindVersion(ctx, req.(*Null)) 975 } 976 return interceptor(ctx, in, info, handler) 977 } 978 979 var _Info_serviceDesc = grpc.ServiceDesc{ 980 ServiceName: "ndm.Info", 981 HandlerType: (*InfoServer)(nil), 982 Methods: []grpc.MethodDesc{ 983 { 984 MethodName: "FindVersion", 985 Handler: _Info_FindVersion_Handler, 986 }, 987 }, 988 Streams: []grpc.StreamDesc{}, 989 Metadata: "ndm.proto", 990 } 991 992 // NodeClient is the client API for Node service. 993 // 994 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 995 type NodeClient interface { 996 // Name method is used find the name of the node on which NDM is running on 997 Name(ctx context.Context, in *Null, opts ...grpc.CallOption) (*NodeName, error) 998 // ListBlockDevices method is used to return all the block devices found in hierarchy by NDM 999 ListBlockDevices(ctx context.Context, in *Null, opts ...grpc.CallOption) (*BlockDevices, error) 1000 // ISCSIStatus method returns status of ISCSI 1001 ISCSIStatus(ctx context.Context, in *Null, opts ...grpc.CallOption) (*Status, error) 1002 // ListBlockDeviceDetails method is used to find SMART info about a block device. 1003 // Only the name field is required for input 1004 ListBlockDeviceDetails(ctx context.Context, in *BlockDevice, opts ...grpc.CallOption) (*BlockDeviceDetails, error) 1005 // SetHugepages sets 2MB hugePages on this node. 1006 // Note: Calling this method doesn't guarantee that the said number of pages will be set. 1007 // This is because OS might not have the demanded memory. It would be best to check if this is satisfied with GetHugePages 1008 SetHugepages(ctx context.Context, in *Hugepages, opts ...grpc.CallOption) (*HugepagesResult, error) 1009 // GetHugepages gets the number of huge pages set on the node 1010 GetHugepages(ctx context.Context, in *Null, opts ...grpc.CallOption) (*Hugepages, error) 1011 // Rescan syncs etcd and NDM's local state 1012 Rescan(ctx context.Context, in *Null, opts ...grpc.CallOption) (*Message, error) 1013 } 1014 1015 type nodeClient struct { 1016 cc grpc.ClientConnInterface 1017 } 1018 1019 func NewNodeClient(cc grpc.ClientConnInterface) NodeClient { 1020 return &nodeClient{cc} 1021 } 1022 1023 func (c *nodeClient) Name(ctx context.Context, in *Null, opts ...grpc.CallOption) (*NodeName, error) { 1024 out := new(NodeName) 1025 err := c.cc.Invoke(ctx, "/ndm.Node/Name", in, out, opts...) 1026 if err != nil { 1027 return nil, err 1028 } 1029 return out, nil 1030 } 1031 1032 func (c *nodeClient) ListBlockDevices(ctx context.Context, in *Null, opts ...grpc.CallOption) (*BlockDevices, error) { 1033 out := new(BlockDevices) 1034 err := c.cc.Invoke(ctx, "/ndm.Node/ListBlockDevices", in, out, opts...) 1035 if err != nil { 1036 return nil, err 1037 } 1038 return out, nil 1039 } 1040 1041 func (c *nodeClient) ISCSIStatus(ctx context.Context, in *Null, opts ...grpc.CallOption) (*Status, error) { 1042 out := new(Status) 1043 err := c.cc.Invoke(ctx, "/ndm.Node/ISCSIStatus", in, out, opts...) 1044 if err != nil { 1045 return nil, err 1046 } 1047 return out, nil 1048 } 1049 1050 func (c *nodeClient) ListBlockDeviceDetails(ctx context.Context, in *BlockDevice, opts ...grpc.CallOption) (*BlockDeviceDetails, error) { 1051 out := new(BlockDeviceDetails) 1052 err := c.cc.Invoke(ctx, "/ndm.Node/ListBlockDeviceDetails", in, out, opts...) 1053 if err != nil { 1054 return nil, err 1055 } 1056 return out, nil 1057 } 1058 1059 func (c *nodeClient) SetHugepages(ctx context.Context, in *Hugepages, opts ...grpc.CallOption) (*HugepagesResult, error) { 1060 out := new(HugepagesResult) 1061 err := c.cc.Invoke(ctx, "/ndm.Node/SetHugepages", in, out, opts...) 1062 if err != nil { 1063 return nil, err 1064 } 1065 return out, nil 1066 } 1067 1068 func (c *nodeClient) GetHugepages(ctx context.Context, in *Null, opts ...grpc.CallOption) (*Hugepages, error) { 1069 out := new(Hugepages) 1070 err := c.cc.Invoke(ctx, "/ndm.Node/GetHugepages", in, out, opts...) 1071 if err != nil { 1072 return nil, err 1073 } 1074 return out, nil 1075 } 1076 1077 func (c *nodeClient) Rescan(ctx context.Context, in *Null, opts ...grpc.CallOption) (*Message, error) { 1078 out := new(Message) 1079 err := c.cc.Invoke(ctx, "/ndm.Node/Rescan", in, out, opts...) 1080 if err != nil { 1081 return nil, err 1082 } 1083 return out, nil 1084 } 1085 1086 // NodeServer is the server API for Node service. 1087 type NodeServer interface { 1088 // Name method is used find the name of the node on which NDM is running on 1089 Name(context.Context, *Null) (*NodeName, error) 1090 // ListBlockDevices method is used to return all the block devices found in hierarchy by NDM 1091 ListBlockDevices(context.Context, *Null) (*BlockDevices, error) 1092 // ISCSIStatus method returns status of ISCSI 1093 ISCSIStatus(context.Context, *Null) (*Status, error) 1094 // ListBlockDeviceDetails method is used to find SMART info about a block device. 1095 // Only the name field is required for input 1096 ListBlockDeviceDetails(context.Context, *BlockDevice) (*BlockDeviceDetails, error) 1097 // SetHugepages sets 2MB hugePages on this node. 1098 // Note: Calling this method doesn't guarantee that the said number of pages will be set. 1099 // This is because OS might not have the demanded memory. It would be best to check if this is satisfied with GetHugePages 1100 SetHugepages(context.Context, *Hugepages) (*HugepagesResult, error) 1101 // GetHugepages gets the number of huge pages set on the node 1102 GetHugepages(context.Context, *Null) (*Hugepages, error) 1103 // Rescan syncs etcd and NDM's local state 1104 Rescan(context.Context, *Null) (*Message, error) 1105 } 1106 1107 // UnimplementedNodeServer can be embedded to have forward compatible implementations. 1108 type UnimplementedNodeServer struct { 1109 } 1110 1111 func (*UnimplementedNodeServer) Name(context.Context, *Null) (*NodeName, error) { 1112 return nil, status.Errorf(codes.Unimplemented, "method Name not implemented") 1113 } 1114 func (*UnimplementedNodeServer) ListBlockDevices(context.Context, *Null) (*BlockDevices, error) { 1115 return nil, status.Errorf(codes.Unimplemented, "method ListBlockDevices not implemented") 1116 } 1117 func (*UnimplementedNodeServer) ISCSIStatus(context.Context, *Null) (*Status, error) { 1118 return nil, status.Errorf(codes.Unimplemented, "method ISCSIStatus not implemented") 1119 } 1120 func (*UnimplementedNodeServer) ListBlockDeviceDetails(context.Context, *BlockDevice) (*BlockDeviceDetails, error) { 1121 return nil, status.Errorf(codes.Unimplemented, "method ListBlockDeviceDetails not implemented") 1122 } 1123 func (*UnimplementedNodeServer) SetHugepages(context.Context, *Hugepages) (*HugepagesResult, error) { 1124 return nil, status.Errorf(codes.Unimplemented, "method SetHugepages not implemented") 1125 } 1126 func (*UnimplementedNodeServer) GetHugepages(context.Context, *Null) (*Hugepages, error) { 1127 return nil, status.Errorf(codes.Unimplemented, "method GetHugepages not implemented") 1128 } 1129 func (*UnimplementedNodeServer) Rescan(context.Context, *Null) (*Message, error) { 1130 return nil, status.Errorf(codes.Unimplemented, "method Rescan not implemented") 1131 } 1132 1133 func RegisterNodeServer(s *grpc.Server, srv NodeServer) { 1134 s.RegisterService(&_Node_serviceDesc, srv) 1135 } 1136 1137 func _Node_Name_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1138 in := new(Null) 1139 if err := dec(in); err != nil { 1140 return nil, err 1141 } 1142 if interceptor == nil { 1143 return srv.(NodeServer).Name(ctx, in) 1144 } 1145 info := &grpc.UnaryServerInfo{ 1146 Server: srv, 1147 FullMethod: "/ndm.Node/Name", 1148 } 1149 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1150 return srv.(NodeServer).Name(ctx, req.(*Null)) 1151 } 1152 return interceptor(ctx, in, info, handler) 1153 } 1154 1155 func _Node_ListBlockDevices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1156 in := new(Null) 1157 if err := dec(in); err != nil { 1158 return nil, err 1159 } 1160 if interceptor == nil { 1161 return srv.(NodeServer).ListBlockDevices(ctx, in) 1162 } 1163 info := &grpc.UnaryServerInfo{ 1164 Server: srv, 1165 FullMethod: "/ndm.Node/ListBlockDevices", 1166 } 1167 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1168 return srv.(NodeServer).ListBlockDevices(ctx, req.(*Null)) 1169 } 1170 return interceptor(ctx, in, info, handler) 1171 } 1172 1173 func _Node_ISCSIStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1174 in := new(Null) 1175 if err := dec(in); err != nil { 1176 return nil, err 1177 } 1178 if interceptor == nil { 1179 return srv.(NodeServer).ISCSIStatus(ctx, in) 1180 } 1181 info := &grpc.UnaryServerInfo{ 1182 Server: srv, 1183 FullMethod: "/ndm.Node/ISCSIStatus", 1184 } 1185 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1186 return srv.(NodeServer).ISCSIStatus(ctx, req.(*Null)) 1187 } 1188 return interceptor(ctx, in, info, handler) 1189 } 1190 1191 func _Node_ListBlockDeviceDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1192 in := new(BlockDevice) 1193 if err := dec(in); err != nil { 1194 return nil, err 1195 } 1196 if interceptor == nil { 1197 return srv.(NodeServer).ListBlockDeviceDetails(ctx, in) 1198 } 1199 info := &grpc.UnaryServerInfo{ 1200 Server: srv, 1201 FullMethod: "/ndm.Node/ListBlockDeviceDetails", 1202 } 1203 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1204 return srv.(NodeServer).ListBlockDeviceDetails(ctx, req.(*BlockDevice)) 1205 } 1206 return interceptor(ctx, in, info, handler) 1207 } 1208 1209 func _Node_SetHugepages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1210 in := new(Hugepages) 1211 if err := dec(in); err != nil { 1212 return nil, err 1213 } 1214 if interceptor == nil { 1215 return srv.(NodeServer).SetHugepages(ctx, in) 1216 } 1217 info := &grpc.UnaryServerInfo{ 1218 Server: srv, 1219 FullMethod: "/ndm.Node/SetHugepages", 1220 } 1221 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1222 return srv.(NodeServer).SetHugepages(ctx, req.(*Hugepages)) 1223 } 1224 return interceptor(ctx, in, info, handler) 1225 } 1226 1227 func _Node_GetHugepages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1228 in := new(Null) 1229 if err := dec(in); err != nil { 1230 return nil, err 1231 } 1232 if interceptor == nil { 1233 return srv.(NodeServer).GetHugepages(ctx, in) 1234 } 1235 info := &grpc.UnaryServerInfo{ 1236 Server: srv, 1237 FullMethod: "/ndm.Node/GetHugepages", 1238 } 1239 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1240 return srv.(NodeServer).GetHugepages(ctx, req.(*Null)) 1241 } 1242 return interceptor(ctx, in, info, handler) 1243 } 1244 1245 func _Node_Rescan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1246 in := new(Null) 1247 if err := dec(in); err != nil { 1248 return nil, err 1249 } 1250 if interceptor == nil { 1251 return srv.(NodeServer).Rescan(ctx, in) 1252 } 1253 info := &grpc.UnaryServerInfo{ 1254 Server: srv, 1255 FullMethod: "/ndm.Node/Rescan", 1256 } 1257 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1258 return srv.(NodeServer).Rescan(ctx, req.(*Null)) 1259 } 1260 return interceptor(ctx, in, info, handler) 1261 } 1262 1263 var _Node_serviceDesc = grpc.ServiceDesc{ 1264 ServiceName: "ndm.Node", 1265 HandlerType: (*NodeServer)(nil), 1266 Methods: []grpc.MethodDesc{ 1267 { 1268 MethodName: "Name", 1269 Handler: _Node_Name_Handler, 1270 }, 1271 { 1272 MethodName: "ListBlockDevices", 1273 Handler: _Node_ListBlockDevices_Handler, 1274 }, 1275 { 1276 MethodName: "ISCSIStatus", 1277 Handler: _Node_ISCSIStatus_Handler, 1278 }, 1279 { 1280 MethodName: "ListBlockDeviceDetails", 1281 Handler: _Node_ListBlockDeviceDetails_Handler, 1282 }, 1283 { 1284 MethodName: "SetHugepages", 1285 Handler: _Node_SetHugepages_Handler, 1286 }, 1287 { 1288 MethodName: "GetHugepages", 1289 Handler: _Node_GetHugepages_Handler, 1290 }, 1291 { 1292 MethodName: "Rescan", 1293 Handler: _Node_Rescan_Handler, 1294 }, 1295 }, 1296 Streams: []grpc.StreamDesc{}, 1297 Metadata: "ndm.proto", 1298 }