github.com/annwntech/go-micro/v2@v2.9.5/network/service/proto/network.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.25.0 4 // protoc v3.13.0 5 // source: network/service/proto/network.proto 6 7 package go_micro_network 8 9 import ( 10 context "context" 11 proto1 "github.com/annwntech/go-micro/v2/router/service/proto" 12 proto "github.com/golang/protobuf/proto" 13 grpc "google.golang.org/grpc" 14 codes "google.golang.org/grpc/codes" 15 status "google.golang.org/grpc/status" 16 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 17 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 18 reflect "reflect" 19 sync "sync" 20 ) 21 22 const ( 23 // Verify that this generated code is sufficiently up-to-date. 24 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 25 // Verify that runtime/protoimpl is sufficiently up-to-date. 26 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 27 ) 28 29 // This is a compile-time assertion that a sufficiently up-to-date version 30 // of the legacy proto package is being used. 31 const _ = proto.ProtoPackageIsVersion4 32 33 // Query is passed in a LookupRequest 34 type Query struct { 35 state protoimpl.MessageState 36 sizeCache protoimpl.SizeCache 37 unknownFields protoimpl.UnknownFields 38 39 Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` 40 Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` 41 Gateway string `protobuf:"bytes,3,opt,name=gateway,proto3" json:"gateway,omitempty"` 42 Router string `protobuf:"bytes,4,opt,name=router,proto3" json:"router,omitempty"` 43 Network string `protobuf:"bytes,5,opt,name=network,proto3" json:"network,omitempty"` 44 } 45 46 func (x *Query) Reset() { 47 *x = Query{} 48 if protoimpl.UnsafeEnabled { 49 mi := &file_network_service_proto_network_proto_msgTypes[0] 50 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 51 ms.StoreMessageInfo(mi) 52 } 53 } 54 55 func (x *Query) String() string { 56 return protoimpl.X.MessageStringOf(x) 57 } 58 59 func (*Query) ProtoMessage() {} 60 61 func (x *Query) ProtoReflect() protoreflect.Message { 62 mi := &file_network_service_proto_network_proto_msgTypes[0] 63 if protoimpl.UnsafeEnabled && x != nil { 64 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 65 if ms.LoadMessageInfo() == nil { 66 ms.StoreMessageInfo(mi) 67 } 68 return ms 69 } 70 return mi.MessageOf(x) 71 } 72 73 // Deprecated: Use Query.ProtoReflect.Descriptor instead. 74 func (*Query) Descriptor() ([]byte, []int) { 75 return file_network_service_proto_network_proto_rawDescGZIP(), []int{0} 76 } 77 78 func (x *Query) GetService() string { 79 if x != nil { 80 return x.Service 81 } 82 return "" 83 } 84 85 func (x *Query) GetAddress() string { 86 if x != nil { 87 return x.Address 88 } 89 return "" 90 } 91 92 func (x *Query) GetGateway() string { 93 if x != nil { 94 return x.Gateway 95 } 96 return "" 97 } 98 99 func (x *Query) GetRouter() string { 100 if x != nil { 101 return x.Router 102 } 103 return "" 104 } 105 106 func (x *Query) GetNetwork() string { 107 if x != nil { 108 return x.Network 109 } 110 return "" 111 } 112 113 type ConnectRequest struct { 114 state protoimpl.MessageState 115 sizeCache protoimpl.SizeCache 116 unknownFields protoimpl.UnknownFields 117 118 Nodes []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` 119 } 120 121 func (x *ConnectRequest) Reset() { 122 *x = ConnectRequest{} 123 if protoimpl.UnsafeEnabled { 124 mi := &file_network_service_proto_network_proto_msgTypes[1] 125 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 126 ms.StoreMessageInfo(mi) 127 } 128 } 129 130 func (x *ConnectRequest) String() string { 131 return protoimpl.X.MessageStringOf(x) 132 } 133 134 func (*ConnectRequest) ProtoMessage() {} 135 136 func (x *ConnectRequest) ProtoReflect() protoreflect.Message { 137 mi := &file_network_service_proto_network_proto_msgTypes[1] 138 if protoimpl.UnsafeEnabled && x != nil { 139 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 140 if ms.LoadMessageInfo() == nil { 141 ms.StoreMessageInfo(mi) 142 } 143 return ms 144 } 145 return mi.MessageOf(x) 146 } 147 148 // Deprecated: Use ConnectRequest.ProtoReflect.Descriptor instead. 149 func (*ConnectRequest) Descriptor() ([]byte, []int) { 150 return file_network_service_proto_network_proto_rawDescGZIP(), []int{1} 151 } 152 153 func (x *ConnectRequest) GetNodes() []*Node { 154 if x != nil { 155 return x.Nodes 156 } 157 return nil 158 } 159 160 type ConnectResponse struct { 161 state protoimpl.MessageState 162 sizeCache protoimpl.SizeCache 163 unknownFields protoimpl.UnknownFields 164 } 165 166 func (x *ConnectResponse) Reset() { 167 *x = ConnectResponse{} 168 if protoimpl.UnsafeEnabled { 169 mi := &file_network_service_proto_network_proto_msgTypes[2] 170 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 171 ms.StoreMessageInfo(mi) 172 } 173 } 174 175 func (x *ConnectResponse) String() string { 176 return protoimpl.X.MessageStringOf(x) 177 } 178 179 func (*ConnectResponse) ProtoMessage() {} 180 181 func (x *ConnectResponse) ProtoReflect() protoreflect.Message { 182 mi := &file_network_service_proto_network_proto_msgTypes[2] 183 if protoimpl.UnsafeEnabled && x != nil { 184 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 185 if ms.LoadMessageInfo() == nil { 186 ms.StoreMessageInfo(mi) 187 } 188 return ms 189 } 190 return mi.MessageOf(x) 191 } 192 193 // Deprecated: Use ConnectResponse.ProtoReflect.Descriptor instead. 194 func (*ConnectResponse) Descriptor() ([]byte, []int) { 195 return file_network_service_proto_network_proto_rawDescGZIP(), []int{2} 196 } 197 198 // PeerRequest requests list of peers 199 type NodesRequest struct { 200 state protoimpl.MessageState 201 sizeCache protoimpl.SizeCache 202 unknownFields protoimpl.UnknownFields 203 204 // node topology depth 205 Depth uint32 `protobuf:"varint,1,opt,name=depth,proto3" json:"depth,omitempty"` 206 } 207 208 func (x *NodesRequest) Reset() { 209 *x = NodesRequest{} 210 if protoimpl.UnsafeEnabled { 211 mi := &file_network_service_proto_network_proto_msgTypes[3] 212 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 213 ms.StoreMessageInfo(mi) 214 } 215 } 216 217 func (x *NodesRequest) String() string { 218 return protoimpl.X.MessageStringOf(x) 219 } 220 221 func (*NodesRequest) ProtoMessage() {} 222 223 func (x *NodesRequest) ProtoReflect() protoreflect.Message { 224 mi := &file_network_service_proto_network_proto_msgTypes[3] 225 if protoimpl.UnsafeEnabled && x != nil { 226 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 227 if ms.LoadMessageInfo() == nil { 228 ms.StoreMessageInfo(mi) 229 } 230 return ms 231 } 232 return mi.MessageOf(x) 233 } 234 235 // Deprecated: Use NodesRequest.ProtoReflect.Descriptor instead. 236 func (*NodesRequest) Descriptor() ([]byte, []int) { 237 return file_network_service_proto_network_proto_rawDescGZIP(), []int{3} 238 } 239 240 func (x *NodesRequest) GetDepth() uint32 { 241 if x != nil { 242 return x.Depth 243 } 244 return 0 245 } 246 247 // PeerResponse is returned by ListPeers 248 type NodesResponse struct { 249 state protoimpl.MessageState 250 sizeCache protoimpl.SizeCache 251 unknownFields protoimpl.UnknownFields 252 253 // return peer topology 254 Nodes []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` 255 } 256 257 func (x *NodesResponse) Reset() { 258 *x = NodesResponse{} 259 if protoimpl.UnsafeEnabled { 260 mi := &file_network_service_proto_network_proto_msgTypes[4] 261 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 262 ms.StoreMessageInfo(mi) 263 } 264 } 265 266 func (x *NodesResponse) String() string { 267 return protoimpl.X.MessageStringOf(x) 268 } 269 270 func (*NodesResponse) ProtoMessage() {} 271 272 func (x *NodesResponse) ProtoReflect() protoreflect.Message { 273 mi := &file_network_service_proto_network_proto_msgTypes[4] 274 if protoimpl.UnsafeEnabled && x != nil { 275 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 276 if ms.LoadMessageInfo() == nil { 277 ms.StoreMessageInfo(mi) 278 } 279 return ms 280 } 281 return mi.MessageOf(x) 282 } 283 284 // Deprecated: Use NodesResponse.ProtoReflect.Descriptor instead. 285 func (*NodesResponse) Descriptor() ([]byte, []int) { 286 return file_network_service_proto_network_proto_rawDescGZIP(), []int{4} 287 } 288 289 func (x *NodesResponse) GetNodes() []*Node { 290 if x != nil { 291 return x.Nodes 292 } 293 return nil 294 } 295 296 type GraphRequest struct { 297 state protoimpl.MessageState 298 sizeCache protoimpl.SizeCache 299 unknownFields protoimpl.UnknownFields 300 301 // node topology depth 302 Depth uint32 `protobuf:"varint,1,opt,name=depth,proto3" json:"depth,omitempty"` 303 } 304 305 func (x *GraphRequest) Reset() { 306 *x = GraphRequest{} 307 if protoimpl.UnsafeEnabled { 308 mi := &file_network_service_proto_network_proto_msgTypes[5] 309 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 310 ms.StoreMessageInfo(mi) 311 } 312 } 313 314 func (x *GraphRequest) String() string { 315 return protoimpl.X.MessageStringOf(x) 316 } 317 318 func (*GraphRequest) ProtoMessage() {} 319 320 func (x *GraphRequest) ProtoReflect() protoreflect.Message { 321 mi := &file_network_service_proto_network_proto_msgTypes[5] 322 if protoimpl.UnsafeEnabled && x != nil { 323 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 324 if ms.LoadMessageInfo() == nil { 325 ms.StoreMessageInfo(mi) 326 } 327 return ms 328 } 329 return mi.MessageOf(x) 330 } 331 332 // Deprecated: Use GraphRequest.ProtoReflect.Descriptor instead. 333 func (*GraphRequest) Descriptor() ([]byte, []int) { 334 return file_network_service_proto_network_proto_rawDescGZIP(), []int{5} 335 } 336 337 func (x *GraphRequest) GetDepth() uint32 { 338 if x != nil { 339 return x.Depth 340 } 341 return 0 342 } 343 344 type GraphResponse struct { 345 state protoimpl.MessageState 346 sizeCache protoimpl.SizeCache 347 unknownFields protoimpl.UnknownFields 348 349 Root *Peer `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty"` 350 } 351 352 func (x *GraphResponse) Reset() { 353 *x = GraphResponse{} 354 if protoimpl.UnsafeEnabled { 355 mi := &file_network_service_proto_network_proto_msgTypes[6] 356 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 357 ms.StoreMessageInfo(mi) 358 } 359 } 360 361 func (x *GraphResponse) String() string { 362 return protoimpl.X.MessageStringOf(x) 363 } 364 365 func (*GraphResponse) ProtoMessage() {} 366 367 func (x *GraphResponse) ProtoReflect() protoreflect.Message { 368 mi := &file_network_service_proto_network_proto_msgTypes[6] 369 if protoimpl.UnsafeEnabled && x != nil { 370 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 371 if ms.LoadMessageInfo() == nil { 372 ms.StoreMessageInfo(mi) 373 } 374 return ms 375 } 376 return mi.MessageOf(x) 377 } 378 379 // Deprecated: Use GraphResponse.ProtoReflect.Descriptor instead. 380 func (*GraphResponse) Descriptor() ([]byte, []int) { 381 return file_network_service_proto_network_proto_rawDescGZIP(), []int{6} 382 } 383 384 func (x *GraphResponse) GetRoot() *Peer { 385 if x != nil { 386 return x.Root 387 } 388 return nil 389 } 390 391 type RoutesRequest struct { 392 state protoimpl.MessageState 393 sizeCache protoimpl.SizeCache 394 unknownFields protoimpl.UnknownFields 395 396 // filter based on 397 Query *Query `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` 398 } 399 400 func (x *RoutesRequest) Reset() { 401 *x = RoutesRequest{} 402 if protoimpl.UnsafeEnabled { 403 mi := &file_network_service_proto_network_proto_msgTypes[7] 404 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 405 ms.StoreMessageInfo(mi) 406 } 407 } 408 409 func (x *RoutesRequest) String() string { 410 return protoimpl.X.MessageStringOf(x) 411 } 412 413 func (*RoutesRequest) ProtoMessage() {} 414 415 func (x *RoutesRequest) ProtoReflect() protoreflect.Message { 416 mi := &file_network_service_proto_network_proto_msgTypes[7] 417 if protoimpl.UnsafeEnabled && x != nil { 418 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 419 if ms.LoadMessageInfo() == nil { 420 ms.StoreMessageInfo(mi) 421 } 422 return ms 423 } 424 return mi.MessageOf(x) 425 } 426 427 // Deprecated: Use RoutesRequest.ProtoReflect.Descriptor instead. 428 func (*RoutesRequest) Descriptor() ([]byte, []int) { 429 return file_network_service_proto_network_proto_rawDescGZIP(), []int{7} 430 } 431 432 func (x *RoutesRequest) GetQuery() *Query { 433 if x != nil { 434 return x.Query 435 } 436 return nil 437 } 438 439 type RoutesResponse struct { 440 state protoimpl.MessageState 441 sizeCache protoimpl.SizeCache 442 unknownFields protoimpl.UnknownFields 443 444 Routes []*proto1.Route `protobuf:"bytes,1,rep,name=routes,proto3" json:"routes,omitempty"` 445 } 446 447 func (x *RoutesResponse) Reset() { 448 *x = RoutesResponse{} 449 if protoimpl.UnsafeEnabled { 450 mi := &file_network_service_proto_network_proto_msgTypes[8] 451 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 452 ms.StoreMessageInfo(mi) 453 } 454 } 455 456 func (x *RoutesResponse) String() string { 457 return protoimpl.X.MessageStringOf(x) 458 } 459 460 func (*RoutesResponse) ProtoMessage() {} 461 462 func (x *RoutesResponse) ProtoReflect() protoreflect.Message { 463 mi := &file_network_service_proto_network_proto_msgTypes[8] 464 if protoimpl.UnsafeEnabled && x != nil { 465 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 466 if ms.LoadMessageInfo() == nil { 467 ms.StoreMessageInfo(mi) 468 } 469 return ms 470 } 471 return mi.MessageOf(x) 472 } 473 474 // Deprecated: Use RoutesResponse.ProtoReflect.Descriptor instead. 475 func (*RoutesResponse) Descriptor() ([]byte, []int) { 476 return file_network_service_proto_network_proto_rawDescGZIP(), []int{8} 477 } 478 479 func (x *RoutesResponse) GetRoutes() []*proto1.Route { 480 if x != nil { 481 return x.Routes 482 } 483 return nil 484 } 485 486 type ServicesRequest struct { 487 state protoimpl.MessageState 488 sizeCache protoimpl.SizeCache 489 unknownFields protoimpl.UnknownFields 490 } 491 492 func (x *ServicesRequest) Reset() { 493 *x = ServicesRequest{} 494 if protoimpl.UnsafeEnabled { 495 mi := &file_network_service_proto_network_proto_msgTypes[9] 496 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 497 ms.StoreMessageInfo(mi) 498 } 499 } 500 501 func (x *ServicesRequest) String() string { 502 return protoimpl.X.MessageStringOf(x) 503 } 504 505 func (*ServicesRequest) ProtoMessage() {} 506 507 func (x *ServicesRequest) ProtoReflect() protoreflect.Message { 508 mi := &file_network_service_proto_network_proto_msgTypes[9] 509 if protoimpl.UnsafeEnabled && x != nil { 510 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 511 if ms.LoadMessageInfo() == nil { 512 ms.StoreMessageInfo(mi) 513 } 514 return ms 515 } 516 return mi.MessageOf(x) 517 } 518 519 // Deprecated: Use ServicesRequest.ProtoReflect.Descriptor instead. 520 func (*ServicesRequest) Descriptor() ([]byte, []int) { 521 return file_network_service_proto_network_proto_rawDescGZIP(), []int{9} 522 } 523 524 type ServicesResponse struct { 525 state protoimpl.MessageState 526 sizeCache protoimpl.SizeCache 527 unknownFields protoimpl.UnknownFields 528 529 Services []string `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` 530 } 531 532 func (x *ServicesResponse) Reset() { 533 *x = ServicesResponse{} 534 if protoimpl.UnsafeEnabled { 535 mi := &file_network_service_proto_network_proto_msgTypes[10] 536 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 537 ms.StoreMessageInfo(mi) 538 } 539 } 540 541 func (x *ServicesResponse) String() string { 542 return protoimpl.X.MessageStringOf(x) 543 } 544 545 func (*ServicesResponse) ProtoMessage() {} 546 547 func (x *ServicesResponse) ProtoReflect() protoreflect.Message { 548 mi := &file_network_service_proto_network_proto_msgTypes[10] 549 if protoimpl.UnsafeEnabled && x != nil { 550 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 551 if ms.LoadMessageInfo() == nil { 552 ms.StoreMessageInfo(mi) 553 } 554 return ms 555 } 556 return mi.MessageOf(x) 557 } 558 559 // Deprecated: Use ServicesResponse.ProtoReflect.Descriptor instead. 560 func (*ServicesResponse) Descriptor() ([]byte, []int) { 561 return file_network_service_proto_network_proto_rawDescGZIP(), []int{10} 562 } 563 564 func (x *ServicesResponse) GetServices() []string { 565 if x != nil { 566 return x.Services 567 } 568 return nil 569 } 570 571 type StatusRequest struct { 572 state protoimpl.MessageState 573 sizeCache protoimpl.SizeCache 574 unknownFields protoimpl.UnknownFields 575 } 576 577 func (x *StatusRequest) Reset() { 578 *x = StatusRequest{} 579 if protoimpl.UnsafeEnabled { 580 mi := &file_network_service_proto_network_proto_msgTypes[11] 581 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 582 ms.StoreMessageInfo(mi) 583 } 584 } 585 586 func (x *StatusRequest) String() string { 587 return protoimpl.X.MessageStringOf(x) 588 } 589 590 func (*StatusRequest) ProtoMessage() {} 591 592 func (x *StatusRequest) ProtoReflect() protoreflect.Message { 593 mi := &file_network_service_proto_network_proto_msgTypes[11] 594 if protoimpl.UnsafeEnabled && x != nil { 595 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 596 if ms.LoadMessageInfo() == nil { 597 ms.StoreMessageInfo(mi) 598 } 599 return ms 600 } 601 return mi.MessageOf(x) 602 } 603 604 // Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead. 605 func (*StatusRequest) Descriptor() ([]byte, []int) { 606 return file_network_service_proto_network_proto_rawDescGZIP(), []int{11} 607 } 608 609 type StatusResponse struct { 610 state protoimpl.MessageState 611 sizeCache protoimpl.SizeCache 612 unknownFields protoimpl.UnknownFields 613 614 Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` 615 } 616 617 func (x *StatusResponse) Reset() { 618 *x = StatusResponse{} 619 if protoimpl.UnsafeEnabled { 620 mi := &file_network_service_proto_network_proto_msgTypes[12] 621 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 622 ms.StoreMessageInfo(mi) 623 } 624 } 625 626 func (x *StatusResponse) String() string { 627 return protoimpl.X.MessageStringOf(x) 628 } 629 630 func (*StatusResponse) ProtoMessage() {} 631 632 func (x *StatusResponse) ProtoReflect() protoreflect.Message { 633 mi := &file_network_service_proto_network_proto_msgTypes[12] 634 if protoimpl.UnsafeEnabled && x != nil { 635 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 636 if ms.LoadMessageInfo() == nil { 637 ms.StoreMessageInfo(mi) 638 } 639 return ms 640 } 641 return mi.MessageOf(x) 642 } 643 644 // Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead. 645 func (*StatusResponse) Descriptor() ([]byte, []int) { 646 return file_network_service_proto_network_proto_rawDescGZIP(), []int{12} 647 } 648 649 func (x *StatusResponse) GetStatus() *Status { 650 if x != nil { 651 return x.Status 652 } 653 return nil 654 } 655 656 // Error tracks network errors 657 type Error struct { 658 state protoimpl.MessageState 659 sizeCache protoimpl.SizeCache 660 unknownFields protoimpl.UnknownFields 661 662 Count uint32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` 663 Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` 664 } 665 666 func (x *Error) Reset() { 667 *x = Error{} 668 if protoimpl.UnsafeEnabled { 669 mi := &file_network_service_proto_network_proto_msgTypes[13] 670 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 671 ms.StoreMessageInfo(mi) 672 } 673 } 674 675 func (x *Error) String() string { 676 return protoimpl.X.MessageStringOf(x) 677 } 678 679 func (*Error) ProtoMessage() {} 680 681 func (x *Error) ProtoReflect() protoreflect.Message { 682 mi := &file_network_service_proto_network_proto_msgTypes[13] 683 if protoimpl.UnsafeEnabled && x != nil { 684 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 685 if ms.LoadMessageInfo() == nil { 686 ms.StoreMessageInfo(mi) 687 } 688 return ms 689 } 690 return mi.MessageOf(x) 691 } 692 693 // Deprecated: Use Error.ProtoReflect.Descriptor instead. 694 func (*Error) Descriptor() ([]byte, []int) { 695 return file_network_service_proto_network_proto_rawDescGZIP(), []int{13} 696 } 697 698 func (x *Error) GetCount() uint32 { 699 if x != nil { 700 return x.Count 701 } 702 return 0 703 } 704 705 func (x *Error) GetMsg() string { 706 if x != nil { 707 return x.Msg 708 } 709 return "" 710 } 711 712 // Status is node status 713 type Status struct { 714 state protoimpl.MessageState 715 sizeCache protoimpl.SizeCache 716 unknownFields protoimpl.UnknownFields 717 718 Error *Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` 719 } 720 721 func (x *Status) Reset() { 722 *x = Status{} 723 if protoimpl.UnsafeEnabled { 724 mi := &file_network_service_proto_network_proto_msgTypes[14] 725 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 726 ms.StoreMessageInfo(mi) 727 } 728 } 729 730 func (x *Status) String() string { 731 return protoimpl.X.MessageStringOf(x) 732 } 733 734 func (*Status) ProtoMessage() {} 735 736 func (x *Status) ProtoReflect() protoreflect.Message { 737 mi := &file_network_service_proto_network_proto_msgTypes[14] 738 if protoimpl.UnsafeEnabled && x != nil { 739 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 740 if ms.LoadMessageInfo() == nil { 741 ms.StoreMessageInfo(mi) 742 } 743 return ms 744 } 745 return mi.MessageOf(x) 746 } 747 748 // Deprecated: Use Status.ProtoReflect.Descriptor instead. 749 func (*Status) Descriptor() ([]byte, []int) { 750 return file_network_service_proto_network_proto_rawDescGZIP(), []int{14} 751 } 752 753 func (x *Status) GetError() *Error { 754 if x != nil { 755 return x.Error 756 } 757 return nil 758 } 759 760 // Node is network node 761 type Node struct { 762 state protoimpl.MessageState 763 sizeCache protoimpl.SizeCache 764 unknownFields protoimpl.UnknownFields 765 766 // node id 767 Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 768 // node address 769 Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` 770 // the network 771 Network string `protobuf:"bytes,3,opt,name=network,proto3" json:"network,omitempty"` 772 // associated metadata 773 Metadata map[string]string `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 774 // node status 775 Status *Status `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` 776 } 777 778 func (x *Node) Reset() { 779 *x = Node{} 780 if protoimpl.UnsafeEnabled { 781 mi := &file_network_service_proto_network_proto_msgTypes[15] 782 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 783 ms.StoreMessageInfo(mi) 784 } 785 } 786 787 func (x *Node) String() string { 788 return protoimpl.X.MessageStringOf(x) 789 } 790 791 func (*Node) ProtoMessage() {} 792 793 func (x *Node) ProtoReflect() protoreflect.Message { 794 mi := &file_network_service_proto_network_proto_msgTypes[15] 795 if protoimpl.UnsafeEnabled && x != nil { 796 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 797 if ms.LoadMessageInfo() == nil { 798 ms.StoreMessageInfo(mi) 799 } 800 return ms 801 } 802 return mi.MessageOf(x) 803 } 804 805 // Deprecated: Use Node.ProtoReflect.Descriptor instead. 806 func (*Node) Descriptor() ([]byte, []int) { 807 return file_network_service_proto_network_proto_rawDescGZIP(), []int{15} 808 } 809 810 func (x *Node) GetId() string { 811 if x != nil { 812 return x.Id 813 } 814 return "" 815 } 816 817 func (x *Node) GetAddress() string { 818 if x != nil { 819 return x.Address 820 } 821 return "" 822 } 823 824 func (x *Node) GetNetwork() string { 825 if x != nil { 826 return x.Network 827 } 828 return "" 829 } 830 831 func (x *Node) GetMetadata() map[string]string { 832 if x != nil { 833 return x.Metadata 834 } 835 return nil 836 } 837 838 func (x *Node) GetStatus() *Status { 839 if x != nil { 840 return x.Status 841 } 842 return nil 843 } 844 845 // Connect is sent when the node connects to the network 846 type Connect struct { 847 state protoimpl.MessageState 848 sizeCache protoimpl.SizeCache 849 unknownFields protoimpl.UnknownFields 850 851 // network mode 852 Node *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` 853 } 854 855 func (x *Connect) Reset() { 856 *x = Connect{} 857 if protoimpl.UnsafeEnabled { 858 mi := &file_network_service_proto_network_proto_msgTypes[16] 859 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 860 ms.StoreMessageInfo(mi) 861 } 862 } 863 864 func (x *Connect) String() string { 865 return protoimpl.X.MessageStringOf(x) 866 } 867 868 func (*Connect) ProtoMessage() {} 869 870 func (x *Connect) ProtoReflect() protoreflect.Message { 871 mi := &file_network_service_proto_network_proto_msgTypes[16] 872 if protoimpl.UnsafeEnabled && x != nil { 873 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 874 if ms.LoadMessageInfo() == nil { 875 ms.StoreMessageInfo(mi) 876 } 877 return ms 878 } 879 return mi.MessageOf(x) 880 } 881 882 // Deprecated: Use Connect.ProtoReflect.Descriptor instead. 883 func (*Connect) Descriptor() ([]byte, []int) { 884 return file_network_service_proto_network_proto_rawDescGZIP(), []int{16} 885 } 886 887 func (x *Connect) GetNode() *Node { 888 if x != nil { 889 return x.Node 890 } 891 return nil 892 } 893 894 // Close is sent when the node disconnects from the network 895 type Close struct { 896 state protoimpl.MessageState 897 sizeCache protoimpl.SizeCache 898 unknownFields protoimpl.UnknownFields 899 900 // network node 901 Node *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` 902 } 903 904 func (x *Close) Reset() { 905 *x = Close{} 906 if protoimpl.UnsafeEnabled { 907 mi := &file_network_service_proto_network_proto_msgTypes[17] 908 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 909 ms.StoreMessageInfo(mi) 910 } 911 } 912 913 func (x *Close) String() string { 914 return protoimpl.X.MessageStringOf(x) 915 } 916 917 func (*Close) ProtoMessage() {} 918 919 func (x *Close) ProtoReflect() protoreflect.Message { 920 mi := &file_network_service_proto_network_proto_msgTypes[17] 921 if protoimpl.UnsafeEnabled && x != nil { 922 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 923 if ms.LoadMessageInfo() == nil { 924 ms.StoreMessageInfo(mi) 925 } 926 return ms 927 } 928 return mi.MessageOf(x) 929 } 930 931 // Deprecated: Use Close.ProtoReflect.Descriptor instead. 932 func (*Close) Descriptor() ([]byte, []int) { 933 return file_network_service_proto_network_proto_rawDescGZIP(), []int{17} 934 } 935 936 func (x *Close) GetNode() *Node { 937 if x != nil { 938 return x.Node 939 } 940 return nil 941 } 942 943 // Peer is used to advertise node peers 944 type Peer struct { 945 state protoimpl.MessageState 946 sizeCache protoimpl.SizeCache 947 unknownFields protoimpl.UnknownFields 948 949 // network node 950 Node *Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` 951 // node peers 952 Peers []*Peer `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"` 953 } 954 955 func (x *Peer) Reset() { 956 *x = Peer{} 957 if protoimpl.UnsafeEnabled { 958 mi := &file_network_service_proto_network_proto_msgTypes[18] 959 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 960 ms.StoreMessageInfo(mi) 961 } 962 } 963 964 func (x *Peer) String() string { 965 return protoimpl.X.MessageStringOf(x) 966 } 967 968 func (*Peer) ProtoMessage() {} 969 970 func (x *Peer) ProtoReflect() protoreflect.Message { 971 mi := &file_network_service_proto_network_proto_msgTypes[18] 972 if protoimpl.UnsafeEnabled && x != nil { 973 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 974 if ms.LoadMessageInfo() == nil { 975 ms.StoreMessageInfo(mi) 976 } 977 return ms 978 } 979 return mi.MessageOf(x) 980 } 981 982 // Deprecated: Use Peer.ProtoReflect.Descriptor instead. 983 func (*Peer) Descriptor() ([]byte, []int) { 984 return file_network_service_proto_network_proto_rawDescGZIP(), []int{18} 985 } 986 987 func (x *Peer) GetNode() *Node { 988 if x != nil { 989 return x.Node 990 } 991 return nil 992 } 993 994 func (x *Peer) GetPeers() []*Peer { 995 if x != nil { 996 return x.Peers 997 } 998 return nil 999 } 1000 1001 // Sync is network sync message 1002 type Sync struct { 1003 state protoimpl.MessageState 1004 sizeCache protoimpl.SizeCache 1005 unknownFields protoimpl.UnknownFields 1006 1007 // peer origin 1008 Peer *Peer `protobuf:"bytes,1,opt,name=peer,proto3" json:"peer,omitempty"` 1009 // node routes 1010 Routes []*proto1.Route `protobuf:"bytes,2,rep,name=routes,proto3" json:"routes,omitempty"` 1011 } 1012 1013 func (x *Sync) Reset() { 1014 *x = Sync{} 1015 if protoimpl.UnsafeEnabled { 1016 mi := &file_network_service_proto_network_proto_msgTypes[19] 1017 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 1018 ms.StoreMessageInfo(mi) 1019 } 1020 } 1021 1022 func (x *Sync) String() string { 1023 return protoimpl.X.MessageStringOf(x) 1024 } 1025 1026 func (*Sync) ProtoMessage() {} 1027 1028 func (x *Sync) ProtoReflect() protoreflect.Message { 1029 mi := &file_network_service_proto_network_proto_msgTypes[19] 1030 if protoimpl.UnsafeEnabled && x != nil { 1031 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 1032 if ms.LoadMessageInfo() == nil { 1033 ms.StoreMessageInfo(mi) 1034 } 1035 return ms 1036 } 1037 return mi.MessageOf(x) 1038 } 1039 1040 // Deprecated: Use Sync.ProtoReflect.Descriptor instead. 1041 func (*Sync) Descriptor() ([]byte, []int) { 1042 return file_network_service_proto_network_proto_rawDescGZIP(), []int{19} 1043 } 1044 1045 func (x *Sync) GetPeer() *Peer { 1046 if x != nil { 1047 return x.Peer 1048 } 1049 return nil 1050 } 1051 1052 func (x *Sync) GetRoutes() []*proto1.Route { 1053 if x != nil { 1054 return x.Routes 1055 } 1056 return nil 1057 } 1058 1059 var File_network_service_proto_network_proto protoreflect.FileDescriptor 1060 1061 var file_network_service_proto_network_proto_rawDesc = []byte{ 1062 0x0a, 0x23, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 1063 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 1064 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 1065 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x1a, 0x21, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2f, 1066 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x6f, 1067 0x75, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x01, 0x0a, 0x05, 0x51, 1068 0x75, 0x65, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 1069 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x18, 1070 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 1071 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x61, 0x74, 0x65, 1072 0x77, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x61, 0x74, 0x65, 0x77, 1073 0x61, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 1074 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 1075 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 1076 0x77, 0x6f, 0x72, 0x6b, 0x22, 0x3e, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 1077 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 1078 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 1079 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 1080 0x6f, 0x64, 0x65, 0x73, 0x22, 0x11, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 1081 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x0a, 0x0c, 0x4e, 0x6f, 0x64, 0x65, 0x73, 1082 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 1083 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x22, 0x3d, 0x0a, 1084 0x0d, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 1085 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 1086 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 1087 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x24, 0x0a, 0x0c, 1088 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 1089 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x64, 0x65, 0x70, 1090 0x74, 0x68, 0x22, 0x3b, 0x0a, 0x0d, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 1091 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 1092 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6e, 0x65, 0x74, 1093 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x22, 1094 0x3e, 0x0a, 0x0d, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 1095 0x12, 0x2d, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 1096 0x17, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 1097 0x72, 0x6b, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 1098 0x40, 0x0a, 0x0e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 1099 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 1100 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x72, 0x6f, 0x75, 1101 0x74, 0x65, 0x72, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 1102 0x73, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 1103 0x75, 0x65, 0x73, 0x74, 0x22, 0x2e, 0x0a, 0x10, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 1104 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 1105 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 1106 0x69, 0x63, 0x65, 0x73, 0x22, 0x0f, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 1107 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x42, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 1108 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 1109 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 1110 0x72, 0x6f, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 1111 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x2f, 0x0a, 0x05, 0x45, 0x72, 0x72, 1112 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 1113 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 1114 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x37, 0x0a, 0x06, 0x53, 0x74, 1115 0x61, 0x74, 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 1116 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6e, 1117 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 1118 0x72, 0x6f, 0x72, 0x22, 0xfb, 0x01, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 1119 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 1120 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 1121 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 1122 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 1123 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 1124 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6e, 0x65, 1125 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 1126 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 1127 0x74, 0x61, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 1128 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6e, 0x65, 1129 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 1130 0x61, 0x74, 0x75, 0x73, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 1131 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 1132 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 1133 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 1134 0x01, 0x22, 0x35, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x2a, 0x0a, 0x04, 1135 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x2e, 1136 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x4e, 0x6f, 1137 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x22, 0x33, 0x0a, 0x05, 0x43, 0x6c, 0x6f, 0x73, 1138 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 1139 0x16, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 1140 0x72, 0x6b, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x22, 0x60, 0x0a, 1141 0x04, 0x50, 0x65, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 1142 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6e, 1143 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 1144 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 1145 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6e, 0x65, 0x74, 0x77, 1146 0x6f, 0x72, 0x6b, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x22, 1147 0x62, 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x2a, 0x0a, 0x04, 0x70, 0x65, 0x65, 0x72, 0x18, 1148 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 1149 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x04, 0x70, 1150 0x65, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 1151 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x72, 1152 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x06, 0x72, 0x6f, 0x75, 1153 0x74, 0x65, 0x73, 0x32, 0xe6, 0x03, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 1154 0x50, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x20, 0x2e, 0x67, 0x6f, 0x2e, 1155 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x43, 0x6f, 1156 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 1157 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 1158 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 1159 0x00, 0x12, 0x4a, 0x0a, 0x05, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x2e, 1160 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x47, 0x72, 1161 0x61, 0x70, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x6f, 0x2e, 1162 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x47, 0x72, 1163 0x61, 0x70, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4a, 0x0a, 1164 0x05, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 1165 0x6f, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 1166 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 1167 0x6f, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 1168 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x06, 0x52, 0x6f, 0x75, 1169 0x74, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6e, 1170 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 1171 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 1172 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 1173 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x08, 0x53, 0x65, 0x72, 0x76, 1174 0x69, 0x63, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 1175 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 1176 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 1177 0x72, 0x6f, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 1178 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, 0x0a, 1179 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 1180 0x72, 0x6f, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 1181 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 1182 0x63, 0x72, 0x6f, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x53, 0x74, 0x61, 0x74, 1183 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x62, 0x06, 0x70, 0x72, 1184 0x6f, 0x74, 0x6f, 0x33, 1185 } 1186 1187 var ( 1188 file_network_service_proto_network_proto_rawDescOnce sync.Once 1189 file_network_service_proto_network_proto_rawDescData = file_network_service_proto_network_proto_rawDesc 1190 ) 1191 1192 func file_network_service_proto_network_proto_rawDescGZIP() []byte { 1193 file_network_service_proto_network_proto_rawDescOnce.Do(func() { 1194 file_network_service_proto_network_proto_rawDescData = protoimpl.X.CompressGZIP(file_network_service_proto_network_proto_rawDescData) 1195 }) 1196 return file_network_service_proto_network_proto_rawDescData 1197 } 1198 1199 var file_network_service_proto_network_proto_msgTypes = make([]protoimpl.MessageInfo, 21) 1200 var file_network_service_proto_network_proto_goTypes = []interface{}{ 1201 (*Query)(nil), // 0: go.micro.network.Query 1202 (*ConnectRequest)(nil), // 1: go.micro.network.ConnectRequest 1203 (*ConnectResponse)(nil), // 2: go.micro.network.ConnectResponse 1204 (*NodesRequest)(nil), // 3: go.micro.network.NodesRequest 1205 (*NodesResponse)(nil), // 4: go.micro.network.NodesResponse 1206 (*GraphRequest)(nil), // 5: go.micro.network.GraphRequest 1207 (*GraphResponse)(nil), // 6: go.micro.network.GraphResponse 1208 (*RoutesRequest)(nil), // 7: go.micro.network.RoutesRequest 1209 (*RoutesResponse)(nil), // 8: go.micro.network.RoutesResponse 1210 (*ServicesRequest)(nil), // 9: go.micro.network.ServicesRequest 1211 (*ServicesResponse)(nil), // 10: go.micro.network.ServicesResponse 1212 (*StatusRequest)(nil), // 11: go.micro.network.StatusRequest 1213 (*StatusResponse)(nil), // 12: go.micro.network.StatusResponse 1214 (*Error)(nil), // 13: go.micro.network.Error 1215 (*Status)(nil), // 14: go.micro.network.Status 1216 (*Node)(nil), // 15: go.micro.network.Node 1217 (*Connect)(nil), // 16: go.micro.network.Connect 1218 (*Close)(nil), // 17: go.micro.network.Close 1219 (*Peer)(nil), // 18: go.micro.network.Peer 1220 (*Sync)(nil), // 19: go.micro.network.Sync 1221 nil, // 20: go.micro.network.Node.MetadataEntry 1222 (*proto1.Route)(nil), // 21: go.micro.router.Route 1223 } 1224 var file_network_service_proto_network_proto_depIdxs = []int32{ 1225 15, // 0: go.micro.network.ConnectRequest.nodes:type_name -> go.micro.network.Node 1226 15, // 1: go.micro.network.NodesResponse.nodes:type_name -> go.micro.network.Node 1227 18, // 2: go.micro.network.GraphResponse.root:type_name -> go.micro.network.Peer 1228 0, // 3: go.micro.network.RoutesRequest.query:type_name -> go.micro.network.Query 1229 21, // 4: go.micro.network.RoutesResponse.routes:type_name -> go.micro.router.Route 1230 14, // 5: go.micro.network.StatusResponse.status:type_name -> go.micro.network.Status 1231 13, // 6: go.micro.network.Status.error:type_name -> go.micro.network.Error 1232 20, // 7: go.micro.network.Node.metadata:type_name -> go.micro.network.Node.MetadataEntry 1233 14, // 8: go.micro.network.Node.status:type_name -> go.micro.network.Status 1234 15, // 9: go.micro.network.Connect.node:type_name -> go.micro.network.Node 1235 15, // 10: go.micro.network.Close.node:type_name -> go.micro.network.Node 1236 15, // 11: go.micro.network.Peer.node:type_name -> go.micro.network.Node 1237 18, // 12: go.micro.network.Peer.peers:type_name -> go.micro.network.Peer 1238 18, // 13: go.micro.network.Sync.peer:type_name -> go.micro.network.Peer 1239 21, // 14: go.micro.network.Sync.routes:type_name -> go.micro.router.Route 1240 1, // 15: go.micro.network.Network.Connect:input_type -> go.micro.network.ConnectRequest 1241 5, // 16: go.micro.network.Network.Graph:input_type -> go.micro.network.GraphRequest 1242 3, // 17: go.micro.network.Network.Nodes:input_type -> go.micro.network.NodesRequest 1243 7, // 18: go.micro.network.Network.Routes:input_type -> go.micro.network.RoutesRequest 1244 9, // 19: go.micro.network.Network.Services:input_type -> go.micro.network.ServicesRequest 1245 11, // 20: go.micro.network.Network.Status:input_type -> go.micro.network.StatusRequest 1246 2, // 21: go.micro.network.Network.Connect:output_type -> go.micro.network.ConnectResponse 1247 6, // 22: go.micro.network.Network.Graph:output_type -> go.micro.network.GraphResponse 1248 4, // 23: go.micro.network.Network.Nodes:output_type -> go.micro.network.NodesResponse 1249 8, // 24: go.micro.network.Network.Routes:output_type -> go.micro.network.RoutesResponse 1250 10, // 25: go.micro.network.Network.Services:output_type -> go.micro.network.ServicesResponse 1251 12, // 26: go.micro.network.Network.Status:output_type -> go.micro.network.StatusResponse 1252 21, // [21:27] is the sub-list for method output_type 1253 15, // [15:21] is the sub-list for method input_type 1254 15, // [15:15] is the sub-list for extension type_name 1255 15, // [15:15] is the sub-list for extension extendee 1256 0, // [0:15] is the sub-list for field type_name 1257 } 1258 1259 func init() { file_network_service_proto_network_proto_init() } 1260 func file_network_service_proto_network_proto_init() { 1261 if File_network_service_proto_network_proto != nil { 1262 return 1263 } 1264 if !protoimpl.UnsafeEnabled { 1265 file_network_service_proto_network_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 1266 switch v := v.(*Query); i { 1267 case 0: 1268 return &v.state 1269 case 1: 1270 return &v.sizeCache 1271 case 2: 1272 return &v.unknownFields 1273 default: 1274 return nil 1275 } 1276 } 1277 file_network_service_proto_network_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 1278 switch v := v.(*ConnectRequest); i { 1279 case 0: 1280 return &v.state 1281 case 1: 1282 return &v.sizeCache 1283 case 2: 1284 return &v.unknownFields 1285 default: 1286 return nil 1287 } 1288 } 1289 file_network_service_proto_network_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 1290 switch v := v.(*ConnectResponse); i { 1291 case 0: 1292 return &v.state 1293 case 1: 1294 return &v.sizeCache 1295 case 2: 1296 return &v.unknownFields 1297 default: 1298 return nil 1299 } 1300 } 1301 file_network_service_proto_network_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { 1302 switch v := v.(*NodesRequest); i { 1303 case 0: 1304 return &v.state 1305 case 1: 1306 return &v.sizeCache 1307 case 2: 1308 return &v.unknownFields 1309 default: 1310 return nil 1311 } 1312 } 1313 file_network_service_proto_network_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { 1314 switch v := v.(*NodesResponse); i { 1315 case 0: 1316 return &v.state 1317 case 1: 1318 return &v.sizeCache 1319 case 2: 1320 return &v.unknownFields 1321 default: 1322 return nil 1323 } 1324 } 1325 file_network_service_proto_network_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { 1326 switch v := v.(*GraphRequest); i { 1327 case 0: 1328 return &v.state 1329 case 1: 1330 return &v.sizeCache 1331 case 2: 1332 return &v.unknownFields 1333 default: 1334 return nil 1335 } 1336 } 1337 file_network_service_proto_network_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { 1338 switch v := v.(*GraphResponse); i { 1339 case 0: 1340 return &v.state 1341 case 1: 1342 return &v.sizeCache 1343 case 2: 1344 return &v.unknownFields 1345 default: 1346 return nil 1347 } 1348 } 1349 file_network_service_proto_network_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { 1350 switch v := v.(*RoutesRequest); i { 1351 case 0: 1352 return &v.state 1353 case 1: 1354 return &v.sizeCache 1355 case 2: 1356 return &v.unknownFields 1357 default: 1358 return nil 1359 } 1360 } 1361 file_network_service_proto_network_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { 1362 switch v := v.(*RoutesResponse); i { 1363 case 0: 1364 return &v.state 1365 case 1: 1366 return &v.sizeCache 1367 case 2: 1368 return &v.unknownFields 1369 default: 1370 return nil 1371 } 1372 } 1373 file_network_service_proto_network_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { 1374 switch v := v.(*ServicesRequest); i { 1375 case 0: 1376 return &v.state 1377 case 1: 1378 return &v.sizeCache 1379 case 2: 1380 return &v.unknownFields 1381 default: 1382 return nil 1383 } 1384 } 1385 file_network_service_proto_network_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { 1386 switch v := v.(*ServicesResponse); i { 1387 case 0: 1388 return &v.state 1389 case 1: 1390 return &v.sizeCache 1391 case 2: 1392 return &v.unknownFields 1393 default: 1394 return nil 1395 } 1396 } 1397 file_network_service_proto_network_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { 1398 switch v := v.(*StatusRequest); i { 1399 case 0: 1400 return &v.state 1401 case 1: 1402 return &v.sizeCache 1403 case 2: 1404 return &v.unknownFields 1405 default: 1406 return nil 1407 } 1408 } 1409 file_network_service_proto_network_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { 1410 switch v := v.(*StatusResponse); i { 1411 case 0: 1412 return &v.state 1413 case 1: 1414 return &v.sizeCache 1415 case 2: 1416 return &v.unknownFields 1417 default: 1418 return nil 1419 } 1420 } 1421 file_network_service_proto_network_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { 1422 switch v := v.(*Error); i { 1423 case 0: 1424 return &v.state 1425 case 1: 1426 return &v.sizeCache 1427 case 2: 1428 return &v.unknownFields 1429 default: 1430 return nil 1431 } 1432 } 1433 file_network_service_proto_network_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { 1434 switch v := v.(*Status); i { 1435 case 0: 1436 return &v.state 1437 case 1: 1438 return &v.sizeCache 1439 case 2: 1440 return &v.unknownFields 1441 default: 1442 return nil 1443 } 1444 } 1445 file_network_service_proto_network_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { 1446 switch v := v.(*Node); i { 1447 case 0: 1448 return &v.state 1449 case 1: 1450 return &v.sizeCache 1451 case 2: 1452 return &v.unknownFields 1453 default: 1454 return nil 1455 } 1456 } 1457 file_network_service_proto_network_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { 1458 switch v := v.(*Connect); i { 1459 case 0: 1460 return &v.state 1461 case 1: 1462 return &v.sizeCache 1463 case 2: 1464 return &v.unknownFields 1465 default: 1466 return nil 1467 } 1468 } 1469 file_network_service_proto_network_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { 1470 switch v := v.(*Close); i { 1471 case 0: 1472 return &v.state 1473 case 1: 1474 return &v.sizeCache 1475 case 2: 1476 return &v.unknownFields 1477 default: 1478 return nil 1479 } 1480 } 1481 file_network_service_proto_network_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { 1482 switch v := v.(*Peer); i { 1483 case 0: 1484 return &v.state 1485 case 1: 1486 return &v.sizeCache 1487 case 2: 1488 return &v.unknownFields 1489 default: 1490 return nil 1491 } 1492 } 1493 file_network_service_proto_network_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { 1494 switch v := v.(*Sync); i { 1495 case 0: 1496 return &v.state 1497 case 1: 1498 return &v.sizeCache 1499 case 2: 1500 return &v.unknownFields 1501 default: 1502 return nil 1503 } 1504 } 1505 } 1506 type x struct{} 1507 out := protoimpl.TypeBuilder{ 1508 File: protoimpl.DescBuilder{ 1509 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 1510 RawDescriptor: file_network_service_proto_network_proto_rawDesc, 1511 NumEnums: 0, 1512 NumMessages: 21, 1513 NumExtensions: 0, 1514 NumServices: 1, 1515 }, 1516 GoTypes: file_network_service_proto_network_proto_goTypes, 1517 DependencyIndexes: file_network_service_proto_network_proto_depIdxs, 1518 MessageInfos: file_network_service_proto_network_proto_msgTypes, 1519 }.Build() 1520 File_network_service_proto_network_proto = out.File 1521 file_network_service_proto_network_proto_rawDesc = nil 1522 file_network_service_proto_network_proto_goTypes = nil 1523 file_network_service_proto_network_proto_depIdxs = nil 1524 } 1525 1526 // Reference imports to suppress errors if they are not otherwise used. 1527 var _ context.Context 1528 var _ grpc.ClientConnInterface 1529 1530 // This is a compile-time assertion to ensure that this generated file 1531 // is compatible with the grpc package it is being compiled against. 1532 const _ = grpc.SupportPackageIsVersion6 1533 1534 // NetworkClient is the client API for Network service. 1535 // 1536 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 1537 type NetworkClient interface { 1538 // Connect to the network 1539 Connect(ctx context.Context, in *ConnectRequest, opts ...grpc.CallOption) (*ConnectResponse, error) 1540 // Returns the entire network graph 1541 Graph(ctx context.Context, in *GraphRequest, opts ...grpc.CallOption) (*GraphResponse, error) 1542 // Returns a list of known nodes in the network 1543 Nodes(ctx context.Context, in *NodesRequest, opts ...grpc.CallOption) (*NodesResponse, error) 1544 // Returns a list of known routes in the network 1545 Routes(ctx context.Context, in *RoutesRequest, opts ...grpc.CallOption) (*RoutesResponse, error) 1546 // Returns a list of known services based on routes 1547 Services(ctx context.Context, in *ServicesRequest, opts ...grpc.CallOption) (*ServicesResponse, error) 1548 // Status returns network status 1549 Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) 1550 } 1551 1552 type networkClient struct { 1553 cc grpc.ClientConnInterface 1554 } 1555 1556 func NewNetworkClient(cc grpc.ClientConnInterface) NetworkClient { 1557 return &networkClient{cc} 1558 } 1559 1560 func (c *networkClient) Connect(ctx context.Context, in *ConnectRequest, opts ...grpc.CallOption) (*ConnectResponse, error) { 1561 out := new(ConnectResponse) 1562 err := c.cc.Invoke(ctx, "/go.micro.network.Network/Connect", in, out, opts...) 1563 if err != nil { 1564 return nil, err 1565 } 1566 return out, nil 1567 } 1568 1569 func (c *networkClient) Graph(ctx context.Context, in *GraphRequest, opts ...grpc.CallOption) (*GraphResponse, error) { 1570 out := new(GraphResponse) 1571 err := c.cc.Invoke(ctx, "/go.micro.network.Network/Graph", in, out, opts...) 1572 if err != nil { 1573 return nil, err 1574 } 1575 return out, nil 1576 } 1577 1578 func (c *networkClient) Nodes(ctx context.Context, in *NodesRequest, opts ...grpc.CallOption) (*NodesResponse, error) { 1579 out := new(NodesResponse) 1580 err := c.cc.Invoke(ctx, "/go.micro.network.Network/Nodes", in, out, opts...) 1581 if err != nil { 1582 return nil, err 1583 } 1584 return out, nil 1585 } 1586 1587 func (c *networkClient) Routes(ctx context.Context, in *RoutesRequest, opts ...grpc.CallOption) (*RoutesResponse, error) { 1588 out := new(RoutesResponse) 1589 err := c.cc.Invoke(ctx, "/go.micro.network.Network/Routes", in, out, opts...) 1590 if err != nil { 1591 return nil, err 1592 } 1593 return out, nil 1594 } 1595 1596 func (c *networkClient) Services(ctx context.Context, in *ServicesRequest, opts ...grpc.CallOption) (*ServicesResponse, error) { 1597 out := new(ServicesResponse) 1598 err := c.cc.Invoke(ctx, "/go.micro.network.Network/Services", in, out, opts...) 1599 if err != nil { 1600 return nil, err 1601 } 1602 return out, nil 1603 } 1604 1605 func (c *networkClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) { 1606 out := new(StatusResponse) 1607 err := c.cc.Invoke(ctx, "/go.micro.network.Network/Status", in, out, opts...) 1608 if err != nil { 1609 return nil, err 1610 } 1611 return out, nil 1612 } 1613 1614 // NetworkServer is the server API for Network service. 1615 type NetworkServer interface { 1616 // Connect to the network 1617 Connect(context.Context, *ConnectRequest) (*ConnectResponse, error) 1618 // Returns the entire network graph 1619 Graph(context.Context, *GraphRequest) (*GraphResponse, error) 1620 // Returns a list of known nodes in the network 1621 Nodes(context.Context, *NodesRequest) (*NodesResponse, error) 1622 // Returns a list of known routes in the network 1623 Routes(context.Context, *RoutesRequest) (*RoutesResponse, error) 1624 // Returns a list of known services based on routes 1625 Services(context.Context, *ServicesRequest) (*ServicesResponse, error) 1626 // Status returns network status 1627 Status(context.Context, *StatusRequest) (*StatusResponse, error) 1628 } 1629 1630 // UnimplementedNetworkServer can be embedded to have forward compatible implementations. 1631 type UnimplementedNetworkServer struct { 1632 } 1633 1634 func (*UnimplementedNetworkServer) Connect(context.Context, *ConnectRequest) (*ConnectResponse, error) { 1635 return nil, status.Errorf(codes.Unimplemented, "method Connect not implemented") 1636 } 1637 func (*UnimplementedNetworkServer) Graph(context.Context, *GraphRequest) (*GraphResponse, error) { 1638 return nil, status.Errorf(codes.Unimplemented, "method Graph not implemented") 1639 } 1640 func (*UnimplementedNetworkServer) Nodes(context.Context, *NodesRequest) (*NodesResponse, error) { 1641 return nil, status.Errorf(codes.Unimplemented, "method Nodes not implemented") 1642 } 1643 func (*UnimplementedNetworkServer) Routes(context.Context, *RoutesRequest) (*RoutesResponse, error) { 1644 return nil, status.Errorf(codes.Unimplemented, "method Routes not implemented") 1645 } 1646 func (*UnimplementedNetworkServer) Services(context.Context, *ServicesRequest) (*ServicesResponse, error) { 1647 return nil, status.Errorf(codes.Unimplemented, "method Services not implemented") 1648 } 1649 func (*UnimplementedNetworkServer) Status(context.Context, *StatusRequest) (*StatusResponse, error) { 1650 return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") 1651 } 1652 1653 func RegisterNetworkServer(s *grpc.Server, srv NetworkServer) { 1654 s.RegisterService(&_Network_serviceDesc, srv) 1655 } 1656 1657 func _Network_Connect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1658 in := new(ConnectRequest) 1659 if err := dec(in); err != nil { 1660 return nil, err 1661 } 1662 if interceptor == nil { 1663 return srv.(NetworkServer).Connect(ctx, in) 1664 } 1665 info := &grpc.UnaryServerInfo{ 1666 Server: srv, 1667 FullMethod: "/go.micro.network.Network/Connect", 1668 } 1669 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1670 return srv.(NetworkServer).Connect(ctx, req.(*ConnectRequest)) 1671 } 1672 return interceptor(ctx, in, info, handler) 1673 } 1674 1675 func _Network_Graph_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1676 in := new(GraphRequest) 1677 if err := dec(in); err != nil { 1678 return nil, err 1679 } 1680 if interceptor == nil { 1681 return srv.(NetworkServer).Graph(ctx, in) 1682 } 1683 info := &grpc.UnaryServerInfo{ 1684 Server: srv, 1685 FullMethod: "/go.micro.network.Network/Graph", 1686 } 1687 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1688 return srv.(NetworkServer).Graph(ctx, req.(*GraphRequest)) 1689 } 1690 return interceptor(ctx, in, info, handler) 1691 } 1692 1693 func _Network_Nodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1694 in := new(NodesRequest) 1695 if err := dec(in); err != nil { 1696 return nil, err 1697 } 1698 if interceptor == nil { 1699 return srv.(NetworkServer).Nodes(ctx, in) 1700 } 1701 info := &grpc.UnaryServerInfo{ 1702 Server: srv, 1703 FullMethod: "/go.micro.network.Network/Nodes", 1704 } 1705 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1706 return srv.(NetworkServer).Nodes(ctx, req.(*NodesRequest)) 1707 } 1708 return interceptor(ctx, in, info, handler) 1709 } 1710 1711 func _Network_Routes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1712 in := new(RoutesRequest) 1713 if err := dec(in); err != nil { 1714 return nil, err 1715 } 1716 if interceptor == nil { 1717 return srv.(NetworkServer).Routes(ctx, in) 1718 } 1719 info := &grpc.UnaryServerInfo{ 1720 Server: srv, 1721 FullMethod: "/go.micro.network.Network/Routes", 1722 } 1723 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1724 return srv.(NetworkServer).Routes(ctx, req.(*RoutesRequest)) 1725 } 1726 return interceptor(ctx, in, info, handler) 1727 } 1728 1729 func _Network_Services_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1730 in := new(ServicesRequest) 1731 if err := dec(in); err != nil { 1732 return nil, err 1733 } 1734 if interceptor == nil { 1735 return srv.(NetworkServer).Services(ctx, in) 1736 } 1737 info := &grpc.UnaryServerInfo{ 1738 Server: srv, 1739 FullMethod: "/go.micro.network.Network/Services", 1740 } 1741 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1742 return srv.(NetworkServer).Services(ctx, req.(*ServicesRequest)) 1743 } 1744 return interceptor(ctx, in, info, handler) 1745 } 1746 1747 func _Network_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1748 in := new(StatusRequest) 1749 if err := dec(in); err != nil { 1750 return nil, err 1751 } 1752 if interceptor == nil { 1753 return srv.(NetworkServer).Status(ctx, in) 1754 } 1755 info := &grpc.UnaryServerInfo{ 1756 Server: srv, 1757 FullMethod: "/go.micro.network.Network/Status", 1758 } 1759 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1760 return srv.(NetworkServer).Status(ctx, req.(*StatusRequest)) 1761 } 1762 return interceptor(ctx, in, info, handler) 1763 } 1764 1765 var _Network_serviceDesc = grpc.ServiceDesc{ 1766 ServiceName: "go.micro.network.Network", 1767 HandlerType: (*NetworkServer)(nil), 1768 Methods: []grpc.MethodDesc{ 1769 { 1770 MethodName: "Connect", 1771 Handler: _Network_Connect_Handler, 1772 }, 1773 { 1774 MethodName: "Graph", 1775 Handler: _Network_Graph_Handler, 1776 }, 1777 { 1778 MethodName: "Nodes", 1779 Handler: _Network_Nodes_Handler, 1780 }, 1781 { 1782 MethodName: "Routes", 1783 Handler: _Network_Routes_Handler, 1784 }, 1785 { 1786 MethodName: "Services", 1787 Handler: _Network_Services_Handler, 1788 }, 1789 { 1790 MethodName: "Status", 1791 Handler: _Network_Status_Handler, 1792 }, 1793 }, 1794 Streams: []grpc.StreamDesc{}, 1795 Metadata: "network/service/proto/network.proto", 1796 }