github.com/tickoalcantara12/micro/v3@v3.0.0-20221007104245-9d75b9bcbab9/proto/registry/registry.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: registry/registry.proto 3 4 package registry 5 6 import ( 7 context "context" 8 fmt "fmt" 9 proto "github.com/golang/protobuf/proto" 10 grpc "google.golang.org/grpc" 11 math "math" 12 ) 13 14 // Reference imports to suppress errors if they are not otherwise used. 15 var _ = proto.Marshal 16 var _ = fmt.Errorf 17 var _ = math.Inf 18 19 // This is a compile-time assertion to ensure that this generated file 20 // is compatible with the proto package it is being compiled against. 21 // A compilation error at this line likely means your copy of the 22 // proto package needs to be updated. 23 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 24 25 // EventType defines the type of event 26 type EventType int32 27 28 const ( 29 EventType_Create EventType = 0 30 EventType_Delete EventType = 1 31 EventType_Update EventType = 2 32 ) 33 34 var EventType_name = map[int32]string{ 35 0: "Create", 36 1: "Delete", 37 2: "Update", 38 } 39 40 var EventType_value = map[string]int32{ 41 "Create": 0, 42 "Delete": 1, 43 "Update": 2, 44 } 45 46 func (x EventType) String() string { 47 return proto.EnumName(EventType_name, int32(x)) 48 } 49 50 func (EventType) EnumDescriptor() ([]byte, []int) { 51 return fileDescriptor_f3f64dc2c9630278, []int{0} 52 } 53 54 // Service represents a go-micro service 55 type Service struct { 56 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 57 Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` 58 Metadata map[string]string `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 59 Endpoints []*Endpoint `protobuf:"bytes,4,rep,name=endpoints,proto3" json:"endpoints,omitempty"` 60 Nodes []*Node `protobuf:"bytes,5,rep,name=nodes,proto3" json:"nodes,omitempty"` 61 Options *Options `protobuf:"bytes,6,opt,name=options,proto3" json:"options,omitempty"` 62 XXX_NoUnkeyedLiteral struct{} `json:"-"` 63 XXX_unrecognized []byte `json:"-"` 64 XXX_sizecache int32 `json:"-"` 65 } 66 67 func (m *Service) Reset() { *m = Service{} } 68 func (m *Service) String() string { return proto.CompactTextString(m) } 69 func (*Service) ProtoMessage() {} 70 func (*Service) Descriptor() ([]byte, []int) { 71 return fileDescriptor_f3f64dc2c9630278, []int{0} 72 } 73 74 func (m *Service) XXX_Unmarshal(b []byte) error { 75 return xxx_messageInfo_Service.Unmarshal(m, b) 76 } 77 func (m *Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 78 return xxx_messageInfo_Service.Marshal(b, m, deterministic) 79 } 80 func (m *Service) XXX_Merge(src proto.Message) { 81 xxx_messageInfo_Service.Merge(m, src) 82 } 83 func (m *Service) XXX_Size() int { 84 return xxx_messageInfo_Service.Size(m) 85 } 86 func (m *Service) XXX_DiscardUnknown() { 87 xxx_messageInfo_Service.DiscardUnknown(m) 88 } 89 90 var xxx_messageInfo_Service proto.InternalMessageInfo 91 92 func (m *Service) GetName() string { 93 if m != nil { 94 return m.Name 95 } 96 return "" 97 } 98 99 func (m *Service) GetVersion() string { 100 if m != nil { 101 return m.Version 102 } 103 return "" 104 } 105 106 func (m *Service) GetMetadata() map[string]string { 107 if m != nil { 108 return m.Metadata 109 } 110 return nil 111 } 112 113 func (m *Service) GetEndpoints() []*Endpoint { 114 if m != nil { 115 return m.Endpoints 116 } 117 return nil 118 } 119 120 func (m *Service) GetNodes() []*Node { 121 if m != nil { 122 return m.Nodes 123 } 124 return nil 125 } 126 127 func (m *Service) GetOptions() *Options { 128 if m != nil { 129 return m.Options 130 } 131 return nil 132 } 133 134 // Node represents the node the service is on 135 type Node struct { 136 Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 137 Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` 138 Port int64 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"` 139 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"` 140 XXX_NoUnkeyedLiteral struct{} `json:"-"` 141 XXX_unrecognized []byte `json:"-"` 142 XXX_sizecache int32 `json:"-"` 143 } 144 145 func (m *Node) Reset() { *m = Node{} } 146 func (m *Node) String() string { return proto.CompactTextString(m) } 147 func (*Node) ProtoMessage() {} 148 func (*Node) Descriptor() ([]byte, []int) { 149 return fileDescriptor_f3f64dc2c9630278, []int{1} 150 } 151 152 func (m *Node) XXX_Unmarshal(b []byte) error { 153 return xxx_messageInfo_Node.Unmarshal(m, b) 154 } 155 func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 156 return xxx_messageInfo_Node.Marshal(b, m, deterministic) 157 } 158 func (m *Node) XXX_Merge(src proto.Message) { 159 xxx_messageInfo_Node.Merge(m, src) 160 } 161 func (m *Node) XXX_Size() int { 162 return xxx_messageInfo_Node.Size(m) 163 } 164 func (m *Node) XXX_DiscardUnknown() { 165 xxx_messageInfo_Node.DiscardUnknown(m) 166 } 167 168 var xxx_messageInfo_Node proto.InternalMessageInfo 169 170 func (m *Node) GetId() string { 171 if m != nil { 172 return m.Id 173 } 174 return "" 175 } 176 177 func (m *Node) GetAddress() string { 178 if m != nil { 179 return m.Address 180 } 181 return "" 182 } 183 184 func (m *Node) GetPort() int64 { 185 if m != nil { 186 return m.Port 187 } 188 return 0 189 } 190 191 func (m *Node) GetMetadata() map[string]string { 192 if m != nil { 193 return m.Metadata 194 } 195 return nil 196 } 197 198 // Endpoint is a endpoint provided by a service 199 type Endpoint struct { 200 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 201 Request *Value `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` 202 Response *Value `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"` 203 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"` 204 XXX_NoUnkeyedLiteral struct{} `json:"-"` 205 XXX_unrecognized []byte `json:"-"` 206 XXX_sizecache int32 `json:"-"` 207 } 208 209 func (m *Endpoint) Reset() { *m = Endpoint{} } 210 func (m *Endpoint) String() string { return proto.CompactTextString(m) } 211 func (*Endpoint) ProtoMessage() {} 212 func (*Endpoint) Descriptor() ([]byte, []int) { 213 return fileDescriptor_f3f64dc2c9630278, []int{2} 214 } 215 216 func (m *Endpoint) XXX_Unmarshal(b []byte) error { 217 return xxx_messageInfo_Endpoint.Unmarshal(m, b) 218 } 219 func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 220 return xxx_messageInfo_Endpoint.Marshal(b, m, deterministic) 221 } 222 func (m *Endpoint) XXX_Merge(src proto.Message) { 223 xxx_messageInfo_Endpoint.Merge(m, src) 224 } 225 func (m *Endpoint) XXX_Size() int { 226 return xxx_messageInfo_Endpoint.Size(m) 227 } 228 func (m *Endpoint) XXX_DiscardUnknown() { 229 xxx_messageInfo_Endpoint.DiscardUnknown(m) 230 } 231 232 var xxx_messageInfo_Endpoint proto.InternalMessageInfo 233 234 func (m *Endpoint) GetName() string { 235 if m != nil { 236 return m.Name 237 } 238 return "" 239 } 240 241 func (m *Endpoint) GetRequest() *Value { 242 if m != nil { 243 return m.Request 244 } 245 return nil 246 } 247 248 func (m *Endpoint) GetResponse() *Value { 249 if m != nil { 250 return m.Response 251 } 252 return nil 253 } 254 255 func (m *Endpoint) GetMetadata() map[string]string { 256 if m != nil { 257 return m.Metadata 258 } 259 return nil 260 } 261 262 // Value is an opaque value for a request or response 263 type Value struct { 264 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 265 Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` 266 Values []*Value `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` 267 XXX_NoUnkeyedLiteral struct{} `json:"-"` 268 XXX_unrecognized []byte `json:"-"` 269 XXX_sizecache int32 `json:"-"` 270 } 271 272 func (m *Value) Reset() { *m = Value{} } 273 func (m *Value) String() string { return proto.CompactTextString(m) } 274 func (*Value) ProtoMessage() {} 275 func (*Value) Descriptor() ([]byte, []int) { 276 return fileDescriptor_f3f64dc2c9630278, []int{3} 277 } 278 279 func (m *Value) XXX_Unmarshal(b []byte) error { 280 return xxx_messageInfo_Value.Unmarshal(m, b) 281 } 282 func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 283 return xxx_messageInfo_Value.Marshal(b, m, deterministic) 284 } 285 func (m *Value) XXX_Merge(src proto.Message) { 286 xxx_messageInfo_Value.Merge(m, src) 287 } 288 func (m *Value) XXX_Size() int { 289 return xxx_messageInfo_Value.Size(m) 290 } 291 func (m *Value) XXX_DiscardUnknown() { 292 xxx_messageInfo_Value.DiscardUnknown(m) 293 } 294 295 var xxx_messageInfo_Value proto.InternalMessageInfo 296 297 func (m *Value) GetName() string { 298 if m != nil { 299 return m.Name 300 } 301 return "" 302 } 303 304 func (m *Value) GetType() string { 305 if m != nil { 306 return m.Type 307 } 308 return "" 309 } 310 311 func (m *Value) GetValues() []*Value { 312 if m != nil { 313 return m.Values 314 } 315 return nil 316 } 317 318 // Options are registry options 319 type Options struct { 320 Ttl int64 `protobuf:"varint,1,opt,name=ttl,proto3" json:"ttl,omitempty"` 321 Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"` 322 XXX_NoUnkeyedLiteral struct{} `json:"-"` 323 XXX_unrecognized []byte `json:"-"` 324 XXX_sizecache int32 `json:"-"` 325 } 326 327 func (m *Options) Reset() { *m = Options{} } 328 func (m *Options) String() string { return proto.CompactTextString(m) } 329 func (*Options) ProtoMessage() {} 330 func (*Options) Descriptor() ([]byte, []int) { 331 return fileDescriptor_f3f64dc2c9630278, []int{4} 332 } 333 334 func (m *Options) XXX_Unmarshal(b []byte) error { 335 return xxx_messageInfo_Options.Unmarshal(m, b) 336 } 337 func (m *Options) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 338 return xxx_messageInfo_Options.Marshal(b, m, deterministic) 339 } 340 func (m *Options) XXX_Merge(src proto.Message) { 341 xxx_messageInfo_Options.Merge(m, src) 342 } 343 func (m *Options) XXX_Size() int { 344 return xxx_messageInfo_Options.Size(m) 345 } 346 func (m *Options) XXX_DiscardUnknown() { 347 xxx_messageInfo_Options.DiscardUnknown(m) 348 } 349 350 var xxx_messageInfo_Options proto.InternalMessageInfo 351 352 func (m *Options) GetTtl() int64 { 353 if m != nil { 354 return m.Ttl 355 } 356 return 0 357 } 358 359 func (m *Options) GetDomain() string { 360 if m != nil { 361 return m.Domain 362 } 363 return "" 364 } 365 366 // Result is returns by the watcher 367 type Result struct { 368 Action string `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"` 369 Service *Service `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` 370 Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` 371 XXX_NoUnkeyedLiteral struct{} `json:"-"` 372 XXX_unrecognized []byte `json:"-"` 373 XXX_sizecache int32 `json:"-"` 374 } 375 376 func (m *Result) Reset() { *m = Result{} } 377 func (m *Result) String() string { return proto.CompactTextString(m) } 378 func (*Result) ProtoMessage() {} 379 func (*Result) Descriptor() ([]byte, []int) { 380 return fileDescriptor_f3f64dc2c9630278, []int{5} 381 } 382 383 func (m *Result) XXX_Unmarshal(b []byte) error { 384 return xxx_messageInfo_Result.Unmarshal(m, b) 385 } 386 func (m *Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 387 return xxx_messageInfo_Result.Marshal(b, m, deterministic) 388 } 389 func (m *Result) XXX_Merge(src proto.Message) { 390 xxx_messageInfo_Result.Merge(m, src) 391 } 392 func (m *Result) XXX_Size() int { 393 return xxx_messageInfo_Result.Size(m) 394 } 395 func (m *Result) XXX_DiscardUnknown() { 396 xxx_messageInfo_Result.DiscardUnknown(m) 397 } 398 399 var xxx_messageInfo_Result proto.InternalMessageInfo 400 401 func (m *Result) GetAction() string { 402 if m != nil { 403 return m.Action 404 } 405 return "" 406 } 407 408 func (m *Result) GetService() *Service { 409 if m != nil { 410 return m.Service 411 } 412 return nil 413 } 414 415 func (m *Result) GetTimestamp() int64 { 416 if m != nil { 417 return m.Timestamp 418 } 419 return 0 420 } 421 422 type EmptyResponse struct { 423 XXX_NoUnkeyedLiteral struct{} `json:"-"` 424 XXX_unrecognized []byte `json:"-"` 425 XXX_sizecache int32 `json:"-"` 426 } 427 428 func (m *EmptyResponse) Reset() { *m = EmptyResponse{} } 429 func (m *EmptyResponse) String() string { return proto.CompactTextString(m) } 430 func (*EmptyResponse) ProtoMessage() {} 431 func (*EmptyResponse) Descriptor() ([]byte, []int) { 432 return fileDescriptor_f3f64dc2c9630278, []int{6} 433 } 434 435 func (m *EmptyResponse) XXX_Unmarshal(b []byte) error { 436 return xxx_messageInfo_EmptyResponse.Unmarshal(m, b) 437 } 438 func (m *EmptyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 439 return xxx_messageInfo_EmptyResponse.Marshal(b, m, deterministic) 440 } 441 func (m *EmptyResponse) XXX_Merge(src proto.Message) { 442 xxx_messageInfo_EmptyResponse.Merge(m, src) 443 } 444 func (m *EmptyResponse) XXX_Size() int { 445 return xxx_messageInfo_EmptyResponse.Size(m) 446 } 447 func (m *EmptyResponse) XXX_DiscardUnknown() { 448 xxx_messageInfo_EmptyResponse.DiscardUnknown(m) 449 } 450 451 var xxx_messageInfo_EmptyResponse proto.InternalMessageInfo 452 453 type GetRequest struct { 454 Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` 455 Options *Options `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` 456 XXX_NoUnkeyedLiteral struct{} `json:"-"` 457 XXX_unrecognized []byte `json:"-"` 458 XXX_sizecache int32 `json:"-"` 459 } 460 461 func (m *GetRequest) Reset() { *m = GetRequest{} } 462 func (m *GetRequest) String() string { return proto.CompactTextString(m) } 463 func (*GetRequest) ProtoMessage() {} 464 func (*GetRequest) Descriptor() ([]byte, []int) { 465 return fileDescriptor_f3f64dc2c9630278, []int{7} 466 } 467 468 func (m *GetRequest) XXX_Unmarshal(b []byte) error { 469 return xxx_messageInfo_GetRequest.Unmarshal(m, b) 470 } 471 func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 472 return xxx_messageInfo_GetRequest.Marshal(b, m, deterministic) 473 } 474 func (m *GetRequest) XXX_Merge(src proto.Message) { 475 xxx_messageInfo_GetRequest.Merge(m, src) 476 } 477 func (m *GetRequest) XXX_Size() int { 478 return xxx_messageInfo_GetRequest.Size(m) 479 } 480 func (m *GetRequest) XXX_DiscardUnknown() { 481 xxx_messageInfo_GetRequest.DiscardUnknown(m) 482 } 483 484 var xxx_messageInfo_GetRequest proto.InternalMessageInfo 485 486 func (m *GetRequest) GetService() string { 487 if m != nil { 488 return m.Service 489 } 490 return "" 491 } 492 493 func (m *GetRequest) GetOptions() *Options { 494 if m != nil { 495 return m.Options 496 } 497 return nil 498 } 499 500 type GetResponse struct { 501 Services []*Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` 502 XXX_NoUnkeyedLiteral struct{} `json:"-"` 503 XXX_unrecognized []byte `json:"-"` 504 XXX_sizecache int32 `json:"-"` 505 } 506 507 func (m *GetResponse) Reset() { *m = GetResponse{} } 508 func (m *GetResponse) String() string { return proto.CompactTextString(m) } 509 func (*GetResponse) ProtoMessage() {} 510 func (*GetResponse) Descriptor() ([]byte, []int) { 511 return fileDescriptor_f3f64dc2c9630278, []int{8} 512 } 513 514 func (m *GetResponse) XXX_Unmarshal(b []byte) error { 515 return xxx_messageInfo_GetResponse.Unmarshal(m, b) 516 } 517 func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 518 return xxx_messageInfo_GetResponse.Marshal(b, m, deterministic) 519 } 520 func (m *GetResponse) XXX_Merge(src proto.Message) { 521 xxx_messageInfo_GetResponse.Merge(m, src) 522 } 523 func (m *GetResponse) XXX_Size() int { 524 return xxx_messageInfo_GetResponse.Size(m) 525 } 526 func (m *GetResponse) XXX_DiscardUnknown() { 527 xxx_messageInfo_GetResponse.DiscardUnknown(m) 528 } 529 530 var xxx_messageInfo_GetResponse proto.InternalMessageInfo 531 532 func (m *GetResponse) GetServices() []*Service { 533 if m != nil { 534 return m.Services 535 } 536 return nil 537 } 538 539 type ListRequest struct { 540 Options *Options `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"` 541 XXX_NoUnkeyedLiteral struct{} `json:"-"` 542 XXX_unrecognized []byte `json:"-"` 543 XXX_sizecache int32 `json:"-"` 544 } 545 546 func (m *ListRequest) Reset() { *m = ListRequest{} } 547 func (m *ListRequest) String() string { return proto.CompactTextString(m) } 548 func (*ListRequest) ProtoMessage() {} 549 func (*ListRequest) Descriptor() ([]byte, []int) { 550 return fileDescriptor_f3f64dc2c9630278, []int{9} 551 } 552 553 func (m *ListRequest) XXX_Unmarshal(b []byte) error { 554 return xxx_messageInfo_ListRequest.Unmarshal(m, b) 555 } 556 func (m *ListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 557 return xxx_messageInfo_ListRequest.Marshal(b, m, deterministic) 558 } 559 func (m *ListRequest) XXX_Merge(src proto.Message) { 560 xxx_messageInfo_ListRequest.Merge(m, src) 561 } 562 func (m *ListRequest) XXX_Size() int { 563 return xxx_messageInfo_ListRequest.Size(m) 564 } 565 func (m *ListRequest) XXX_DiscardUnknown() { 566 xxx_messageInfo_ListRequest.DiscardUnknown(m) 567 } 568 569 var xxx_messageInfo_ListRequest proto.InternalMessageInfo 570 571 func (m *ListRequest) GetOptions() *Options { 572 if m != nil { 573 return m.Options 574 } 575 return nil 576 } 577 578 type ListResponse struct { 579 Services []*Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` 580 XXX_NoUnkeyedLiteral struct{} `json:"-"` 581 XXX_unrecognized []byte `json:"-"` 582 XXX_sizecache int32 `json:"-"` 583 } 584 585 func (m *ListResponse) Reset() { *m = ListResponse{} } 586 func (m *ListResponse) String() string { return proto.CompactTextString(m) } 587 func (*ListResponse) ProtoMessage() {} 588 func (*ListResponse) Descriptor() ([]byte, []int) { 589 return fileDescriptor_f3f64dc2c9630278, []int{10} 590 } 591 592 func (m *ListResponse) XXX_Unmarshal(b []byte) error { 593 return xxx_messageInfo_ListResponse.Unmarshal(m, b) 594 } 595 func (m *ListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 596 return xxx_messageInfo_ListResponse.Marshal(b, m, deterministic) 597 } 598 func (m *ListResponse) XXX_Merge(src proto.Message) { 599 xxx_messageInfo_ListResponse.Merge(m, src) 600 } 601 func (m *ListResponse) XXX_Size() int { 602 return xxx_messageInfo_ListResponse.Size(m) 603 } 604 func (m *ListResponse) XXX_DiscardUnknown() { 605 xxx_messageInfo_ListResponse.DiscardUnknown(m) 606 } 607 608 var xxx_messageInfo_ListResponse proto.InternalMessageInfo 609 610 func (m *ListResponse) GetServices() []*Service { 611 if m != nil { 612 return m.Services 613 } 614 return nil 615 } 616 617 type WatchRequest struct { 618 // service is optional 619 Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` 620 Options *Options `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` 621 XXX_NoUnkeyedLiteral struct{} `json:"-"` 622 XXX_unrecognized []byte `json:"-"` 623 XXX_sizecache int32 `json:"-"` 624 } 625 626 func (m *WatchRequest) Reset() { *m = WatchRequest{} } 627 func (m *WatchRequest) String() string { return proto.CompactTextString(m) } 628 func (*WatchRequest) ProtoMessage() {} 629 func (*WatchRequest) Descriptor() ([]byte, []int) { 630 return fileDescriptor_f3f64dc2c9630278, []int{11} 631 } 632 633 func (m *WatchRequest) XXX_Unmarshal(b []byte) error { 634 return xxx_messageInfo_WatchRequest.Unmarshal(m, b) 635 } 636 func (m *WatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 637 return xxx_messageInfo_WatchRequest.Marshal(b, m, deterministic) 638 } 639 func (m *WatchRequest) XXX_Merge(src proto.Message) { 640 xxx_messageInfo_WatchRequest.Merge(m, src) 641 } 642 func (m *WatchRequest) XXX_Size() int { 643 return xxx_messageInfo_WatchRequest.Size(m) 644 } 645 func (m *WatchRequest) XXX_DiscardUnknown() { 646 xxx_messageInfo_WatchRequest.DiscardUnknown(m) 647 } 648 649 var xxx_messageInfo_WatchRequest proto.InternalMessageInfo 650 651 func (m *WatchRequest) GetService() string { 652 if m != nil { 653 return m.Service 654 } 655 return "" 656 } 657 658 func (m *WatchRequest) GetOptions() *Options { 659 if m != nil { 660 return m.Options 661 } 662 return nil 663 } 664 665 // Event is registry event 666 type Event struct { 667 // Event Id 668 Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 669 // type of event 670 Type EventType `protobuf:"varint,2,opt,name=type,proto3,enum=registry.EventType" json:"type,omitempty"` 671 // unix timestamp of event 672 Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` 673 // service entry 674 Service *Service `protobuf:"bytes,4,opt,name=service,proto3" json:"service,omitempty"` 675 XXX_NoUnkeyedLiteral struct{} `json:"-"` 676 XXX_unrecognized []byte `json:"-"` 677 XXX_sizecache int32 `json:"-"` 678 } 679 680 func (m *Event) Reset() { *m = Event{} } 681 func (m *Event) String() string { return proto.CompactTextString(m) } 682 func (*Event) ProtoMessage() {} 683 func (*Event) Descriptor() ([]byte, []int) { 684 return fileDescriptor_f3f64dc2c9630278, []int{12} 685 } 686 687 func (m *Event) XXX_Unmarshal(b []byte) error { 688 return xxx_messageInfo_Event.Unmarshal(m, b) 689 } 690 func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 691 return xxx_messageInfo_Event.Marshal(b, m, deterministic) 692 } 693 func (m *Event) XXX_Merge(src proto.Message) { 694 xxx_messageInfo_Event.Merge(m, src) 695 } 696 func (m *Event) XXX_Size() int { 697 return xxx_messageInfo_Event.Size(m) 698 } 699 func (m *Event) XXX_DiscardUnknown() { 700 xxx_messageInfo_Event.DiscardUnknown(m) 701 } 702 703 var xxx_messageInfo_Event proto.InternalMessageInfo 704 705 func (m *Event) GetId() string { 706 if m != nil { 707 return m.Id 708 } 709 return "" 710 } 711 712 func (m *Event) GetType() EventType { 713 if m != nil { 714 return m.Type 715 } 716 return EventType_Create 717 } 718 719 func (m *Event) GetTimestamp() int64 { 720 if m != nil { 721 return m.Timestamp 722 } 723 return 0 724 } 725 726 func (m *Event) GetService() *Service { 727 if m != nil { 728 return m.Service 729 } 730 return nil 731 } 732 733 func init() { 734 proto.RegisterEnum("registry.EventType", EventType_name, EventType_value) 735 proto.RegisterType((*Service)(nil), "registry.Service") 736 proto.RegisterMapType((map[string]string)(nil), "registry.Service.MetadataEntry") 737 proto.RegisterType((*Node)(nil), "registry.Node") 738 proto.RegisterMapType((map[string]string)(nil), "registry.Node.MetadataEntry") 739 proto.RegisterType((*Endpoint)(nil), "registry.Endpoint") 740 proto.RegisterMapType((map[string]string)(nil), "registry.Endpoint.MetadataEntry") 741 proto.RegisterType((*Value)(nil), "registry.Value") 742 proto.RegisterType((*Options)(nil), "registry.Options") 743 proto.RegisterType((*Result)(nil), "registry.Result") 744 proto.RegisterType((*EmptyResponse)(nil), "registry.EmptyResponse") 745 proto.RegisterType((*GetRequest)(nil), "registry.GetRequest") 746 proto.RegisterType((*GetResponse)(nil), "registry.GetResponse") 747 proto.RegisterType((*ListRequest)(nil), "registry.ListRequest") 748 proto.RegisterType((*ListResponse)(nil), "registry.ListResponse") 749 proto.RegisterType((*WatchRequest)(nil), "registry.WatchRequest") 750 proto.RegisterType((*Event)(nil), "registry.Event") 751 } 752 753 func init() { proto.RegisterFile("registry/registry.proto", fileDescriptor_f3f64dc2c9630278) } 754 755 var fileDescriptor_f3f64dc2c9630278 = []byte{ 756 // 709 bytes of a gzipped FileDescriptorProto 757 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xdb, 0x6e, 0xd3, 0x4c, 758 0x10, 0x8e, 0x9d, 0xf3, 0xa4, 0x87, 0x74, 0xff, 0xfe, 0xad, 0x15, 0x55, 0x22, 0xb2, 0x90, 0x1a, 759 0xa8, 0x48, 0x4a, 0x22, 0xa4, 0xaa, 0x29, 0x42, 0x82, 0x46, 0xdc, 0x70, 0x90, 0x5c, 0x0a, 0x88, 760 0x3b, 0x37, 0x1e, 0xb5, 0x56, 0x63, 0xaf, 0xd9, 0xdd, 0x44, 0xca, 0x33, 0xf0, 0x3c, 0x70, 0xc3, 761 0x53, 0xf1, 0x06, 0x68, 0xd7, 0xeb, 0x43, 0x9b, 0x40, 0xa4, 0x02, 0x37, 0xd1, 0xec, 0xcc, 0x37, 762 0xe7, 0x6f, 0x62, 0xd8, 0x65, 0x78, 0xe9, 0x73, 0xc1, 0xe6, 0xbd, 0x44, 0xe8, 0x46, 0x8c, 0x0a, 763 0x4a, 0x6a, 0xc9, 0xdb, 0xfe, 0x66, 0x42, 0xf5, 0x0c, 0xd9, 0xcc, 0x1f, 0x23, 0x21, 0x50, 0x0a, 764 0xdd, 0x00, 0x2d, 0xa3, 0x6d, 0x74, 0xea, 0x8e, 0x92, 0x89, 0x05, 0xd5, 0x19, 0x32, 0xee, 0xd3, 765 0xd0, 0x32, 0x95, 0x3a, 0x79, 0x92, 0x21, 0xd4, 0x02, 0x14, 0xae, 0xe7, 0x0a, 0xd7, 0x2a, 0xb6, 766 0x8b, 0x9d, 0x46, 0xff, 0x5e, 0x37, 0x4d, 0xa3, 0x43, 0x76, 0x5f, 0x6b, 0xc4, 0x28, 0x14, 0x6c, 767 0xee, 0xa4, 0x0e, 0xe4, 0x10, 0xea, 0x18, 0x7a, 0x11, 0xf5, 0x43, 0xc1, 0xad, 0x92, 0xf2, 0x26, 768 0x99, 0xf7, 0x48, 0x9b, 0x9c, 0x0c, 0x44, 0xee, 0x43, 0x39, 0xa4, 0x1e, 0x72, 0xab, 0xac, 0xd0, 769 0x1b, 0x19, 0xfa, 0x0d, 0xf5, 0xd0, 0x89, 0x8d, 0xe4, 0x00, 0xaa, 0x34, 0x12, 0x3e, 0x0d, 0xb9, 770 0x55, 0x69, 0x1b, 0x9d, 0x46, 0x7f, 0x2b, 0xc3, 0xbd, 0x8d, 0x0d, 0x4e, 0x82, 0x68, 0x0d, 0x61, 771 0xfd, 0x46, 0x7d, 0xa4, 0x09, 0xc5, 0x6b, 0x9c, 0xeb, 0xfe, 0xa5, 0x48, 0xb6, 0xa1, 0x3c, 0x73, 772 0x27, 0x53, 0xd4, 0xcd, 0xc7, 0x8f, 0x63, 0xf3, 0xc8, 0xb0, 0xbf, 0x1b, 0x50, 0x92, 0x99, 0xc9, 773 0x06, 0x98, 0xbe, 0xa7, 0x7d, 0x4c, 0xdf, 0x93, 0x13, 0x73, 0x3d, 0x8f, 0x21, 0xe7, 0xc9, 0xc4, 774 0xf4, 0x53, 0xce, 0x37, 0xa2, 0x4c, 0x58, 0xc5, 0xb6, 0xd1, 0x29, 0x3a, 0x4a, 0x26, 0x47, 0xb9, 775 0x29, 0xc6, 0x73, 0xd8, 0xbb, 0xd9, 0xd9, 0xaf, 0x46, 0xf8, 0x67, 0xd5, 0xff, 0x30, 0xa0, 0x96, 776 0x4c, 0x79, 0xe9, 0xde, 0x1f, 0x40, 0x95, 0xe1, 0xe7, 0x29, 0x72, 0xa1, 0x9c, 0x1b, 0xfd, 0xcd, 777 0xac, 0xac, 0xf7, 0x32, 0x8c, 0x93, 0xd8, 0xc9, 0x01, 0xd4, 0x18, 0xf2, 0x88, 0x86, 0x1c, 0x55, 778 0x6b, 0x4b, 0xb0, 0x29, 0x80, 0x9c, 0x2c, 0xf4, 0xdb, 0x5e, 0xdc, 0xfb, 0xbf, 0xe9, 0xf9, 0x23, 779 0x94, 0x55, 0x35, 0x4b, 0xfb, 0x25, 0x50, 0x12, 0xf3, 0x28, 0xf1, 0x52, 0x32, 0xd9, 0x87, 0x8a, 780 0xf2, 0xe6, 0x9a, 0xdf, 0x0b, 0x6d, 0x69, 0xb3, 0x3d, 0x80, 0xaa, 0x26, 0x97, 0x2c, 0x48, 0x88, 781 0x89, 0x0a, 0x5d, 0x74, 0xa4, 0x48, 0x76, 0xa0, 0xe2, 0xd1, 0xc0, 0xf5, 0x93, 0x03, 0xd2, 0x2f, 782 0xfb, 0x1a, 0x2a, 0x0e, 0xf2, 0xe9, 0x44, 0x48, 0x84, 0x3b, 0x96, 0xee, 0xba, 0x22, 0xfd, 0x92, 783 0x64, 0xe6, 0xf1, 0x1d, 0xe9, 0x1d, 0x6c, 0x2d, 0x1c, 0x98, 0x93, 0x20, 0xc8, 0x1e, 0xd4, 0x85, 784 0x1f, 0x20, 0x17, 0x6e, 0x10, 0x69, 0x86, 0x65, 0x0a, 0x7b, 0x13, 0xd6, 0x47, 0x41, 0x24, 0xe6, 785 0x8e, 0xde, 0x83, 0x7d, 0x06, 0xf0, 0x12, 0x85, 0xa3, 0x57, 0x68, 0x65, 0x99, 0xe2, 0x12, 0xd2, 786 0xb0, 0xb9, 0x83, 0x32, 0x57, 0x1d, 0x94, 0x7d, 0x02, 0x0d, 0x15, 0x54, 0xef, 0xfa, 0x11, 0xd4, 787 0x74, 0x18, 0x6e, 0x19, 0x6a, 0x82, 0x4b, 0x1a, 0x48, 0x21, 0xf6, 0x31, 0x34, 0x5e, 0xf9, 0x3c, 788 0xad, 0x29, 0x97, 0xd9, 0x58, 0x99, 0xf9, 0x29, 0xac, 0xc5, 0xbe, 0x77, 0x4b, 0x7d, 0x0e, 0x6b, 789 0x1f, 0x5c, 0x31, 0xbe, 0xfa, 0xcb, 0xf3, 0xf8, 0x62, 0x40, 0x79, 0x34, 0xc3, 0x50, 0x2c, 0xfc, 790 0x49, 0xec, 0xe7, 0xe8, 0xb6, 0xd1, 0xff, 0x2f, 0x77, 0x02, 0x12, 0xfe, 0x6e, 0x1e, 0xa1, 0xe6, 791 0xe0, 0x6f, 0xd7, 0x9a, 0x67, 0x48, 0x69, 0x15, 0x43, 0x1e, 0xf6, 0xa0, 0x9e, 0x46, 0x27, 0x00, 792 0x95, 0x17, 0x0c, 0x5d, 0x81, 0xcd, 0x82, 0x94, 0x4f, 0x71, 0x82, 0x02, 0x9b, 0x86, 0x94, 0xcf, 793 0x23, 0x4f, 0xea, 0xcd, 0xfe, 0x57, 0x13, 0x6a, 0x8e, 0x0e, 0x47, 0x86, 0x8a, 0x30, 0xc9, 0xa7, 794 0x62, 0x3b, 0xcb, 0x93, 0xd1, 0xa8, 0xf5, 0xff, 0x2d, 0xad, 0xe6, 0x5a, 0x41, 0xfe, 0xcb, 0xc5, 795 0x81, 0x90, 0x91, 0xc5, 0x12, 0x5b, 0xbb, 0xb9, 0xfe, 0x6f, 0xb0, 0xb4, 0x40, 0x8e, 0x01, 0x4e, 796 0x91, 0xdd, 0xcd, 0xf7, 0x59, 0x4c, 0x0a, 0x8d, 0xe4, 0x24, 0x57, 0x5e, 0x8e, 0x68, 0xad, 0x9d, 797 0xdb, 0xea, 0x34, 0xc0, 0x13, 0x28, 0x2b, 0x5a, 0x90, 0x1c, 0x24, 0xcf, 0x93, 0x56, 0x33, 0xd3, 798 0xc7, 0xb7, 0x6c, 0x17, 0x0e, 0x8d, 0xe7, 0x83, 0x4f, 0x8f, 0x2f, 0x7d, 0x71, 0x35, 0xbd, 0xe8, 799 0x8e, 0x69, 0xd0, 0x0b, 0xfc, 0x31, 0xa3, 0xfa, 0x77, 0x36, 0xe8, 0xa9, 0x0f, 0x70, 0xfa, 0x3d, 800 0x1e, 0x26, 0xc2, 0x45, 0x45, 0x19, 0x06, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xde, 0x1c, 0x89, 801 0xfa, 0xb4, 0x07, 0x00, 0x00, 802 } 803 804 // Reference imports to suppress errors if they are not otherwise used. 805 var _ context.Context 806 var _ grpc.ClientConn 807 808 // This is a compile-time assertion to ensure that this generated file 809 // is compatible with the grpc package it is being compiled against. 810 const _ = grpc.SupportPackageIsVersion4 811 812 // RegistryClient is the client API for Registry service. 813 // 814 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 815 type RegistryClient interface { 816 GetService(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) 817 Register(ctx context.Context, in *Service, opts ...grpc.CallOption) (*EmptyResponse, error) 818 Deregister(ctx context.Context, in *Service, opts ...grpc.CallOption) (*EmptyResponse, error) 819 ListServices(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) 820 Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Registry_WatchClient, error) 821 } 822 823 type registryClient struct { 824 cc *grpc.ClientConn 825 } 826 827 func NewRegistryClient(cc *grpc.ClientConn) RegistryClient { 828 return ®istryClient{cc} 829 } 830 831 func (c *registryClient) GetService(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) { 832 out := new(GetResponse) 833 err := c.cc.Invoke(ctx, "/registry.Registry/GetService", in, out, opts...) 834 if err != nil { 835 return nil, err 836 } 837 return out, nil 838 } 839 840 func (c *registryClient) Register(ctx context.Context, in *Service, opts ...grpc.CallOption) (*EmptyResponse, error) { 841 out := new(EmptyResponse) 842 err := c.cc.Invoke(ctx, "/registry.Registry/Register", in, out, opts...) 843 if err != nil { 844 return nil, err 845 } 846 return out, nil 847 } 848 849 func (c *registryClient) Deregister(ctx context.Context, in *Service, opts ...grpc.CallOption) (*EmptyResponse, error) { 850 out := new(EmptyResponse) 851 err := c.cc.Invoke(ctx, "/registry.Registry/Deregister", in, out, opts...) 852 if err != nil { 853 return nil, err 854 } 855 return out, nil 856 } 857 858 func (c *registryClient) ListServices(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) { 859 out := new(ListResponse) 860 err := c.cc.Invoke(ctx, "/registry.Registry/ListServices", in, out, opts...) 861 if err != nil { 862 return nil, err 863 } 864 return out, nil 865 } 866 867 func (c *registryClient) Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Registry_WatchClient, error) { 868 stream, err := c.cc.NewStream(ctx, &_Registry_serviceDesc.Streams[0], "/registry.Registry/Watch", opts...) 869 if err != nil { 870 return nil, err 871 } 872 x := ®istryWatchClient{stream} 873 if err := x.ClientStream.SendMsg(in); err != nil { 874 return nil, err 875 } 876 if err := x.ClientStream.CloseSend(); err != nil { 877 return nil, err 878 } 879 return x, nil 880 } 881 882 type Registry_WatchClient interface { 883 Recv() (*Result, error) 884 grpc.ClientStream 885 } 886 887 type registryWatchClient struct { 888 grpc.ClientStream 889 } 890 891 func (x *registryWatchClient) Recv() (*Result, error) { 892 m := new(Result) 893 if err := x.ClientStream.RecvMsg(m); err != nil { 894 return nil, err 895 } 896 return m, nil 897 } 898 899 // RegistryServer is the server API for Registry service. 900 type RegistryServer interface { 901 GetService(context.Context, *GetRequest) (*GetResponse, error) 902 Register(context.Context, *Service) (*EmptyResponse, error) 903 Deregister(context.Context, *Service) (*EmptyResponse, error) 904 ListServices(context.Context, *ListRequest) (*ListResponse, error) 905 Watch(*WatchRequest, Registry_WatchServer) error 906 } 907 908 func RegisterRegistryServer(s *grpc.Server, srv RegistryServer) { 909 s.RegisterService(&_Registry_serviceDesc, srv) 910 } 911 912 func _Registry_GetService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 913 in := new(GetRequest) 914 if err := dec(in); err != nil { 915 return nil, err 916 } 917 if interceptor == nil { 918 return srv.(RegistryServer).GetService(ctx, in) 919 } 920 info := &grpc.UnaryServerInfo{ 921 Server: srv, 922 FullMethod: "/registry.Registry/GetService", 923 } 924 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 925 return srv.(RegistryServer).GetService(ctx, req.(*GetRequest)) 926 } 927 return interceptor(ctx, in, info, handler) 928 } 929 930 func _Registry_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 931 in := new(Service) 932 if err := dec(in); err != nil { 933 return nil, err 934 } 935 if interceptor == nil { 936 return srv.(RegistryServer).Register(ctx, in) 937 } 938 info := &grpc.UnaryServerInfo{ 939 Server: srv, 940 FullMethod: "/registry.Registry/Register", 941 } 942 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 943 return srv.(RegistryServer).Register(ctx, req.(*Service)) 944 } 945 return interceptor(ctx, in, info, handler) 946 } 947 948 func _Registry_Deregister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 949 in := new(Service) 950 if err := dec(in); err != nil { 951 return nil, err 952 } 953 if interceptor == nil { 954 return srv.(RegistryServer).Deregister(ctx, in) 955 } 956 info := &grpc.UnaryServerInfo{ 957 Server: srv, 958 FullMethod: "/registry.Registry/Deregister", 959 } 960 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 961 return srv.(RegistryServer).Deregister(ctx, req.(*Service)) 962 } 963 return interceptor(ctx, in, info, handler) 964 } 965 966 func _Registry_ListServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 967 in := new(ListRequest) 968 if err := dec(in); err != nil { 969 return nil, err 970 } 971 if interceptor == nil { 972 return srv.(RegistryServer).ListServices(ctx, in) 973 } 974 info := &grpc.UnaryServerInfo{ 975 Server: srv, 976 FullMethod: "/registry.Registry/ListServices", 977 } 978 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 979 return srv.(RegistryServer).ListServices(ctx, req.(*ListRequest)) 980 } 981 return interceptor(ctx, in, info, handler) 982 } 983 984 func _Registry_Watch_Handler(srv interface{}, stream grpc.ServerStream) error { 985 m := new(WatchRequest) 986 if err := stream.RecvMsg(m); err != nil { 987 return err 988 } 989 return srv.(RegistryServer).Watch(m, ®istryWatchServer{stream}) 990 } 991 992 type Registry_WatchServer interface { 993 Send(*Result) error 994 grpc.ServerStream 995 } 996 997 type registryWatchServer struct { 998 grpc.ServerStream 999 } 1000 1001 func (x *registryWatchServer) Send(m *Result) error { 1002 return x.ServerStream.SendMsg(m) 1003 } 1004 1005 var _Registry_serviceDesc = grpc.ServiceDesc{ 1006 ServiceName: "registry.Registry", 1007 HandlerType: (*RegistryServer)(nil), 1008 Methods: []grpc.MethodDesc{ 1009 { 1010 MethodName: "GetService", 1011 Handler: _Registry_GetService_Handler, 1012 }, 1013 { 1014 MethodName: "Register", 1015 Handler: _Registry_Register_Handler, 1016 }, 1017 { 1018 MethodName: "Deregister", 1019 Handler: _Registry_Deregister_Handler, 1020 }, 1021 { 1022 MethodName: "ListServices", 1023 Handler: _Registry_ListServices_Handler, 1024 }, 1025 }, 1026 Streams: []grpc.StreamDesc{ 1027 { 1028 StreamName: "Watch", 1029 Handler: _Registry_Watch_Handler, 1030 ServerStreams: true, 1031 }, 1032 }, 1033 Metadata: "registry/registry.proto", 1034 }