github.com/matrixorigin/matrixone@v1.2.0/pkg/pb/metadata/metadata.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: metadata.proto 3 4 package metadata 5 6 import ( 7 fmt "fmt" 8 io "io" 9 math "math" 10 math_bits "math/bits" 11 12 _ "github.com/gogo/protobuf/gogoproto" 13 proto "github.com/gogo/protobuf/proto" 14 ) 15 16 // Reference imports to suppress errors if they are not otherwise used. 17 var _ = proto.Marshal 18 var _ = fmt.Errorf 19 var _ = math.Inf 20 21 // This is a compile-time assertion to ensure that this generated file 22 // is compatible with the proto package it is being compiled against. 23 // A compilation error at this line likely means your copy of the 24 // proto package needs to be updated. 25 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 26 27 // ServiceType service type 28 type ServiceType int32 29 30 const ( 31 // CN cn service 32 ServiceType_CN ServiceType = 0 33 // TN tn service 34 ServiceType_TN ServiceType = 1 35 // LOG log service 36 ServiceType_LOG ServiceType = 2 37 // Proxy proxy service 38 ServiceType_PROXY ServiceType = 3 39 // PYTHON_UDF python udf service 40 ServiceType_PYTHON_UDF ServiceType = 4 41 ) 42 43 var ServiceType_name = map[int32]string{ 44 0: "CN", 45 1: "TN", 46 2: "LOG", 47 3: "PROXY", 48 4: "PYTHON_UDF", 49 } 50 51 var ServiceType_value = map[string]int32{ 52 "CN": 0, 53 "TN": 1, 54 "LOG": 2, 55 "PROXY": 3, 56 "PYTHON_UDF": 4, 57 } 58 59 func (x ServiceType) String() string { 60 return proto.EnumName(ServiceType_name, int32(x)) 61 } 62 63 func (ServiceType) EnumDescriptor() ([]byte, []int) { 64 return fileDescriptor_56d9f74966f40d04, []int{0} 65 } 66 67 // CNRole cn node role 68 type CNRole int32 69 70 const ( 71 // TP tp node 72 CNRole_TP CNRole = 0 73 // AP ap node 74 CNRole_AP CNRole = 1 75 ) 76 77 var CNRole_name = map[int32]string{ 78 0: "TP", 79 1: "AP", 80 } 81 82 var CNRole_value = map[string]int32{ 83 "TP": 0, 84 "AP": 1, 85 } 86 87 func (x CNRole) String() string { 88 return proto.EnumName(CNRole_name, int32(x)) 89 } 90 91 func (CNRole) EnumDescriptor() ([]byte, []int) { 92 return fileDescriptor_56d9f74966f40d04, []int{1} 93 } 94 95 // WorkState is the work state of CN service. 96 type WorkState int32 97 98 const ( 99 WorkState_Unknown WorkState = 0 100 WorkState_Working WorkState = 1 101 WorkState_Draining WorkState = 2 102 WorkState_Drained WorkState = 3 103 ) 104 105 var WorkState_name = map[int32]string{ 106 0: "Unknown", 107 1: "Working", 108 2: "Draining", 109 3: "Drained", 110 } 111 112 var WorkState_value = map[string]int32{ 113 "Unknown": 0, 114 "Working": 1, 115 "Draining": 2, 116 "Drained": 3, 117 } 118 119 func (x WorkState) String() string { 120 return proto.EnumName(WorkState_name, int32(x)) 121 } 122 123 func (WorkState) EnumDescriptor() ([]byte, []int) { 124 return fileDescriptor_56d9f74966f40d04, []int{2} 125 } 126 127 // TNShardRecord is TN shard metadata describing what is a TN shard. It 128 // is internally used by HAKeeper to maintain how many TNs available in 129 // the system. 130 type TNShardRecord struct { 131 // ShardID the id of the TN shard. 132 ShardID uint64 `protobuf:"varint,1,opt,name=ShardID,proto3" json:"ShardID,omitempty"` 133 // LogShardID a TN corresponds to a unique Shard of LogService. 134 LogShardID uint64 `protobuf:"varint,2,opt,name=LogShardID,proto3" json:"LogShardID,omitempty"` 135 XXX_NoUnkeyedLiteral struct{} `json:"-"` 136 XXX_unrecognized []byte `json:"-"` 137 XXX_sizecache int32 `json:"-"` 138 } 139 140 func (m *TNShardRecord) Reset() { *m = TNShardRecord{} } 141 func (m *TNShardRecord) String() string { return proto.CompactTextString(m) } 142 func (*TNShardRecord) ProtoMessage() {} 143 func (*TNShardRecord) Descriptor() ([]byte, []int) { 144 return fileDescriptor_56d9f74966f40d04, []int{0} 145 } 146 func (m *TNShardRecord) XXX_Unmarshal(b []byte) error { 147 return m.Unmarshal(b) 148 } 149 func (m *TNShardRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 150 if deterministic { 151 return xxx_messageInfo_TNShardRecord.Marshal(b, m, deterministic) 152 } else { 153 b = b[:cap(b)] 154 n, err := m.MarshalToSizedBuffer(b) 155 if err != nil { 156 return nil, err 157 } 158 return b[:n], nil 159 } 160 } 161 func (m *TNShardRecord) XXX_Merge(src proto.Message) { 162 xxx_messageInfo_TNShardRecord.Merge(m, src) 163 } 164 func (m *TNShardRecord) XXX_Size() int { 165 return m.Size() 166 } 167 func (m *TNShardRecord) XXX_DiscardUnknown() { 168 xxx_messageInfo_TNShardRecord.DiscardUnknown(m) 169 } 170 171 var xxx_messageInfo_TNShardRecord proto.InternalMessageInfo 172 173 func (m *TNShardRecord) GetShardID() uint64 { 174 if m != nil { 175 return m.ShardID 176 } 177 return 0 178 } 179 180 func (m *TNShardRecord) GetLogShardID() uint64 { 181 if m != nil { 182 return m.LogShardID 183 } 184 return 0 185 } 186 187 // TNShard 188 type TNShard struct { 189 // TNShard extends TNShardRecord 190 TNShardRecord `protobuf:"bytes,1,opt,name=TNShardRecord,proto3,embedded=TNShardRecord" json:"TNShardRecord"` 191 // ReplicaID only one replica for one TN. The ReplicaID is specified at 192 // the time the TN is created. TN restart ReplicaID will not change, when 193 // a TN is migrated to another node, the ReplicaID will be reset. 194 ReplicaID uint64 `protobuf:"varint,2,opt,name=ReplicaID,proto3" json:"ReplicaID,omitempty"` 195 // Address is TN's external service address. 196 Address string `protobuf:"bytes,3,opt,name=Address,proto3" json:"Address,omitempty"` 197 XXX_NoUnkeyedLiteral struct{} `json:"-"` 198 XXX_unrecognized []byte `json:"-"` 199 XXX_sizecache int32 `json:"-"` 200 } 201 202 func (m *TNShard) Reset() { *m = TNShard{} } 203 func (m *TNShard) String() string { return proto.CompactTextString(m) } 204 func (*TNShard) ProtoMessage() {} 205 func (*TNShard) Descriptor() ([]byte, []int) { 206 return fileDescriptor_56d9f74966f40d04, []int{1} 207 } 208 func (m *TNShard) XXX_Unmarshal(b []byte) error { 209 return m.Unmarshal(b) 210 } 211 func (m *TNShard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 212 if deterministic { 213 return xxx_messageInfo_TNShard.Marshal(b, m, deterministic) 214 } else { 215 b = b[:cap(b)] 216 n, err := m.MarshalToSizedBuffer(b) 217 if err != nil { 218 return nil, err 219 } 220 return b[:n], nil 221 } 222 } 223 func (m *TNShard) XXX_Merge(src proto.Message) { 224 xxx_messageInfo_TNShard.Merge(m, src) 225 } 226 func (m *TNShard) XXX_Size() int { 227 return m.Size() 228 } 229 func (m *TNShard) XXX_DiscardUnknown() { 230 xxx_messageInfo_TNShard.DiscardUnknown(m) 231 } 232 233 var xxx_messageInfo_TNShard proto.InternalMessageInfo 234 235 func (m *TNShard) GetReplicaID() uint64 { 236 if m != nil { 237 return m.ReplicaID 238 } 239 return 0 240 } 241 242 func (m *TNShard) GetAddress() string { 243 if m != nil { 244 return m.Address 245 } 246 return "" 247 } 248 249 // LogShardRecord is Log Shard Metadata describing what is a Log shard. It is 250 // internally used by the HAKeeper to maintain how many Log shards are available 251 // in the system. 252 type LogShardRecord struct { 253 // ShardID is the id of the Log Shard. 254 ShardID uint64 `protobuf:"varint,1,opt,name=ShardID,proto3" json:"ShardID,omitempty"` 255 // NumberOfReplicas is the number of replicas in the shard. 256 NumberOfReplicas uint64 `protobuf:"varint,2,opt,name=NumberOfReplicas,proto3" json:"NumberOfReplicas,omitempty"` 257 XXX_NoUnkeyedLiteral struct{} `json:"-"` 258 XXX_unrecognized []byte `json:"-"` 259 XXX_sizecache int32 `json:"-"` 260 } 261 262 func (m *LogShardRecord) Reset() { *m = LogShardRecord{} } 263 func (m *LogShardRecord) String() string { return proto.CompactTextString(m) } 264 func (*LogShardRecord) ProtoMessage() {} 265 func (*LogShardRecord) Descriptor() ([]byte, []int) { 266 return fileDescriptor_56d9f74966f40d04, []int{2} 267 } 268 func (m *LogShardRecord) XXX_Unmarshal(b []byte) error { 269 return m.Unmarshal(b) 270 } 271 func (m *LogShardRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 272 if deterministic { 273 return xxx_messageInfo_LogShardRecord.Marshal(b, m, deterministic) 274 } else { 275 b = b[:cap(b)] 276 n, err := m.MarshalToSizedBuffer(b) 277 if err != nil { 278 return nil, err 279 } 280 return b[:n], nil 281 } 282 } 283 func (m *LogShardRecord) XXX_Merge(src proto.Message) { 284 xxx_messageInfo_LogShardRecord.Merge(m, src) 285 } 286 func (m *LogShardRecord) XXX_Size() int { 287 return m.Size() 288 } 289 func (m *LogShardRecord) XXX_DiscardUnknown() { 290 xxx_messageInfo_LogShardRecord.DiscardUnknown(m) 291 } 292 293 var xxx_messageInfo_LogShardRecord proto.InternalMessageInfo 294 295 func (m *LogShardRecord) GetShardID() uint64 { 296 if m != nil { 297 return m.ShardID 298 } 299 return 0 300 } 301 302 func (m *LogShardRecord) GetNumberOfReplicas() uint64 { 303 if m != nil { 304 return m.NumberOfReplicas 305 } 306 return 0 307 } 308 309 // LogShard 310 type LogShard struct { 311 // LogShard extends LogShardRecord 312 LogShardRecord `protobuf:"bytes,1,opt,name=LogShardRecord,proto3,embedded=LogShardRecord" json:"LogShardRecord"` 313 // ReplicaID is the replica ID of the replica running on the LogStore. 314 ReplicaID uint64 `protobuf:"varint,2,opt,name=ReplicaID,proto3" json:"ReplicaID,omitempty"` 315 XXX_NoUnkeyedLiteral struct{} `json:"-"` 316 XXX_unrecognized []byte `json:"-"` 317 XXX_sizecache int32 `json:"-"` 318 } 319 320 func (m *LogShard) Reset() { *m = LogShard{} } 321 func (m *LogShard) String() string { return proto.CompactTextString(m) } 322 func (*LogShard) ProtoMessage() {} 323 func (*LogShard) Descriptor() ([]byte, []int) { 324 return fileDescriptor_56d9f74966f40d04, []int{3} 325 } 326 func (m *LogShard) XXX_Unmarshal(b []byte) error { 327 return m.Unmarshal(b) 328 } 329 func (m *LogShard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 330 if deterministic { 331 return xxx_messageInfo_LogShard.Marshal(b, m, deterministic) 332 } else { 333 b = b[:cap(b)] 334 n, err := m.MarshalToSizedBuffer(b) 335 if err != nil { 336 return nil, err 337 } 338 return b[:n], nil 339 } 340 } 341 func (m *LogShard) XXX_Merge(src proto.Message) { 342 xxx_messageInfo_LogShard.Merge(m, src) 343 } 344 func (m *LogShard) XXX_Size() int { 345 return m.Size() 346 } 347 func (m *LogShard) XXX_DiscardUnknown() { 348 xxx_messageInfo_LogShard.DiscardUnknown(m) 349 } 350 351 var xxx_messageInfo_LogShard proto.InternalMessageInfo 352 353 func (m *LogShard) GetReplicaID() uint64 { 354 if m != nil { 355 return m.ReplicaID 356 } 357 return 0 358 } 359 360 // TNStore TN store metadata 361 type TNStore struct { 362 // UUID TNStore uuid id 363 UUID string `protobuf:"bytes,1,opt,name=UUID,proto3" json:"UUID,omitempty"` 364 // Shards TNShards 365 Shards []TNShard `protobuf:"bytes,2,rep,name=Shards,proto3" json:"Shards"` 366 XXX_NoUnkeyedLiteral struct{} `json:"-"` 367 XXX_unrecognized []byte `json:"-"` 368 XXX_sizecache int32 `json:"-"` 369 } 370 371 func (m *TNStore) Reset() { *m = TNStore{} } 372 func (m *TNStore) String() string { return proto.CompactTextString(m) } 373 func (*TNStore) ProtoMessage() {} 374 func (*TNStore) Descriptor() ([]byte, []int) { 375 return fileDescriptor_56d9f74966f40d04, []int{4} 376 } 377 func (m *TNStore) XXX_Unmarshal(b []byte) error { 378 return m.Unmarshal(b) 379 } 380 func (m *TNStore) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 381 if deterministic { 382 return xxx_messageInfo_TNStore.Marshal(b, m, deterministic) 383 } else { 384 b = b[:cap(b)] 385 n, err := m.MarshalToSizedBuffer(b) 386 if err != nil { 387 return nil, err 388 } 389 return b[:n], nil 390 } 391 } 392 func (m *TNStore) XXX_Merge(src proto.Message) { 393 xxx_messageInfo_TNStore.Merge(m, src) 394 } 395 func (m *TNStore) XXX_Size() int { 396 return m.Size() 397 } 398 func (m *TNStore) XXX_DiscardUnknown() { 399 xxx_messageInfo_TNStore.DiscardUnknown(m) 400 } 401 402 var xxx_messageInfo_TNStore proto.InternalMessageInfo 403 404 func (m *TNStore) GetUUID() string { 405 if m != nil { 406 return m.UUID 407 } 408 return "" 409 } 410 411 func (m *TNStore) GetShards() []TNShard { 412 if m != nil { 413 return m.Shards 414 } 415 return nil 416 } 417 418 // LogStore is for the metadata for Log store. 419 type LogStore struct { 420 // UUID is the id of the Log store. 421 UUID string `protobuf:"bytes,1,opt,name=UUID,proto3" json:"UUID,omitempty"` 422 // Shards is for Log shards metadata. 423 Shards []LogShard `protobuf:"bytes,2,rep,name=Shards,proto3" json:"Shards"` 424 XXX_NoUnkeyedLiteral struct{} `json:"-"` 425 XXX_unrecognized []byte `json:"-"` 426 XXX_sizecache int32 `json:"-"` 427 } 428 429 func (m *LogStore) Reset() { *m = LogStore{} } 430 func (m *LogStore) String() string { return proto.CompactTextString(m) } 431 func (*LogStore) ProtoMessage() {} 432 func (*LogStore) Descriptor() ([]byte, []int) { 433 return fileDescriptor_56d9f74966f40d04, []int{5} 434 } 435 func (m *LogStore) XXX_Unmarshal(b []byte) error { 436 return m.Unmarshal(b) 437 } 438 func (m *LogStore) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 439 if deterministic { 440 return xxx_messageInfo_LogStore.Marshal(b, m, deterministic) 441 } else { 442 b = b[:cap(b)] 443 n, err := m.MarshalToSizedBuffer(b) 444 if err != nil { 445 return nil, err 446 } 447 return b[:n], nil 448 } 449 } 450 func (m *LogStore) XXX_Merge(src proto.Message) { 451 xxx_messageInfo_LogStore.Merge(m, src) 452 } 453 func (m *LogStore) XXX_Size() int { 454 return m.Size() 455 } 456 func (m *LogStore) XXX_DiscardUnknown() { 457 xxx_messageInfo_LogStore.DiscardUnknown(m) 458 } 459 460 var xxx_messageInfo_LogStore proto.InternalMessageInfo 461 462 func (m *LogStore) GetUUID() string { 463 if m != nil { 464 return m.UUID 465 } 466 return "" 467 } 468 469 func (m *LogStore) GetShards() []LogShard { 470 if m != nil { 471 return m.Shards 472 } 473 return nil 474 } 475 476 // CNStore cn store metadata 477 type CNStore struct { 478 // UUID CNStore uuid id 479 UUID string `protobuf:"bytes,1,opt,name=UUID,proto3" json:"UUID,omitempty"` 480 // Role CN role 481 Role CNRole `protobuf:"varint,2,opt,name=Role,proto3,enum=metadata.CNRole" json:"Role,omitempty"` 482 XXX_NoUnkeyedLiteral struct{} `json:"-"` 483 XXX_unrecognized []byte `json:"-"` 484 XXX_sizecache int32 `json:"-"` 485 } 486 487 func (m *CNStore) Reset() { *m = CNStore{} } 488 func (m *CNStore) String() string { return proto.CompactTextString(m) } 489 func (*CNStore) ProtoMessage() {} 490 func (*CNStore) Descriptor() ([]byte, []int) { 491 return fileDescriptor_56d9f74966f40d04, []int{6} 492 } 493 func (m *CNStore) XXX_Unmarshal(b []byte) error { 494 return m.Unmarshal(b) 495 } 496 func (m *CNStore) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 497 if deterministic { 498 return xxx_messageInfo_CNStore.Marshal(b, m, deterministic) 499 } else { 500 b = b[:cap(b)] 501 n, err := m.MarshalToSizedBuffer(b) 502 if err != nil { 503 return nil, err 504 } 505 return b[:n], nil 506 } 507 } 508 func (m *CNStore) XXX_Merge(src proto.Message) { 509 xxx_messageInfo_CNStore.Merge(m, src) 510 } 511 func (m *CNStore) XXX_Size() int { 512 return m.Size() 513 } 514 func (m *CNStore) XXX_DiscardUnknown() { 515 xxx_messageInfo_CNStore.DiscardUnknown(m) 516 } 517 518 var xxx_messageInfo_CNStore proto.InternalMessageInfo 519 520 func (m *CNStore) GetUUID() string { 521 if m != nil { 522 return m.UUID 523 } 524 return "" 525 } 526 527 func (m *CNStore) GetRole() CNRole { 528 if m != nil { 529 return m.Role 530 } 531 return CNRole_TP 532 } 533 534 // CNService cn service metadata 535 type CNService struct { 536 // ServiceID service ID 537 ServiceID string `protobuf:"bytes,1,opt,name=ServiceID,proto3" json:"ServiceID,omitempty"` 538 // LockServiceAddress is used to provide lock service 539 LockServiceAddress string `protobuf:"bytes,2,opt,name=LockServiceAddress,proto3" json:"LockServiceAddress,omitempty"` 540 // PipelineServiceAddress is used to provide distributed pipeline service 541 PipelineServiceAddress string `protobuf:"bytes,3,opt,name=PipelineServiceAddress,proto3" json:"PipelineServiceAddress,omitempty"` 542 // SQLAddress is used to provide SQL input. 543 SQLAddress string `protobuf:"bytes,4,opt,name=SQLAddress,proto3" json:"SQLAddress,omitempty"` 544 // Labels are labels on CN service. 545 Labels map[string]LabelList `protobuf:"bytes,6,rep,name=Labels,proto3" json:"Labels" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 546 // WorkState is the work state of CN service. 547 WorkState WorkState `protobuf:"varint,7,opt,name=WorkState,proto3,enum=metadata.WorkState" json:"WorkState,omitempty"` 548 // QueryAddress is the address of queryservice.QueryService. 549 QueryAddress string `protobuf:"bytes,8,opt,name=QueryAddress,proto3" json:"QueryAddress,omitempty"` 550 XXX_NoUnkeyedLiteral struct{} `json:"-"` 551 XXX_unrecognized []byte `json:"-"` 552 XXX_sizecache int32 `json:"-"` 553 } 554 555 func (m *CNService) Reset() { *m = CNService{} } 556 func (m *CNService) String() string { return proto.CompactTextString(m) } 557 func (*CNService) ProtoMessage() {} 558 func (*CNService) Descriptor() ([]byte, []int) { 559 return fileDescriptor_56d9f74966f40d04, []int{7} 560 } 561 func (m *CNService) XXX_Unmarshal(b []byte) error { 562 return m.Unmarshal(b) 563 } 564 func (m *CNService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 565 if deterministic { 566 return xxx_messageInfo_CNService.Marshal(b, m, deterministic) 567 } else { 568 b = b[:cap(b)] 569 n, err := m.MarshalToSizedBuffer(b) 570 if err != nil { 571 return nil, err 572 } 573 return b[:n], nil 574 } 575 } 576 func (m *CNService) XXX_Merge(src proto.Message) { 577 xxx_messageInfo_CNService.Merge(m, src) 578 } 579 func (m *CNService) XXX_Size() int { 580 return m.Size() 581 } 582 func (m *CNService) XXX_DiscardUnknown() { 583 xxx_messageInfo_CNService.DiscardUnknown(m) 584 } 585 586 var xxx_messageInfo_CNService proto.InternalMessageInfo 587 588 func (m *CNService) GetServiceID() string { 589 if m != nil { 590 return m.ServiceID 591 } 592 return "" 593 } 594 595 func (m *CNService) GetLockServiceAddress() string { 596 if m != nil { 597 return m.LockServiceAddress 598 } 599 return "" 600 } 601 602 func (m *CNService) GetPipelineServiceAddress() string { 603 if m != nil { 604 return m.PipelineServiceAddress 605 } 606 return "" 607 } 608 609 func (m *CNService) GetSQLAddress() string { 610 if m != nil { 611 return m.SQLAddress 612 } 613 return "" 614 } 615 616 func (m *CNService) GetLabels() map[string]LabelList { 617 if m != nil { 618 return m.Labels 619 } 620 return nil 621 } 622 623 func (m *CNService) GetWorkState() WorkState { 624 if m != nil { 625 return m.WorkState 626 } 627 return WorkState_Unknown 628 } 629 630 func (m *CNService) GetQueryAddress() string { 631 if m != nil { 632 return m.QueryAddress 633 } 634 return "" 635 } 636 637 // TNService tn service metadata 638 type TNService struct { 639 // ServiceID service ID 640 ServiceID string `protobuf:"bytes,1,opt,name=ServiceID,proto3" json:"ServiceID,omitempty"` 641 // TxnServiceAddress is used to provide txn service 642 TxnServiceAddress string `protobuf:"bytes,2,opt,name=TxnServiceAddress,proto3" json:"TxnServiceAddress,omitempty"` 643 // LogTailServiceAddress is used to provide logtail push service 644 LogTailServiceAddress string `protobuf:"bytes,3,opt,name=LogTailServiceAddress,proto3" json:"LogTailServiceAddress,omitempty"` 645 // LockServiceAddress lock service address for lock table allocator 646 LockServiceAddress string `protobuf:"bytes,4,opt,name=LockServiceAddress,proto3" json:"LockServiceAddress,omitempty"` 647 // Shards TN shards on service 648 Shards []TNShard `protobuf:"bytes,6,rep,name=Shards,proto3" json:"Shards"` 649 // Labels labels on service 650 Labels map[string]LabelList `protobuf:"bytes,7,rep,name=Labels,proto3" json:"Labels" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 651 // QueryAddress it the address of query service on the tn 652 QueryAddress string `protobuf:"bytes,8,opt,name=QueryAddress,proto3" json:"QueryAddress,omitempty"` 653 XXX_NoUnkeyedLiteral struct{} `json:"-"` 654 XXX_unrecognized []byte `json:"-"` 655 XXX_sizecache int32 `json:"-"` 656 } 657 658 func (m *TNService) Reset() { *m = TNService{} } 659 func (m *TNService) String() string { return proto.CompactTextString(m) } 660 func (*TNService) ProtoMessage() {} 661 func (*TNService) Descriptor() ([]byte, []int) { 662 return fileDescriptor_56d9f74966f40d04, []int{8} 663 } 664 func (m *TNService) XXX_Unmarshal(b []byte) error { 665 return m.Unmarshal(b) 666 } 667 func (m *TNService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 668 if deterministic { 669 return xxx_messageInfo_TNService.Marshal(b, m, deterministic) 670 } else { 671 b = b[:cap(b)] 672 n, err := m.MarshalToSizedBuffer(b) 673 if err != nil { 674 return nil, err 675 } 676 return b[:n], nil 677 } 678 } 679 func (m *TNService) XXX_Merge(src proto.Message) { 680 xxx_messageInfo_TNService.Merge(m, src) 681 } 682 func (m *TNService) XXX_Size() int { 683 return m.Size() 684 } 685 func (m *TNService) XXX_DiscardUnknown() { 686 xxx_messageInfo_TNService.DiscardUnknown(m) 687 } 688 689 var xxx_messageInfo_TNService proto.InternalMessageInfo 690 691 func (m *TNService) GetServiceID() string { 692 if m != nil { 693 return m.ServiceID 694 } 695 return "" 696 } 697 698 func (m *TNService) GetTxnServiceAddress() string { 699 if m != nil { 700 return m.TxnServiceAddress 701 } 702 return "" 703 } 704 705 func (m *TNService) GetLogTailServiceAddress() string { 706 if m != nil { 707 return m.LogTailServiceAddress 708 } 709 return "" 710 } 711 712 func (m *TNService) GetLockServiceAddress() string { 713 if m != nil { 714 return m.LockServiceAddress 715 } 716 return "" 717 } 718 719 func (m *TNService) GetShards() []TNShard { 720 if m != nil { 721 return m.Shards 722 } 723 return nil 724 } 725 726 func (m *TNService) GetLabels() map[string]LabelList { 727 if m != nil { 728 return m.Labels 729 } 730 return nil 731 } 732 733 func (m *TNService) GetQueryAddress() string { 734 if m != nil { 735 return m.QueryAddress 736 } 737 return "" 738 } 739 740 // LabelList defines the labels on CN store. 741 type LabelList struct { 742 Labels []string `protobuf:"bytes,1,rep,name=Labels,proto3" json:"Labels,omitempty"` 743 XXX_NoUnkeyedLiteral struct{} `json:"-"` 744 XXX_unrecognized []byte `json:"-"` 745 XXX_sizecache int32 `json:"-"` 746 } 747 748 func (m *LabelList) Reset() { *m = LabelList{} } 749 func (m *LabelList) String() string { return proto.CompactTextString(m) } 750 func (*LabelList) ProtoMessage() {} 751 func (*LabelList) Descriptor() ([]byte, []int) { 752 return fileDescriptor_56d9f74966f40d04, []int{9} 753 } 754 func (m *LabelList) XXX_Unmarshal(b []byte) error { 755 return m.Unmarshal(b) 756 } 757 func (m *LabelList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 758 if deterministic { 759 return xxx_messageInfo_LabelList.Marshal(b, m, deterministic) 760 } else { 761 b = b[:cap(b)] 762 n, err := m.MarshalToSizedBuffer(b) 763 if err != nil { 764 return nil, err 765 } 766 return b[:n], nil 767 } 768 } 769 func (m *LabelList) XXX_Merge(src proto.Message) { 770 xxx_messageInfo_LabelList.Merge(m, src) 771 } 772 func (m *LabelList) XXX_Size() int { 773 return m.Size() 774 } 775 func (m *LabelList) XXX_DiscardUnknown() { 776 xxx_messageInfo_LabelList.DiscardUnknown(m) 777 } 778 779 var xxx_messageInfo_LabelList proto.InternalMessageInfo 780 781 func (m *LabelList) GetLabels() []string { 782 if m != nil { 783 return m.Labels 784 } 785 return nil 786 } 787 788 func init() { 789 proto.RegisterEnum("metadata.ServiceType", ServiceType_name, ServiceType_value) 790 proto.RegisterEnum("metadata.CNRole", CNRole_name, CNRole_value) 791 proto.RegisterEnum("metadata.WorkState", WorkState_name, WorkState_value) 792 proto.RegisterType((*TNShardRecord)(nil), "metadata.TNShardRecord") 793 proto.RegisterType((*TNShard)(nil), "metadata.TNShard") 794 proto.RegisterType((*LogShardRecord)(nil), "metadata.LogShardRecord") 795 proto.RegisterType((*LogShard)(nil), "metadata.LogShard") 796 proto.RegisterType((*TNStore)(nil), "metadata.TNStore") 797 proto.RegisterType((*LogStore)(nil), "metadata.LogStore") 798 proto.RegisterType((*CNStore)(nil), "metadata.CNStore") 799 proto.RegisterType((*CNService)(nil), "metadata.CNService") 800 proto.RegisterMapType((map[string]LabelList)(nil), "metadata.CNService.LabelsEntry") 801 proto.RegisterType((*TNService)(nil), "metadata.TNService") 802 proto.RegisterMapType((map[string]LabelList)(nil), "metadata.TNService.LabelsEntry") 803 proto.RegisterType((*LabelList)(nil), "metadata.LabelList") 804 } 805 806 func init() { proto.RegisterFile("metadata.proto", fileDescriptor_56d9f74966f40d04) } 807 808 var fileDescriptor_56d9f74966f40d04 = []byte{ 809 // 728 bytes of a gzipped FileDescriptorProto 810 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0xc1, 0x6e, 0xd3, 0x4c, 811 0x10, 0xee, 0xc6, 0xae, 0x13, 0x4f, 0xfa, 0x47, 0xee, 0xfe, 0xa2, 0x58, 0x15, 0x4a, 0x2b, 0xc3, 812 0x21, 0x44, 0x90, 0xd0, 0x82, 0x10, 0x42, 0x42, 0xa2, 0x4d, 0xa1, 0xb4, 0xb2, 0x9c, 0xd4, 0x71, 813 0x80, 0x72, 0x41, 0x4e, 0xb2, 0x75, 0xad, 0x24, 0xde, 0xc8, 0x71, 0x4a, 0xf3, 0x0a, 0xbc, 0x03, 814 0x67, 0x5e, 0xa5, 0xc7, 0x3e, 0x41, 0x05, 0x7d, 0x12, 0xe4, 0xb5, 0x1d, 0xbb, 0x4e, 0x52, 0x7a, 815 0xe3, 0xe4, 0x9d, 0xf9, 0x66, 0xbf, 0x99, 0x6f, 0x66, 0x56, 0x86, 0xc2, 0x80, 0x78, 0x66, 0xd7, 816 0xf4, 0xcc, 0xca, 0xd0, 0xa5, 0x1e, 0xc5, 0xb9, 0xc8, 0x5e, 0x7f, 0x6a, 0xd9, 0xde, 0xe9, 0xb8, 817 0x5d, 0xe9, 0xd0, 0x41, 0xd5, 0xa2, 0x16, 0xad, 0xb2, 0x80, 0xf6, 0xf8, 0x84, 0x59, 0xcc, 0x60, 818 0xa7, 0xe0, 0xa2, 0x72, 0x00, 0xff, 0x19, 0x5a, 0xf3, 0xd4, 0x74, 0xbb, 0x3a, 0xe9, 0x50, 0xb7, 819 0x8b, 0x65, 0xc8, 0x32, 0xf3, 0x60, 0x4f, 0x46, 0x9b, 0xa8, 0xc4, 0xeb, 0x91, 0x89, 0x8b, 0x00, 820 0x2a, 0xb5, 0x22, 0x30, 0xc3, 0xc0, 0x84, 0x47, 0xf9, 0x8e, 0x20, 0x1b, 0x72, 0xe1, 0xfd, 0x14, 821 0x2d, 0xe3, 0xca, 0x6f, 0xdf, 0xaf, 0x4c, 0xeb, 0xbe, 0x01, 0xef, 0xe6, 0x2e, 0xae, 0x36, 0x96, 822 0x2e, 0xaf, 0x36, 0x90, 0x9e, 0x2a, 0xe7, 0x01, 0x88, 0x3a, 0x19, 0xf6, 0xed, 0x8e, 0x39, 0xcd, 823 0x19, 0x3b, 0xfc, 0x62, 0x77, 0xba, 0x5d, 0x97, 0x8c, 0x46, 0x32, 0xb7, 0x89, 0x4a, 0xa2, 0x1e, 824 0x99, 0xca, 0x47, 0x28, 0x44, 0xa5, 0xfd, 0x55, 0x58, 0x19, 0x24, 0x6d, 0x3c, 0x68, 0x13, 0xb7, 825 0x7e, 0x12, 0x52, 0x8f, 0xc2, 0x54, 0x33, 0x7e, 0xc5, 0x83, 0x5c, 0xc4, 0x8b, 0x0f, 0xd3, 0x39, 826 0x42, 0x95, 0x72, 0xac, 0xf2, 0x26, 0x9e, 0x90, 0x99, 0xae, 0xee, 0x56, 0x9d, 0x8a, 0xc6, 0x3a, 827 0xeb, 0x51, 0x97, 0x60, 0x0c, 0x7c, 0xab, 0x15, 0x6a, 0x10, 0x75, 0x76, 0xc6, 0x55, 0x10, 0x18, 828 0x97, 0x5f, 0x36, 0x57, 0xca, 0x6f, 0xaf, 0xce, 0xb4, 0x79, 0x97, 0xf7, 0x33, 0xeb, 0x61, 0x98, 829 0xd2, 0x08, 0x54, 0x2c, 0x24, 0x7c, 0x96, 0x22, 0xc4, 0xb3, 0x8a, 0x52, 0x8c, 0x35, 0xc8, 0xd6, 830 0x6e, 0xa9, 0xf0, 0x11, 0xf0, 0x3a, 0xed, 0x13, 0xa6, 0xac, 0xb0, 0x2d, 0xc5, 0x74, 0x35, 0xcd, 831 0xf7, 0xeb, 0x0c, 0x55, 0x7e, 0x70, 0x20, 0xd6, 0xb4, 0x26, 0x71, 0xcf, 0xec, 0x0e, 0xf1, 0x5b, 832 0x12, 0x1e, 0xa7, 0x64, 0xb1, 0x03, 0x57, 0x00, 0xab, 0xb4, 0xd3, 0x0b, 0x1d, 0xd1, 0x16, 0x64, 833 0x58, 0xd8, 0x1c, 0x04, 0xbf, 0x84, 0xb5, 0x86, 0x3d, 0x24, 0x7d, 0xdb, 0x21, 0xa9, 0x3b, 0xc1, 834 0xe6, 0x2c, 0x40, 0xfd, 0xad, 0x6f, 0x1e, 0xa9, 0x51, 0x2c, 0xcf, 0x62, 0x13, 0x1e, 0xfc, 0x06, 835 0x04, 0xd5, 0x6c, 0x93, 0xfe, 0x48, 0x16, 0x58, 0xab, 0x36, 0x92, 0xda, 0x42, 0xae, 0x4a, 0x10, 836 0xf1, 0xce, 0xf1, 0xdc, 0x49, 0xd4, 0xb7, 0xc0, 0x85, 0xb7, 0x40, 0xfc, 0x44, 0xdd, 0x5e, 0xd3, 837 0x33, 0x3d, 0x22, 0x67, 0x59, 0x77, 0xfe, 0x8f, 0x19, 0xa6, 0x90, 0x1e, 0x47, 0x61, 0x05, 0x56, 838 0x8e, 0xc6, 0xc4, 0x9d, 0x44, 0x35, 0xe5, 0x58, 0x4d, 0x37, 0x7c, 0xeb, 0x1a, 0xe4, 0x13, 0x39, 839 0xb1, 0x04, 0x5c, 0x8f, 0x4c, 0xc2, 0x26, 0xfa, 0x47, 0xfc, 0x18, 0x96, 0xcf, 0xcc, 0xfe, 0x38, 840 0x98, 0x48, 0x3e, 0x99, 0x93, 0xdd, 0x53, 0xed, 0x91, 0xa7, 0x07, 0x11, 0xaf, 0x33, 0xaf, 0xd0, 841 0x21, 0x9f, 0x5b, 0x96, 0x04, 0xe5, 0x27, 0x07, 0xa2, 0x71, 0xc7, 0xf9, 0x3c, 0x81, 0x55, 0xe3, 842 0xdc, 0x99, 0x3b, 0x9e, 0x59, 0x00, 0xbf, 0x80, 0x7b, 0x2a, 0xb5, 0x0c, 0xd3, 0xee, 0xcf, 0x1d, 843 0xce, 0x7c, 0x70, 0xc1, 0x0e, 0xf0, 0x0b, 0x77, 0x20, 0x7e, 0x27, 0xc2, 0x9d, 0xde, 0x49, 0x62, 844 0xb8, 0xd9, 0xf4, 0x70, 0x8d, 0x3b, 0x0c, 0xf7, 0xdf, 0x4d, 0xea, 0x21, 0x88, 0x53, 0x14, 0xaf, 845 0x4d, 0x55, 0xa0, 0x4d, 0xae, 0x24, 0x46, 0xe5, 0x95, 0x77, 0x20, 0x1f, 0x6a, 0x30, 0x26, 0x43, 846 0x82, 0x05, 0xc8, 0xd4, 0x34, 0x69, 0xc9, 0xff, 0x1a, 0x9a, 0x84, 0x70, 0x16, 0x38, 0xb5, 0xbe, 847 0x2f, 0x65, 0xb0, 0x08, 0xcb, 0x0d, 0xbd, 0xfe, 0xf9, 0x58, 0xe2, 0x70, 0x01, 0xa0, 0x71, 0x6c, 848 0x7c, 0xa8, 0x6b, 0x5f, 0x5b, 0x7b, 0xef, 0x25, 0xbe, 0x2c, 0x83, 0x10, 0xbc, 0x60, 0x76, 0xab, 849 0x11, 0xdc, 0xde, 0x69, 0x48, 0xa8, 0xfc, 0x36, 0xb1, 0xd8, 0x38, 0x0f, 0xd9, 0x96, 0xd3, 0x73, 850 0xe8, 0x37, 0x47, 0x5a, 0xf2, 0x0d, 0x1f, 0xb1, 0x1d, 0x4b, 0x42, 0x78, 0x05, 0x72, 0x7b, 0xae, 851 0x69, 0x3b, 0xbe, 0x95, 0xf1, 0x21, 0x66, 0x91, 0xae, 0xc4, 0xed, 0xd6, 0x2e, 0x7f, 0x17, 0xd1, 852 0xc5, 0x75, 0x11, 0x5d, 0x5e, 0x17, 0xd1, 0xaf, 0xeb, 0x22, 0xfa, 0xb2, 0x95, 0xf8, 0xb7, 0x0d, 853 0x4c, 0xcf, 0xb5, 0xcf, 0xa9, 0x6b, 0x5b, 0xb6, 0x13, 0x19, 0x0e, 0xa9, 0x0e, 0x7b, 0x56, 0x75, 854 0xd8, 0xae, 0x46, 0x3d, 0x6a, 0x0b, 0xec, 0x37, 0xf7, 0xfc, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 855 0xfa, 0x1f, 0x9e, 0xb4, 0x31, 0x07, 0x00, 0x00, 856 } 857 858 func (m *TNShardRecord) Marshal() (dAtA []byte, err error) { 859 size := m.Size() 860 dAtA = make([]byte, size) 861 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 862 if err != nil { 863 return nil, err 864 } 865 return dAtA[:n], nil 866 } 867 868 func (m *TNShardRecord) MarshalTo(dAtA []byte) (int, error) { 869 size := m.Size() 870 return m.MarshalToSizedBuffer(dAtA[:size]) 871 } 872 873 func (m *TNShardRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { 874 i := len(dAtA) 875 _ = i 876 var l int 877 _ = l 878 if m.XXX_unrecognized != nil { 879 i -= len(m.XXX_unrecognized) 880 copy(dAtA[i:], m.XXX_unrecognized) 881 } 882 if m.LogShardID != 0 { 883 i = encodeVarintMetadata(dAtA, i, uint64(m.LogShardID)) 884 i-- 885 dAtA[i] = 0x10 886 } 887 if m.ShardID != 0 { 888 i = encodeVarintMetadata(dAtA, i, uint64(m.ShardID)) 889 i-- 890 dAtA[i] = 0x8 891 } 892 return len(dAtA) - i, nil 893 } 894 895 func (m *TNShard) Marshal() (dAtA []byte, err error) { 896 size := m.Size() 897 dAtA = make([]byte, size) 898 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 899 if err != nil { 900 return nil, err 901 } 902 return dAtA[:n], nil 903 } 904 905 func (m *TNShard) MarshalTo(dAtA []byte) (int, error) { 906 size := m.Size() 907 return m.MarshalToSizedBuffer(dAtA[:size]) 908 } 909 910 func (m *TNShard) MarshalToSizedBuffer(dAtA []byte) (int, error) { 911 i := len(dAtA) 912 _ = i 913 var l int 914 _ = l 915 if m.XXX_unrecognized != nil { 916 i -= len(m.XXX_unrecognized) 917 copy(dAtA[i:], m.XXX_unrecognized) 918 } 919 if len(m.Address) > 0 { 920 i -= len(m.Address) 921 copy(dAtA[i:], m.Address) 922 i = encodeVarintMetadata(dAtA, i, uint64(len(m.Address))) 923 i-- 924 dAtA[i] = 0x1a 925 } 926 if m.ReplicaID != 0 { 927 i = encodeVarintMetadata(dAtA, i, uint64(m.ReplicaID)) 928 i-- 929 dAtA[i] = 0x10 930 } 931 { 932 size, err := m.TNShardRecord.MarshalToSizedBuffer(dAtA[:i]) 933 if err != nil { 934 return 0, err 935 } 936 i -= size 937 i = encodeVarintMetadata(dAtA, i, uint64(size)) 938 } 939 i-- 940 dAtA[i] = 0xa 941 return len(dAtA) - i, nil 942 } 943 944 func (m *LogShardRecord) Marshal() (dAtA []byte, err error) { 945 size := m.Size() 946 dAtA = make([]byte, size) 947 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 948 if err != nil { 949 return nil, err 950 } 951 return dAtA[:n], nil 952 } 953 954 func (m *LogShardRecord) MarshalTo(dAtA []byte) (int, error) { 955 size := m.Size() 956 return m.MarshalToSizedBuffer(dAtA[:size]) 957 } 958 959 func (m *LogShardRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { 960 i := len(dAtA) 961 _ = i 962 var l int 963 _ = l 964 if m.XXX_unrecognized != nil { 965 i -= len(m.XXX_unrecognized) 966 copy(dAtA[i:], m.XXX_unrecognized) 967 } 968 if m.NumberOfReplicas != 0 { 969 i = encodeVarintMetadata(dAtA, i, uint64(m.NumberOfReplicas)) 970 i-- 971 dAtA[i] = 0x10 972 } 973 if m.ShardID != 0 { 974 i = encodeVarintMetadata(dAtA, i, uint64(m.ShardID)) 975 i-- 976 dAtA[i] = 0x8 977 } 978 return len(dAtA) - i, nil 979 } 980 981 func (m *LogShard) Marshal() (dAtA []byte, err error) { 982 size := m.Size() 983 dAtA = make([]byte, size) 984 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 985 if err != nil { 986 return nil, err 987 } 988 return dAtA[:n], nil 989 } 990 991 func (m *LogShard) MarshalTo(dAtA []byte) (int, error) { 992 size := m.Size() 993 return m.MarshalToSizedBuffer(dAtA[:size]) 994 } 995 996 func (m *LogShard) MarshalToSizedBuffer(dAtA []byte) (int, error) { 997 i := len(dAtA) 998 _ = i 999 var l int 1000 _ = l 1001 if m.XXX_unrecognized != nil { 1002 i -= len(m.XXX_unrecognized) 1003 copy(dAtA[i:], m.XXX_unrecognized) 1004 } 1005 if m.ReplicaID != 0 { 1006 i = encodeVarintMetadata(dAtA, i, uint64(m.ReplicaID)) 1007 i-- 1008 dAtA[i] = 0x10 1009 } 1010 { 1011 size, err := m.LogShardRecord.MarshalToSizedBuffer(dAtA[:i]) 1012 if err != nil { 1013 return 0, err 1014 } 1015 i -= size 1016 i = encodeVarintMetadata(dAtA, i, uint64(size)) 1017 } 1018 i-- 1019 dAtA[i] = 0xa 1020 return len(dAtA) - i, nil 1021 } 1022 1023 func (m *TNStore) Marshal() (dAtA []byte, err error) { 1024 size := m.Size() 1025 dAtA = make([]byte, size) 1026 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1027 if err != nil { 1028 return nil, err 1029 } 1030 return dAtA[:n], nil 1031 } 1032 1033 func (m *TNStore) MarshalTo(dAtA []byte) (int, error) { 1034 size := m.Size() 1035 return m.MarshalToSizedBuffer(dAtA[:size]) 1036 } 1037 1038 func (m *TNStore) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1039 i := len(dAtA) 1040 _ = i 1041 var l int 1042 _ = l 1043 if m.XXX_unrecognized != nil { 1044 i -= len(m.XXX_unrecognized) 1045 copy(dAtA[i:], m.XXX_unrecognized) 1046 } 1047 if len(m.Shards) > 0 { 1048 for iNdEx := len(m.Shards) - 1; iNdEx >= 0; iNdEx-- { 1049 { 1050 size, err := m.Shards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1051 if err != nil { 1052 return 0, err 1053 } 1054 i -= size 1055 i = encodeVarintMetadata(dAtA, i, uint64(size)) 1056 } 1057 i-- 1058 dAtA[i] = 0x12 1059 } 1060 } 1061 if len(m.UUID) > 0 { 1062 i -= len(m.UUID) 1063 copy(dAtA[i:], m.UUID) 1064 i = encodeVarintMetadata(dAtA, i, uint64(len(m.UUID))) 1065 i-- 1066 dAtA[i] = 0xa 1067 } 1068 return len(dAtA) - i, nil 1069 } 1070 1071 func (m *LogStore) Marshal() (dAtA []byte, err error) { 1072 size := m.Size() 1073 dAtA = make([]byte, size) 1074 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1075 if err != nil { 1076 return nil, err 1077 } 1078 return dAtA[:n], nil 1079 } 1080 1081 func (m *LogStore) MarshalTo(dAtA []byte) (int, error) { 1082 size := m.Size() 1083 return m.MarshalToSizedBuffer(dAtA[:size]) 1084 } 1085 1086 func (m *LogStore) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1087 i := len(dAtA) 1088 _ = i 1089 var l int 1090 _ = l 1091 if m.XXX_unrecognized != nil { 1092 i -= len(m.XXX_unrecognized) 1093 copy(dAtA[i:], m.XXX_unrecognized) 1094 } 1095 if len(m.Shards) > 0 { 1096 for iNdEx := len(m.Shards) - 1; iNdEx >= 0; iNdEx-- { 1097 { 1098 size, err := m.Shards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1099 if err != nil { 1100 return 0, err 1101 } 1102 i -= size 1103 i = encodeVarintMetadata(dAtA, i, uint64(size)) 1104 } 1105 i-- 1106 dAtA[i] = 0x12 1107 } 1108 } 1109 if len(m.UUID) > 0 { 1110 i -= len(m.UUID) 1111 copy(dAtA[i:], m.UUID) 1112 i = encodeVarintMetadata(dAtA, i, uint64(len(m.UUID))) 1113 i-- 1114 dAtA[i] = 0xa 1115 } 1116 return len(dAtA) - i, nil 1117 } 1118 1119 func (m *CNStore) Marshal() (dAtA []byte, err error) { 1120 size := m.Size() 1121 dAtA = make([]byte, size) 1122 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1123 if err != nil { 1124 return nil, err 1125 } 1126 return dAtA[:n], nil 1127 } 1128 1129 func (m *CNStore) MarshalTo(dAtA []byte) (int, error) { 1130 size := m.Size() 1131 return m.MarshalToSizedBuffer(dAtA[:size]) 1132 } 1133 1134 func (m *CNStore) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1135 i := len(dAtA) 1136 _ = i 1137 var l int 1138 _ = l 1139 if m.XXX_unrecognized != nil { 1140 i -= len(m.XXX_unrecognized) 1141 copy(dAtA[i:], m.XXX_unrecognized) 1142 } 1143 if m.Role != 0 { 1144 i = encodeVarintMetadata(dAtA, i, uint64(m.Role)) 1145 i-- 1146 dAtA[i] = 0x10 1147 } 1148 if len(m.UUID) > 0 { 1149 i -= len(m.UUID) 1150 copy(dAtA[i:], m.UUID) 1151 i = encodeVarintMetadata(dAtA, i, uint64(len(m.UUID))) 1152 i-- 1153 dAtA[i] = 0xa 1154 } 1155 return len(dAtA) - i, nil 1156 } 1157 1158 func (m *CNService) Marshal() (dAtA []byte, err error) { 1159 size := m.Size() 1160 dAtA = make([]byte, size) 1161 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1162 if err != nil { 1163 return nil, err 1164 } 1165 return dAtA[:n], nil 1166 } 1167 1168 func (m *CNService) MarshalTo(dAtA []byte) (int, error) { 1169 size := m.Size() 1170 return m.MarshalToSizedBuffer(dAtA[:size]) 1171 } 1172 1173 func (m *CNService) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1174 i := len(dAtA) 1175 _ = i 1176 var l int 1177 _ = l 1178 if m.XXX_unrecognized != nil { 1179 i -= len(m.XXX_unrecognized) 1180 copy(dAtA[i:], m.XXX_unrecognized) 1181 } 1182 if len(m.QueryAddress) > 0 { 1183 i -= len(m.QueryAddress) 1184 copy(dAtA[i:], m.QueryAddress) 1185 i = encodeVarintMetadata(dAtA, i, uint64(len(m.QueryAddress))) 1186 i-- 1187 dAtA[i] = 0x42 1188 } 1189 if m.WorkState != 0 { 1190 i = encodeVarintMetadata(dAtA, i, uint64(m.WorkState)) 1191 i-- 1192 dAtA[i] = 0x38 1193 } 1194 if len(m.Labels) > 0 { 1195 for k := range m.Labels { 1196 v := m.Labels[k] 1197 baseI := i 1198 { 1199 size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) 1200 if err != nil { 1201 return 0, err 1202 } 1203 i -= size 1204 i = encodeVarintMetadata(dAtA, i, uint64(size)) 1205 } 1206 i-- 1207 dAtA[i] = 0x12 1208 i -= len(k) 1209 copy(dAtA[i:], k) 1210 i = encodeVarintMetadata(dAtA, i, uint64(len(k))) 1211 i-- 1212 dAtA[i] = 0xa 1213 i = encodeVarintMetadata(dAtA, i, uint64(baseI-i)) 1214 i-- 1215 dAtA[i] = 0x32 1216 } 1217 } 1218 if len(m.SQLAddress) > 0 { 1219 i -= len(m.SQLAddress) 1220 copy(dAtA[i:], m.SQLAddress) 1221 i = encodeVarintMetadata(dAtA, i, uint64(len(m.SQLAddress))) 1222 i-- 1223 dAtA[i] = 0x22 1224 } 1225 if len(m.PipelineServiceAddress) > 0 { 1226 i -= len(m.PipelineServiceAddress) 1227 copy(dAtA[i:], m.PipelineServiceAddress) 1228 i = encodeVarintMetadata(dAtA, i, uint64(len(m.PipelineServiceAddress))) 1229 i-- 1230 dAtA[i] = 0x1a 1231 } 1232 if len(m.LockServiceAddress) > 0 { 1233 i -= len(m.LockServiceAddress) 1234 copy(dAtA[i:], m.LockServiceAddress) 1235 i = encodeVarintMetadata(dAtA, i, uint64(len(m.LockServiceAddress))) 1236 i-- 1237 dAtA[i] = 0x12 1238 } 1239 if len(m.ServiceID) > 0 { 1240 i -= len(m.ServiceID) 1241 copy(dAtA[i:], m.ServiceID) 1242 i = encodeVarintMetadata(dAtA, i, uint64(len(m.ServiceID))) 1243 i-- 1244 dAtA[i] = 0xa 1245 } 1246 return len(dAtA) - i, nil 1247 } 1248 1249 func (m *TNService) Marshal() (dAtA []byte, err error) { 1250 size := m.Size() 1251 dAtA = make([]byte, size) 1252 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1253 if err != nil { 1254 return nil, err 1255 } 1256 return dAtA[:n], nil 1257 } 1258 1259 func (m *TNService) MarshalTo(dAtA []byte) (int, error) { 1260 size := m.Size() 1261 return m.MarshalToSizedBuffer(dAtA[:size]) 1262 } 1263 1264 func (m *TNService) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1265 i := len(dAtA) 1266 _ = i 1267 var l int 1268 _ = l 1269 if m.XXX_unrecognized != nil { 1270 i -= len(m.XXX_unrecognized) 1271 copy(dAtA[i:], m.XXX_unrecognized) 1272 } 1273 if len(m.QueryAddress) > 0 { 1274 i -= len(m.QueryAddress) 1275 copy(dAtA[i:], m.QueryAddress) 1276 i = encodeVarintMetadata(dAtA, i, uint64(len(m.QueryAddress))) 1277 i-- 1278 dAtA[i] = 0x42 1279 } 1280 if len(m.Labels) > 0 { 1281 for k := range m.Labels { 1282 v := m.Labels[k] 1283 baseI := i 1284 { 1285 size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) 1286 if err != nil { 1287 return 0, err 1288 } 1289 i -= size 1290 i = encodeVarintMetadata(dAtA, i, uint64(size)) 1291 } 1292 i-- 1293 dAtA[i] = 0x12 1294 i -= len(k) 1295 copy(dAtA[i:], k) 1296 i = encodeVarintMetadata(dAtA, i, uint64(len(k))) 1297 i-- 1298 dAtA[i] = 0xa 1299 i = encodeVarintMetadata(dAtA, i, uint64(baseI-i)) 1300 i-- 1301 dAtA[i] = 0x3a 1302 } 1303 } 1304 if len(m.Shards) > 0 { 1305 for iNdEx := len(m.Shards) - 1; iNdEx >= 0; iNdEx-- { 1306 { 1307 size, err := m.Shards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1308 if err != nil { 1309 return 0, err 1310 } 1311 i -= size 1312 i = encodeVarintMetadata(dAtA, i, uint64(size)) 1313 } 1314 i-- 1315 dAtA[i] = 0x32 1316 } 1317 } 1318 if len(m.LockServiceAddress) > 0 { 1319 i -= len(m.LockServiceAddress) 1320 copy(dAtA[i:], m.LockServiceAddress) 1321 i = encodeVarintMetadata(dAtA, i, uint64(len(m.LockServiceAddress))) 1322 i-- 1323 dAtA[i] = 0x22 1324 } 1325 if len(m.LogTailServiceAddress) > 0 { 1326 i -= len(m.LogTailServiceAddress) 1327 copy(dAtA[i:], m.LogTailServiceAddress) 1328 i = encodeVarintMetadata(dAtA, i, uint64(len(m.LogTailServiceAddress))) 1329 i-- 1330 dAtA[i] = 0x1a 1331 } 1332 if len(m.TxnServiceAddress) > 0 { 1333 i -= len(m.TxnServiceAddress) 1334 copy(dAtA[i:], m.TxnServiceAddress) 1335 i = encodeVarintMetadata(dAtA, i, uint64(len(m.TxnServiceAddress))) 1336 i-- 1337 dAtA[i] = 0x12 1338 } 1339 if len(m.ServiceID) > 0 { 1340 i -= len(m.ServiceID) 1341 copy(dAtA[i:], m.ServiceID) 1342 i = encodeVarintMetadata(dAtA, i, uint64(len(m.ServiceID))) 1343 i-- 1344 dAtA[i] = 0xa 1345 } 1346 return len(dAtA) - i, nil 1347 } 1348 1349 func (m *LabelList) Marshal() (dAtA []byte, err error) { 1350 size := m.Size() 1351 dAtA = make([]byte, size) 1352 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1353 if err != nil { 1354 return nil, err 1355 } 1356 return dAtA[:n], nil 1357 } 1358 1359 func (m *LabelList) MarshalTo(dAtA []byte) (int, error) { 1360 size := m.Size() 1361 return m.MarshalToSizedBuffer(dAtA[:size]) 1362 } 1363 1364 func (m *LabelList) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1365 i := len(dAtA) 1366 _ = i 1367 var l int 1368 _ = l 1369 if m.XXX_unrecognized != nil { 1370 i -= len(m.XXX_unrecognized) 1371 copy(dAtA[i:], m.XXX_unrecognized) 1372 } 1373 if len(m.Labels) > 0 { 1374 for iNdEx := len(m.Labels) - 1; iNdEx >= 0; iNdEx-- { 1375 i -= len(m.Labels[iNdEx]) 1376 copy(dAtA[i:], m.Labels[iNdEx]) 1377 i = encodeVarintMetadata(dAtA, i, uint64(len(m.Labels[iNdEx]))) 1378 i-- 1379 dAtA[i] = 0xa 1380 } 1381 } 1382 return len(dAtA) - i, nil 1383 } 1384 1385 func encodeVarintMetadata(dAtA []byte, offset int, v uint64) int { 1386 offset -= sovMetadata(v) 1387 base := offset 1388 for v >= 1<<7 { 1389 dAtA[offset] = uint8(v&0x7f | 0x80) 1390 v >>= 7 1391 offset++ 1392 } 1393 dAtA[offset] = uint8(v) 1394 return base 1395 } 1396 func (m *TNShardRecord) Size() (n int) { 1397 if m == nil { 1398 return 0 1399 } 1400 var l int 1401 _ = l 1402 if m.ShardID != 0 { 1403 n += 1 + sovMetadata(uint64(m.ShardID)) 1404 } 1405 if m.LogShardID != 0 { 1406 n += 1 + sovMetadata(uint64(m.LogShardID)) 1407 } 1408 if m.XXX_unrecognized != nil { 1409 n += len(m.XXX_unrecognized) 1410 } 1411 return n 1412 } 1413 1414 func (m *TNShard) Size() (n int) { 1415 if m == nil { 1416 return 0 1417 } 1418 var l int 1419 _ = l 1420 l = m.TNShardRecord.Size() 1421 n += 1 + l + sovMetadata(uint64(l)) 1422 if m.ReplicaID != 0 { 1423 n += 1 + sovMetadata(uint64(m.ReplicaID)) 1424 } 1425 l = len(m.Address) 1426 if l > 0 { 1427 n += 1 + l + sovMetadata(uint64(l)) 1428 } 1429 if m.XXX_unrecognized != nil { 1430 n += len(m.XXX_unrecognized) 1431 } 1432 return n 1433 } 1434 1435 func (m *LogShardRecord) Size() (n int) { 1436 if m == nil { 1437 return 0 1438 } 1439 var l int 1440 _ = l 1441 if m.ShardID != 0 { 1442 n += 1 + sovMetadata(uint64(m.ShardID)) 1443 } 1444 if m.NumberOfReplicas != 0 { 1445 n += 1 + sovMetadata(uint64(m.NumberOfReplicas)) 1446 } 1447 if m.XXX_unrecognized != nil { 1448 n += len(m.XXX_unrecognized) 1449 } 1450 return n 1451 } 1452 1453 func (m *LogShard) Size() (n int) { 1454 if m == nil { 1455 return 0 1456 } 1457 var l int 1458 _ = l 1459 l = m.LogShardRecord.Size() 1460 n += 1 + l + sovMetadata(uint64(l)) 1461 if m.ReplicaID != 0 { 1462 n += 1 + sovMetadata(uint64(m.ReplicaID)) 1463 } 1464 if m.XXX_unrecognized != nil { 1465 n += len(m.XXX_unrecognized) 1466 } 1467 return n 1468 } 1469 1470 func (m *TNStore) Size() (n int) { 1471 if m == nil { 1472 return 0 1473 } 1474 var l int 1475 _ = l 1476 l = len(m.UUID) 1477 if l > 0 { 1478 n += 1 + l + sovMetadata(uint64(l)) 1479 } 1480 if len(m.Shards) > 0 { 1481 for _, e := range m.Shards { 1482 l = e.Size() 1483 n += 1 + l + sovMetadata(uint64(l)) 1484 } 1485 } 1486 if m.XXX_unrecognized != nil { 1487 n += len(m.XXX_unrecognized) 1488 } 1489 return n 1490 } 1491 1492 func (m *LogStore) Size() (n int) { 1493 if m == nil { 1494 return 0 1495 } 1496 var l int 1497 _ = l 1498 l = len(m.UUID) 1499 if l > 0 { 1500 n += 1 + l + sovMetadata(uint64(l)) 1501 } 1502 if len(m.Shards) > 0 { 1503 for _, e := range m.Shards { 1504 l = e.Size() 1505 n += 1 + l + sovMetadata(uint64(l)) 1506 } 1507 } 1508 if m.XXX_unrecognized != nil { 1509 n += len(m.XXX_unrecognized) 1510 } 1511 return n 1512 } 1513 1514 func (m *CNStore) Size() (n int) { 1515 if m == nil { 1516 return 0 1517 } 1518 var l int 1519 _ = l 1520 l = len(m.UUID) 1521 if l > 0 { 1522 n += 1 + l + sovMetadata(uint64(l)) 1523 } 1524 if m.Role != 0 { 1525 n += 1 + sovMetadata(uint64(m.Role)) 1526 } 1527 if m.XXX_unrecognized != nil { 1528 n += len(m.XXX_unrecognized) 1529 } 1530 return n 1531 } 1532 1533 func (m *CNService) Size() (n int) { 1534 if m == nil { 1535 return 0 1536 } 1537 var l int 1538 _ = l 1539 l = len(m.ServiceID) 1540 if l > 0 { 1541 n += 1 + l + sovMetadata(uint64(l)) 1542 } 1543 l = len(m.LockServiceAddress) 1544 if l > 0 { 1545 n += 1 + l + sovMetadata(uint64(l)) 1546 } 1547 l = len(m.PipelineServiceAddress) 1548 if l > 0 { 1549 n += 1 + l + sovMetadata(uint64(l)) 1550 } 1551 l = len(m.SQLAddress) 1552 if l > 0 { 1553 n += 1 + l + sovMetadata(uint64(l)) 1554 } 1555 if len(m.Labels) > 0 { 1556 for k, v := range m.Labels { 1557 _ = k 1558 _ = v 1559 l = v.Size() 1560 mapEntrySize := 1 + len(k) + sovMetadata(uint64(len(k))) + 1 + l + sovMetadata(uint64(l)) 1561 n += mapEntrySize + 1 + sovMetadata(uint64(mapEntrySize)) 1562 } 1563 } 1564 if m.WorkState != 0 { 1565 n += 1 + sovMetadata(uint64(m.WorkState)) 1566 } 1567 l = len(m.QueryAddress) 1568 if l > 0 { 1569 n += 1 + l + sovMetadata(uint64(l)) 1570 } 1571 if m.XXX_unrecognized != nil { 1572 n += len(m.XXX_unrecognized) 1573 } 1574 return n 1575 } 1576 1577 func (m *TNService) Size() (n int) { 1578 if m == nil { 1579 return 0 1580 } 1581 var l int 1582 _ = l 1583 l = len(m.ServiceID) 1584 if l > 0 { 1585 n += 1 + l + sovMetadata(uint64(l)) 1586 } 1587 l = len(m.TxnServiceAddress) 1588 if l > 0 { 1589 n += 1 + l + sovMetadata(uint64(l)) 1590 } 1591 l = len(m.LogTailServiceAddress) 1592 if l > 0 { 1593 n += 1 + l + sovMetadata(uint64(l)) 1594 } 1595 l = len(m.LockServiceAddress) 1596 if l > 0 { 1597 n += 1 + l + sovMetadata(uint64(l)) 1598 } 1599 if len(m.Shards) > 0 { 1600 for _, e := range m.Shards { 1601 l = e.Size() 1602 n += 1 + l + sovMetadata(uint64(l)) 1603 } 1604 } 1605 if len(m.Labels) > 0 { 1606 for k, v := range m.Labels { 1607 _ = k 1608 _ = v 1609 l = v.Size() 1610 mapEntrySize := 1 + len(k) + sovMetadata(uint64(len(k))) + 1 + l + sovMetadata(uint64(l)) 1611 n += mapEntrySize + 1 + sovMetadata(uint64(mapEntrySize)) 1612 } 1613 } 1614 l = len(m.QueryAddress) 1615 if l > 0 { 1616 n += 1 + l + sovMetadata(uint64(l)) 1617 } 1618 if m.XXX_unrecognized != nil { 1619 n += len(m.XXX_unrecognized) 1620 } 1621 return n 1622 } 1623 1624 func (m *LabelList) Size() (n int) { 1625 if m == nil { 1626 return 0 1627 } 1628 var l int 1629 _ = l 1630 if len(m.Labels) > 0 { 1631 for _, s := range m.Labels { 1632 l = len(s) 1633 n += 1 + l + sovMetadata(uint64(l)) 1634 } 1635 } 1636 if m.XXX_unrecognized != nil { 1637 n += len(m.XXX_unrecognized) 1638 } 1639 return n 1640 } 1641 1642 func sovMetadata(x uint64) (n int) { 1643 return (math_bits.Len64(x|1) + 6) / 7 1644 } 1645 func sozMetadata(x uint64) (n int) { 1646 return sovMetadata(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1647 } 1648 func (m *TNShardRecord) Unmarshal(dAtA []byte) error { 1649 l := len(dAtA) 1650 iNdEx := 0 1651 for iNdEx < l { 1652 preIndex := iNdEx 1653 var wire uint64 1654 for shift := uint(0); ; shift += 7 { 1655 if shift >= 64 { 1656 return ErrIntOverflowMetadata 1657 } 1658 if iNdEx >= l { 1659 return io.ErrUnexpectedEOF 1660 } 1661 b := dAtA[iNdEx] 1662 iNdEx++ 1663 wire |= uint64(b&0x7F) << shift 1664 if b < 0x80 { 1665 break 1666 } 1667 } 1668 fieldNum := int32(wire >> 3) 1669 wireType := int(wire & 0x7) 1670 if wireType == 4 { 1671 return fmt.Errorf("proto: TNShardRecord: wiretype end group for non-group") 1672 } 1673 if fieldNum <= 0 { 1674 return fmt.Errorf("proto: TNShardRecord: illegal tag %d (wire type %d)", fieldNum, wire) 1675 } 1676 switch fieldNum { 1677 case 1: 1678 if wireType != 0 { 1679 return fmt.Errorf("proto: wrong wireType = %d for field ShardID", wireType) 1680 } 1681 m.ShardID = 0 1682 for shift := uint(0); ; shift += 7 { 1683 if shift >= 64 { 1684 return ErrIntOverflowMetadata 1685 } 1686 if iNdEx >= l { 1687 return io.ErrUnexpectedEOF 1688 } 1689 b := dAtA[iNdEx] 1690 iNdEx++ 1691 m.ShardID |= uint64(b&0x7F) << shift 1692 if b < 0x80 { 1693 break 1694 } 1695 } 1696 case 2: 1697 if wireType != 0 { 1698 return fmt.Errorf("proto: wrong wireType = %d for field LogShardID", wireType) 1699 } 1700 m.LogShardID = 0 1701 for shift := uint(0); ; shift += 7 { 1702 if shift >= 64 { 1703 return ErrIntOverflowMetadata 1704 } 1705 if iNdEx >= l { 1706 return io.ErrUnexpectedEOF 1707 } 1708 b := dAtA[iNdEx] 1709 iNdEx++ 1710 m.LogShardID |= uint64(b&0x7F) << shift 1711 if b < 0x80 { 1712 break 1713 } 1714 } 1715 default: 1716 iNdEx = preIndex 1717 skippy, err := skipMetadata(dAtA[iNdEx:]) 1718 if err != nil { 1719 return err 1720 } 1721 if (skippy < 0) || (iNdEx+skippy) < 0 { 1722 return ErrInvalidLengthMetadata 1723 } 1724 if (iNdEx + skippy) > l { 1725 return io.ErrUnexpectedEOF 1726 } 1727 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1728 iNdEx += skippy 1729 } 1730 } 1731 1732 if iNdEx > l { 1733 return io.ErrUnexpectedEOF 1734 } 1735 return nil 1736 } 1737 func (m *TNShard) Unmarshal(dAtA []byte) error { 1738 l := len(dAtA) 1739 iNdEx := 0 1740 for iNdEx < l { 1741 preIndex := iNdEx 1742 var wire uint64 1743 for shift := uint(0); ; shift += 7 { 1744 if shift >= 64 { 1745 return ErrIntOverflowMetadata 1746 } 1747 if iNdEx >= l { 1748 return io.ErrUnexpectedEOF 1749 } 1750 b := dAtA[iNdEx] 1751 iNdEx++ 1752 wire |= uint64(b&0x7F) << shift 1753 if b < 0x80 { 1754 break 1755 } 1756 } 1757 fieldNum := int32(wire >> 3) 1758 wireType := int(wire & 0x7) 1759 if wireType == 4 { 1760 return fmt.Errorf("proto: TNShard: wiretype end group for non-group") 1761 } 1762 if fieldNum <= 0 { 1763 return fmt.Errorf("proto: TNShard: illegal tag %d (wire type %d)", fieldNum, wire) 1764 } 1765 switch fieldNum { 1766 case 1: 1767 if wireType != 2 { 1768 return fmt.Errorf("proto: wrong wireType = %d for field TNShardRecord", wireType) 1769 } 1770 var msglen int 1771 for shift := uint(0); ; shift += 7 { 1772 if shift >= 64 { 1773 return ErrIntOverflowMetadata 1774 } 1775 if iNdEx >= l { 1776 return io.ErrUnexpectedEOF 1777 } 1778 b := dAtA[iNdEx] 1779 iNdEx++ 1780 msglen |= int(b&0x7F) << shift 1781 if b < 0x80 { 1782 break 1783 } 1784 } 1785 if msglen < 0 { 1786 return ErrInvalidLengthMetadata 1787 } 1788 postIndex := iNdEx + msglen 1789 if postIndex < 0 { 1790 return ErrInvalidLengthMetadata 1791 } 1792 if postIndex > l { 1793 return io.ErrUnexpectedEOF 1794 } 1795 if err := m.TNShardRecord.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1796 return err 1797 } 1798 iNdEx = postIndex 1799 case 2: 1800 if wireType != 0 { 1801 return fmt.Errorf("proto: wrong wireType = %d for field ReplicaID", wireType) 1802 } 1803 m.ReplicaID = 0 1804 for shift := uint(0); ; shift += 7 { 1805 if shift >= 64 { 1806 return ErrIntOverflowMetadata 1807 } 1808 if iNdEx >= l { 1809 return io.ErrUnexpectedEOF 1810 } 1811 b := dAtA[iNdEx] 1812 iNdEx++ 1813 m.ReplicaID |= uint64(b&0x7F) << shift 1814 if b < 0x80 { 1815 break 1816 } 1817 } 1818 case 3: 1819 if wireType != 2 { 1820 return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) 1821 } 1822 var stringLen uint64 1823 for shift := uint(0); ; shift += 7 { 1824 if shift >= 64 { 1825 return ErrIntOverflowMetadata 1826 } 1827 if iNdEx >= l { 1828 return io.ErrUnexpectedEOF 1829 } 1830 b := dAtA[iNdEx] 1831 iNdEx++ 1832 stringLen |= uint64(b&0x7F) << shift 1833 if b < 0x80 { 1834 break 1835 } 1836 } 1837 intStringLen := int(stringLen) 1838 if intStringLen < 0 { 1839 return ErrInvalidLengthMetadata 1840 } 1841 postIndex := iNdEx + intStringLen 1842 if postIndex < 0 { 1843 return ErrInvalidLengthMetadata 1844 } 1845 if postIndex > l { 1846 return io.ErrUnexpectedEOF 1847 } 1848 m.Address = string(dAtA[iNdEx:postIndex]) 1849 iNdEx = postIndex 1850 default: 1851 iNdEx = preIndex 1852 skippy, err := skipMetadata(dAtA[iNdEx:]) 1853 if err != nil { 1854 return err 1855 } 1856 if (skippy < 0) || (iNdEx+skippy) < 0 { 1857 return ErrInvalidLengthMetadata 1858 } 1859 if (iNdEx + skippy) > l { 1860 return io.ErrUnexpectedEOF 1861 } 1862 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1863 iNdEx += skippy 1864 } 1865 } 1866 1867 if iNdEx > l { 1868 return io.ErrUnexpectedEOF 1869 } 1870 return nil 1871 } 1872 func (m *LogShardRecord) Unmarshal(dAtA []byte) error { 1873 l := len(dAtA) 1874 iNdEx := 0 1875 for iNdEx < l { 1876 preIndex := iNdEx 1877 var wire uint64 1878 for shift := uint(0); ; shift += 7 { 1879 if shift >= 64 { 1880 return ErrIntOverflowMetadata 1881 } 1882 if iNdEx >= l { 1883 return io.ErrUnexpectedEOF 1884 } 1885 b := dAtA[iNdEx] 1886 iNdEx++ 1887 wire |= uint64(b&0x7F) << shift 1888 if b < 0x80 { 1889 break 1890 } 1891 } 1892 fieldNum := int32(wire >> 3) 1893 wireType := int(wire & 0x7) 1894 if wireType == 4 { 1895 return fmt.Errorf("proto: LogShardRecord: wiretype end group for non-group") 1896 } 1897 if fieldNum <= 0 { 1898 return fmt.Errorf("proto: LogShardRecord: illegal tag %d (wire type %d)", fieldNum, wire) 1899 } 1900 switch fieldNum { 1901 case 1: 1902 if wireType != 0 { 1903 return fmt.Errorf("proto: wrong wireType = %d for field ShardID", wireType) 1904 } 1905 m.ShardID = 0 1906 for shift := uint(0); ; shift += 7 { 1907 if shift >= 64 { 1908 return ErrIntOverflowMetadata 1909 } 1910 if iNdEx >= l { 1911 return io.ErrUnexpectedEOF 1912 } 1913 b := dAtA[iNdEx] 1914 iNdEx++ 1915 m.ShardID |= uint64(b&0x7F) << shift 1916 if b < 0x80 { 1917 break 1918 } 1919 } 1920 case 2: 1921 if wireType != 0 { 1922 return fmt.Errorf("proto: wrong wireType = %d for field NumberOfReplicas", wireType) 1923 } 1924 m.NumberOfReplicas = 0 1925 for shift := uint(0); ; shift += 7 { 1926 if shift >= 64 { 1927 return ErrIntOverflowMetadata 1928 } 1929 if iNdEx >= l { 1930 return io.ErrUnexpectedEOF 1931 } 1932 b := dAtA[iNdEx] 1933 iNdEx++ 1934 m.NumberOfReplicas |= uint64(b&0x7F) << shift 1935 if b < 0x80 { 1936 break 1937 } 1938 } 1939 default: 1940 iNdEx = preIndex 1941 skippy, err := skipMetadata(dAtA[iNdEx:]) 1942 if err != nil { 1943 return err 1944 } 1945 if (skippy < 0) || (iNdEx+skippy) < 0 { 1946 return ErrInvalidLengthMetadata 1947 } 1948 if (iNdEx + skippy) > l { 1949 return io.ErrUnexpectedEOF 1950 } 1951 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1952 iNdEx += skippy 1953 } 1954 } 1955 1956 if iNdEx > l { 1957 return io.ErrUnexpectedEOF 1958 } 1959 return nil 1960 } 1961 func (m *LogShard) Unmarshal(dAtA []byte) error { 1962 l := len(dAtA) 1963 iNdEx := 0 1964 for iNdEx < l { 1965 preIndex := iNdEx 1966 var wire uint64 1967 for shift := uint(0); ; shift += 7 { 1968 if shift >= 64 { 1969 return ErrIntOverflowMetadata 1970 } 1971 if iNdEx >= l { 1972 return io.ErrUnexpectedEOF 1973 } 1974 b := dAtA[iNdEx] 1975 iNdEx++ 1976 wire |= uint64(b&0x7F) << shift 1977 if b < 0x80 { 1978 break 1979 } 1980 } 1981 fieldNum := int32(wire >> 3) 1982 wireType := int(wire & 0x7) 1983 if wireType == 4 { 1984 return fmt.Errorf("proto: LogShard: wiretype end group for non-group") 1985 } 1986 if fieldNum <= 0 { 1987 return fmt.Errorf("proto: LogShard: illegal tag %d (wire type %d)", fieldNum, wire) 1988 } 1989 switch fieldNum { 1990 case 1: 1991 if wireType != 2 { 1992 return fmt.Errorf("proto: wrong wireType = %d for field LogShardRecord", wireType) 1993 } 1994 var msglen int 1995 for shift := uint(0); ; shift += 7 { 1996 if shift >= 64 { 1997 return ErrIntOverflowMetadata 1998 } 1999 if iNdEx >= l { 2000 return io.ErrUnexpectedEOF 2001 } 2002 b := dAtA[iNdEx] 2003 iNdEx++ 2004 msglen |= int(b&0x7F) << shift 2005 if b < 0x80 { 2006 break 2007 } 2008 } 2009 if msglen < 0 { 2010 return ErrInvalidLengthMetadata 2011 } 2012 postIndex := iNdEx + msglen 2013 if postIndex < 0 { 2014 return ErrInvalidLengthMetadata 2015 } 2016 if postIndex > l { 2017 return io.ErrUnexpectedEOF 2018 } 2019 if err := m.LogShardRecord.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2020 return err 2021 } 2022 iNdEx = postIndex 2023 case 2: 2024 if wireType != 0 { 2025 return fmt.Errorf("proto: wrong wireType = %d for field ReplicaID", wireType) 2026 } 2027 m.ReplicaID = 0 2028 for shift := uint(0); ; shift += 7 { 2029 if shift >= 64 { 2030 return ErrIntOverflowMetadata 2031 } 2032 if iNdEx >= l { 2033 return io.ErrUnexpectedEOF 2034 } 2035 b := dAtA[iNdEx] 2036 iNdEx++ 2037 m.ReplicaID |= uint64(b&0x7F) << shift 2038 if b < 0x80 { 2039 break 2040 } 2041 } 2042 default: 2043 iNdEx = preIndex 2044 skippy, err := skipMetadata(dAtA[iNdEx:]) 2045 if err != nil { 2046 return err 2047 } 2048 if (skippy < 0) || (iNdEx+skippy) < 0 { 2049 return ErrInvalidLengthMetadata 2050 } 2051 if (iNdEx + skippy) > l { 2052 return io.ErrUnexpectedEOF 2053 } 2054 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2055 iNdEx += skippy 2056 } 2057 } 2058 2059 if iNdEx > l { 2060 return io.ErrUnexpectedEOF 2061 } 2062 return nil 2063 } 2064 func (m *TNStore) Unmarshal(dAtA []byte) error { 2065 l := len(dAtA) 2066 iNdEx := 0 2067 for iNdEx < l { 2068 preIndex := iNdEx 2069 var wire uint64 2070 for shift := uint(0); ; shift += 7 { 2071 if shift >= 64 { 2072 return ErrIntOverflowMetadata 2073 } 2074 if iNdEx >= l { 2075 return io.ErrUnexpectedEOF 2076 } 2077 b := dAtA[iNdEx] 2078 iNdEx++ 2079 wire |= uint64(b&0x7F) << shift 2080 if b < 0x80 { 2081 break 2082 } 2083 } 2084 fieldNum := int32(wire >> 3) 2085 wireType := int(wire & 0x7) 2086 if wireType == 4 { 2087 return fmt.Errorf("proto: TNStore: wiretype end group for non-group") 2088 } 2089 if fieldNum <= 0 { 2090 return fmt.Errorf("proto: TNStore: illegal tag %d (wire type %d)", fieldNum, wire) 2091 } 2092 switch fieldNum { 2093 case 1: 2094 if wireType != 2 { 2095 return fmt.Errorf("proto: wrong wireType = %d for field UUID", wireType) 2096 } 2097 var stringLen uint64 2098 for shift := uint(0); ; shift += 7 { 2099 if shift >= 64 { 2100 return ErrIntOverflowMetadata 2101 } 2102 if iNdEx >= l { 2103 return io.ErrUnexpectedEOF 2104 } 2105 b := dAtA[iNdEx] 2106 iNdEx++ 2107 stringLen |= uint64(b&0x7F) << shift 2108 if b < 0x80 { 2109 break 2110 } 2111 } 2112 intStringLen := int(stringLen) 2113 if intStringLen < 0 { 2114 return ErrInvalidLengthMetadata 2115 } 2116 postIndex := iNdEx + intStringLen 2117 if postIndex < 0 { 2118 return ErrInvalidLengthMetadata 2119 } 2120 if postIndex > l { 2121 return io.ErrUnexpectedEOF 2122 } 2123 m.UUID = string(dAtA[iNdEx:postIndex]) 2124 iNdEx = postIndex 2125 case 2: 2126 if wireType != 2 { 2127 return fmt.Errorf("proto: wrong wireType = %d for field Shards", wireType) 2128 } 2129 var msglen int 2130 for shift := uint(0); ; shift += 7 { 2131 if shift >= 64 { 2132 return ErrIntOverflowMetadata 2133 } 2134 if iNdEx >= l { 2135 return io.ErrUnexpectedEOF 2136 } 2137 b := dAtA[iNdEx] 2138 iNdEx++ 2139 msglen |= int(b&0x7F) << shift 2140 if b < 0x80 { 2141 break 2142 } 2143 } 2144 if msglen < 0 { 2145 return ErrInvalidLengthMetadata 2146 } 2147 postIndex := iNdEx + msglen 2148 if postIndex < 0 { 2149 return ErrInvalidLengthMetadata 2150 } 2151 if postIndex > l { 2152 return io.ErrUnexpectedEOF 2153 } 2154 m.Shards = append(m.Shards, TNShard{}) 2155 if err := m.Shards[len(m.Shards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2156 return err 2157 } 2158 iNdEx = postIndex 2159 default: 2160 iNdEx = preIndex 2161 skippy, err := skipMetadata(dAtA[iNdEx:]) 2162 if err != nil { 2163 return err 2164 } 2165 if (skippy < 0) || (iNdEx+skippy) < 0 { 2166 return ErrInvalidLengthMetadata 2167 } 2168 if (iNdEx + skippy) > l { 2169 return io.ErrUnexpectedEOF 2170 } 2171 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2172 iNdEx += skippy 2173 } 2174 } 2175 2176 if iNdEx > l { 2177 return io.ErrUnexpectedEOF 2178 } 2179 return nil 2180 } 2181 func (m *LogStore) Unmarshal(dAtA []byte) error { 2182 l := len(dAtA) 2183 iNdEx := 0 2184 for iNdEx < l { 2185 preIndex := iNdEx 2186 var wire uint64 2187 for shift := uint(0); ; shift += 7 { 2188 if shift >= 64 { 2189 return ErrIntOverflowMetadata 2190 } 2191 if iNdEx >= l { 2192 return io.ErrUnexpectedEOF 2193 } 2194 b := dAtA[iNdEx] 2195 iNdEx++ 2196 wire |= uint64(b&0x7F) << shift 2197 if b < 0x80 { 2198 break 2199 } 2200 } 2201 fieldNum := int32(wire >> 3) 2202 wireType := int(wire & 0x7) 2203 if wireType == 4 { 2204 return fmt.Errorf("proto: LogStore: wiretype end group for non-group") 2205 } 2206 if fieldNum <= 0 { 2207 return fmt.Errorf("proto: LogStore: illegal tag %d (wire type %d)", fieldNum, wire) 2208 } 2209 switch fieldNum { 2210 case 1: 2211 if wireType != 2 { 2212 return fmt.Errorf("proto: wrong wireType = %d for field UUID", wireType) 2213 } 2214 var stringLen uint64 2215 for shift := uint(0); ; shift += 7 { 2216 if shift >= 64 { 2217 return ErrIntOverflowMetadata 2218 } 2219 if iNdEx >= l { 2220 return io.ErrUnexpectedEOF 2221 } 2222 b := dAtA[iNdEx] 2223 iNdEx++ 2224 stringLen |= uint64(b&0x7F) << shift 2225 if b < 0x80 { 2226 break 2227 } 2228 } 2229 intStringLen := int(stringLen) 2230 if intStringLen < 0 { 2231 return ErrInvalidLengthMetadata 2232 } 2233 postIndex := iNdEx + intStringLen 2234 if postIndex < 0 { 2235 return ErrInvalidLengthMetadata 2236 } 2237 if postIndex > l { 2238 return io.ErrUnexpectedEOF 2239 } 2240 m.UUID = string(dAtA[iNdEx:postIndex]) 2241 iNdEx = postIndex 2242 case 2: 2243 if wireType != 2 { 2244 return fmt.Errorf("proto: wrong wireType = %d for field Shards", wireType) 2245 } 2246 var msglen int 2247 for shift := uint(0); ; shift += 7 { 2248 if shift >= 64 { 2249 return ErrIntOverflowMetadata 2250 } 2251 if iNdEx >= l { 2252 return io.ErrUnexpectedEOF 2253 } 2254 b := dAtA[iNdEx] 2255 iNdEx++ 2256 msglen |= int(b&0x7F) << shift 2257 if b < 0x80 { 2258 break 2259 } 2260 } 2261 if msglen < 0 { 2262 return ErrInvalidLengthMetadata 2263 } 2264 postIndex := iNdEx + msglen 2265 if postIndex < 0 { 2266 return ErrInvalidLengthMetadata 2267 } 2268 if postIndex > l { 2269 return io.ErrUnexpectedEOF 2270 } 2271 m.Shards = append(m.Shards, LogShard{}) 2272 if err := m.Shards[len(m.Shards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2273 return err 2274 } 2275 iNdEx = postIndex 2276 default: 2277 iNdEx = preIndex 2278 skippy, err := skipMetadata(dAtA[iNdEx:]) 2279 if err != nil { 2280 return err 2281 } 2282 if (skippy < 0) || (iNdEx+skippy) < 0 { 2283 return ErrInvalidLengthMetadata 2284 } 2285 if (iNdEx + skippy) > l { 2286 return io.ErrUnexpectedEOF 2287 } 2288 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2289 iNdEx += skippy 2290 } 2291 } 2292 2293 if iNdEx > l { 2294 return io.ErrUnexpectedEOF 2295 } 2296 return nil 2297 } 2298 func (m *CNStore) Unmarshal(dAtA []byte) error { 2299 l := len(dAtA) 2300 iNdEx := 0 2301 for iNdEx < l { 2302 preIndex := iNdEx 2303 var wire uint64 2304 for shift := uint(0); ; shift += 7 { 2305 if shift >= 64 { 2306 return ErrIntOverflowMetadata 2307 } 2308 if iNdEx >= l { 2309 return io.ErrUnexpectedEOF 2310 } 2311 b := dAtA[iNdEx] 2312 iNdEx++ 2313 wire |= uint64(b&0x7F) << shift 2314 if b < 0x80 { 2315 break 2316 } 2317 } 2318 fieldNum := int32(wire >> 3) 2319 wireType := int(wire & 0x7) 2320 if wireType == 4 { 2321 return fmt.Errorf("proto: CNStore: wiretype end group for non-group") 2322 } 2323 if fieldNum <= 0 { 2324 return fmt.Errorf("proto: CNStore: illegal tag %d (wire type %d)", fieldNum, wire) 2325 } 2326 switch fieldNum { 2327 case 1: 2328 if wireType != 2 { 2329 return fmt.Errorf("proto: wrong wireType = %d for field UUID", wireType) 2330 } 2331 var stringLen uint64 2332 for shift := uint(0); ; shift += 7 { 2333 if shift >= 64 { 2334 return ErrIntOverflowMetadata 2335 } 2336 if iNdEx >= l { 2337 return io.ErrUnexpectedEOF 2338 } 2339 b := dAtA[iNdEx] 2340 iNdEx++ 2341 stringLen |= uint64(b&0x7F) << shift 2342 if b < 0x80 { 2343 break 2344 } 2345 } 2346 intStringLen := int(stringLen) 2347 if intStringLen < 0 { 2348 return ErrInvalidLengthMetadata 2349 } 2350 postIndex := iNdEx + intStringLen 2351 if postIndex < 0 { 2352 return ErrInvalidLengthMetadata 2353 } 2354 if postIndex > l { 2355 return io.ErrUnexpectedEOF 2356 } 2357 m.UUID = string(dAtA[iNdEx:postIndex]) 2358 iNdEx = postIndex 2359 case 2: 2360 if wireType != 0 { 2361 return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) 2362 } 2363 m.Role = 0 2364 for shift := uint(0); ; shift += 7 { 2365 if shift >= 64 { 2366 return ErrIntOverflowMetadata 2367 } 2368 if iNdEx >= l { 2369 return io.ErrUnexpectedEOF 2370 } 2371 b := dAtA[iNdEx] 2372 iNdEx++ 2373 m.Role |= CNRole(b&0x7F) << shift 2374 if b < 0x80 { 2375 break 2376 } 2377 } 2378 default: 2379 iNdEx = preIndex 2380 skippy, err := skipMetadata(dAtA[iNdEx:]) 2381 if err != nil { 2382 return err 2383 } 2384 if (skippy < 0) || (iNdEx+skippy) < 0 { 2385 return ErrInvalidLengthMetadata 2386 } 2387 if (iNdEx + skippy) > l { 2388 return io.ErrUnexpectedEOF 2389 } 2390 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2391 iNdEx += skippy 2392 } 2393 } 2394 2395 if iNdEx > l { 2396 return io.ErrUnexpectedEOF 2397 } 2398 return nil 2399 } 2400 func (m *CNService) Unmarshal(dAtA []byte) error { 2401 l := len(dAtA) 2402 iNdEx := 0 2403 for iNdEx < l { 2404 preIndex := iNdEx 2405 var wire uint64 2406 for shift := uint(0); ; shift += 7 { 2407 if shift >= 64 { 2408 return ErrIntOverflowMetadata 2409 } 2410 if iNdEx >= l { 2411 return io.ErrUnexpectedEOF 2412 } 2413 b := dAtA[iNdEx] 2414 iNdEx++ 2415 wire |= uint64(b&0x7F) << shift 2416 if b < 0x80 { 2417 break 2418 } 2419 } 2420 fieldNum := int32(wire >> 3) 2421 wireType := int(wire & 0x7) 2422 if wireType == 4 { 2423 return fmt.Errorf("proto: CNService: wiretype end group for non-group") 2424 } 2425 if fieldNum <= 0 { 2426 return fmt.Errorf("proto: CNService: illegal tag %d (wire type %d)", fieldNum, wire) 2427 } 2428 switch fieldNum { 2429 case 1: 2430 if wireType != 2 { 2431 return fmt.Errorf("proto: wrong wireType = %d for field ServiceID", wireType) 2432 } 2433 var stringLen uint64 2434 for shift := uint(0); ; shift += 7 { 2435 if shift >= 64 { 2436 return ErrIntOverflowMetadata 2437 } 2438 if iNdEx >= l { 2439 return io.ErrUnexpectedEOF 2440 } 2441 b := dAtA[iNdEx] 2442 iNdEx++ 2443 stringLen |= uint64(b&0x7F) << shift 2444 if b < 0x80 { 2445 break 2446 } 2447 } 2448 intStringLen := int(stringLen) 2449 if intStringLen < 0 { 2450 return ErrInvalidLengthMetadata 2451 } 2452 postIndex := iNdEx + intStringLen 2453 if postIndex < 0 { 2454 return ErrInvalidLengthMetadata 2455 } 2456 if postIndex > l { 2457 return io.ErrUnexpectedEOF 2458 } 2459 m.ServiceID = string(dAtA[iNdEx:postIndex]) 2460 iNdEx = postIndex 2461 case 2: 2462 if wireType != 2 { 2463 return fmt.Errorf("proto: wrong wireType = %d for field LockServiceAddress", wireType) 2464 } 2465 var stringLen uint64 2466 for shift := uint(0); ; shift += 7 { 2467 if shift >= 64 { 2468 return ErrIntOverflowMetadata 2469 } 2470 if iNdEx >= l { 2471 return io.ErrUnexpectedEOF 2472 } 2473 b := dAtA[iNdEx] 2474 iNdEx++ 2475 stringLen |= uint64(b&0x7F) << shift 2476 if b < 0x80 { 2477 break 2478 } 2479 } 2480 intStringLen := int(stringLen) 2481 if intStringLen < 0 { 2482 return ErrInvalidLengthMetadata 2483 } 2484 postIndex := iNdEx + intStringLen 2485 if postIndex < 0 { 2486 return ErrInvalidLengthMetadata 2487 } 2488 if postIndex > l { 2489 return io.ErrUnexpectedEOF 2490 } 2491 m.LockServiceAddress = string(dAtA[iNdEx:postIndex]) 2492 iNdEx = postIndex 2493 case 3: 2494 if wireType != 2 { 2495 return fmt.Errorf("proto: wrong wireType = %d for field PipelineServiceAddress", wireType) 2496 } 2497 var stringLen uint64 2498 for shift := uint(0); ; shift += 7 { 2499 if shift >= 64 { 2500 return ErrIntOverflowMetadata 2501 } 2502 if iNdEx >= l { 2503 return io.ErrUnexpectedEOF 2504 } 2505 b := dAtA[iNdEx] 2506 iNdEx++ 2507 stringLen |= uint64(b&0x7F) << shift 2508 if b < 0x80 { 2509 break 2510 } 2511 } 2512 intStringLen := int(stringLen) 2513 if intStringLen < 0 { 2514 return ErrInvalidLengthMetadata 2515 } 2516 postIndex := iNdEx + intStringLen 2517 if postIndex < 0 { 2518 return ErrInvalidLengthMetadata 2519 } 2520 if postIndex > l { 2521 return io.ErrUnexpectedEOF 2522 } 2523 m.PipelineServiceAddress = string(dAtA[iNdEx:postIndex]) 2524 iNdEx = postIndex 2525 case 4: 2526 if wireType != 2 { 2527 return fmt.Errorf("proto: wrong wireType = %d for field SQLAddress", wireType) 2528 } 2529 var stringLen uint64 2530 for shift := uint(0); ; shift += 7 { 2531 if shift >= 64 { 2532 return ErrIntOverflowMetadata 2533 } 2534 if iNdEx >= l { 2535 return io.ErrUnexpectedEOF 2536 } 2537 b := dAtA[iNdEx] 2538 iNdEx++ 2539 stringLen |= uint64(b&0x7F) << shift 2540 if b < 0x80 { 2541 break 2542 } 2543 } 2544 intStringLen := int(stringLen) 2545 if intStringLen < 0 { 2546 return ErrInvalidLengthMetadata 2547 } 2548 postIndex := iNdEx + intStringLen 2549 if postIndex < 0 { 2550 return ErrInvalidLengthMetadata 2551 } 2552 if postIndex > l { 2553 return io.ErrUnexpectedEOF 2554 } 2555 m.SQLAddress = string(dAtA[iNdEx:postIndex]) 2556 iNdEx = postIndex 2557 case 6: 2558 if wireType != 2 { 2559 return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) 2560 } 2561 var msglen int 2562 for shift := uint(0); ; shift += 7 { 2563 if shift >= 64 { 2564 return ErrIntOverflowMetadata 2565 } 2566 if iNdEx >= l { 2567 return io.ErrUnexpectedEOF 2568 } 2569 b := dAtA[iNdEx] 2570 iNdEx++ 2571 msglen |= int(b&0x7F) << shift 2572 if b < 0x80 { 2573 break 2574 } 2575 } 2576 if msglen < 0 { 2577 return ErrInvalidLengthMetadata 2578 } 2579 postIndex := iNdEx + msglen 2580 if postIndex < 0 { 2581 return ErrInvalidLengthMetadata 2582 } 2583 if postIndex > l { 2584 return io.ErrUnexpectedEOF 2585 } 2586 if m.Labels == nil { 2587 m.Labels = make(map[string]LabelList) 2588 } 2589 var mapkey string 2590 mapvalue := &LabelList{} 2591 for iNdEx < postIndex { 2592 entryPreIndex := iNdEx 2593 var wire uint64 2594 for shift := uint(0); ; shift += 7 { 2595 if shift >= 64 { 2596 return ErrIntOverflowMetadata 2597 } 2598 if iNdEx >= l { 2599 return io.ErrUnexpectedEOF 2600 } 2601 b := dAtA[iNdEx] 2602 iNdEx++ 2603 wire |= uint64(b&0x7F) << shift 2604 if b < 0x80 { 2605 break 2606 } 2607 } 2608 fieldNum := int32(wire >> 3) 2609 if fieldNum == 1 { 2610 var stringLenmapkey uint64 2611 for shift := uint(0); ; shift += 7 { 2612 if shift >= 64 { 2613 return ErrIntOverflowMetadata 2614 } 2615 if iNdEx >= l { 2616 return io.ErrUnexpectedEOF 2617 } 2618 b := dAtA[iNdEx] 2619 iNdEx++ 2620 stringLenmapkey |= uint64(b&0x7F) << shift 2621 if b < 0x80 { 2622 break 2623 } 2624 } 2625 intStringLenmapkey := int(stringLenmapkey) 2626 if intStringLenmapkey < 0 { 2627 return ErrInvalidLengthMetadata 2628 } 2629 postStringIndexmapkey := iNdEx + intStringLenmapkey 2630 if postStringIndexmapkey < 0 { 2631 return ErrInvalidLengthMetadata 2632 } 2633 if postStringIndexmapkey > l { 2634 return io.ErrUnexpectedEOF 2635 } 2636 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 2637 iNdEx = postStringIndexmapkey 2638 } else if fieldNum == 2 { 2639 var mapmsglen int 2640 for shift := uint(0); ; shift += 7 { 2641 if shift >= 64 { 2642 return ErrIntOverflowMetadata 2643 } 2644 if iNdEx >= l { 2645 return io.ErrUnexpectedEOF 2646 } 2647 b := dAtA[iNdEx] 2648 iNdEx++ 2649 mapmsglen |= int(b&0x7F) << shift 2650 if b < 0x80 { 2651 break 2652 } 2653 } 2654 if mapmsglen < 0 { 2655 return ErrInvalidLengthMetadata 2656 } 2657 postmsgIndex := iNdEx + mapmsglen 2658 if postmsgIndex < 0 { 2659 return ErrInvalidLengthMetadata 2660 } 2661 if postmsgIndex > l { 2662 return io.ErrUnexpectedEOF 2663 } 2664 mapvalue = &LabelList{} 2665 if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { 2666 return err 2667 } 2668 iNdEx = postmsgIndex 2669 } else { 2670 iNdEx = entryPreIndex 2671 skippy, err := skipMetadata(dAtA[iNdEx:]) 2672 if err != nil { 2673 return err 2674 } 2675 if (skippy < 0) || (iNdEx+skippy) < 0 { 2676 return ErrInvalidLengthMetadata 2677 } 2678 if (iNdEx + skippy) > postIndex { 2679 return io.ErrUnexpectedEOF 2680 } 2681 iNdEx += skippy 2682 } 2683 } 2684 m.Labels[mapkey] = *mapvalue 2685 iNdEx = postIndex 2686 case 7: 2687 if wireType != 0 { 2688 return fmt.Errorf("proto: wrong wireType = %d for field WorkState", wireType) 2689 } 2690 m.WorkState = 0 2691 for shift := uint(0); ; shift += 7 { 2692 if shift >= 64 { 2693 return ErrIntOverflowMetadata 2694 } 2695 if iNdEx >= l { 2696 return io.ErrUnexpectedEOF 2697 } 2698 b := dAtA[iNdEx] 2699 iNdEx++ 2700 m.WorkState |= WorkState(b&0x7F) << shift 2701 if b < 0x80 { 2702 break 2703 } 2704 } 2705 case 8: 2706 if wireType != 2 { 2707 return fmt.Errorf("proto: wrong wireType = %d for field QueryAddress", wireType) 2708 } 2709 var stringLen uint64 2710 for shift := uint(0); ; shift += 7 { 2711 if shift >= 64 { 2712 return ErrIntOverflowMetadata 2713 } 2714 if iNdEx >= l { 2715 return io.ErrUnexpectedEOF 2716 } 2717 b := dAtA[iNdEx] 2718 iNdEx++ 2719 stringLen |= uint64(b&0x7F) << shift 2720 if b < 0x80 { 2721 break 2722 } 2723 } 2724 intStringLen := int(stringLen) 2725 if intStringLen < 0 { 2726 return ErrInvalidLengthMetadata 2727 } 2728 postIndex := iNdEx + intStringLen 2729 if postIndex < 0 { 2730 return ErrInvalidLengthMetadata 2731 } 2732 if postIndex > l { 2733 return io.ErrUnexpectedEOF 2734 } 2735 m.QueryAddress = string(dAtA[iNdEx:postIndex]) 2736 iNdEx = postIndex 2737 default: 2738 iNdEx = preIndex 2739 skippy, err := skipMetadata(dAtA[iNdEx:]) 2740 if err != nil { 2741 return err 2742 } 2743 if (skippy < 0) || (iNdEx+skippy) < 0 { 2744 return ErrInvalidLengthMetadata 2745 } 2746 if (iNdEx + skippy) > l { 2747 return io.ErrUnexpectedEOF 2748 } 2749 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2750 iNdEx += skippy 2751 } 2752 } 2753 2754 if iNdEx > l { 2755 return io.ErrUnexpectedEOF 2756 } 2757 return nil 2758 } 2759 func (m *TNService) Unmarshal(dAtA []byte) error { 2760 l := len(dAtA) 2761 iNdEx := 0 2762 for iNdEx < l { 2763 preIndex := iNdEx 2764 var wire uint64 2765 for shift := uint(0); ; shift += 7 { 2766 if shift >= 64 { 2767 return ErrIntOverflowMetadata 2768 } 2769 if iNdEx >= l { 2770 return io.ErrUnexpectedEOF 2771 } 2772 b := dAtA[iNdEx] 2773 iNdEx++ 2774 wire |= uint64(b&0x7F) << shift 2775 if b < 0x80 { 2776 break 2777 } 2778 } 2779 fieldNum := int32(wire >> 3) 2780 wireType := int(wire & 0x7) 2781 if wireType == 4 { 2782 return fmt.Errorf("proto: TNService: wiretype end group for non-group") 2783 } 2784 if fieldNum <= 0 { 2785 return fmt.Errorf("proto: TNService: illegal tag %d (wire type %d)", fieldNum, wire) 2786 } 2787 switch fieldNum { 2788 case 1: 2789 if wireType != 2 { 2790 return fmt.Errorf("proto: wrong wireType = %d for field ServiceID", wireType) 2791 } 2792 var stringLen uint64 2793 for shift := uint(0); ; shift += 7 { 2794 if shift >= 64 { 2795 return ErrIntOverflowMetadata 2796 } 2797 if iNdEx >= l { 2798 return io.ErrUnexpectedEOF 2799 } 2800 b := dAtA[iNdEx] 2801 iNdEx++ 2802 stringLen |= uint64(b&0x7F) << shift 2803 if b < 0x80 { 2804 break 2805 } 2806 } 2807 intStringLen := int(stringLen) 2808 if intStringLen < 0 { 2809 return ErrInvalidLengthMetadata 2810 } 2811 postIndex := iNdEx + intStringLen 2812 if postIndex < 0 { 2813 return ErrInvalidLengthMetadata 2814 } 2815 if postIndex > l { 2816 return io.ErrUnexpectedEOF 2817 } 2818 m.ServiceID = string(dAtA[iNdEx:postIndex]) 2819 iNdEx = postIndex 2820 case 2: 2821 if wireType != 2 { 2822 return fmt.Errorf("proto: wrong wireType = %d for field TxnServiceAddress", wireType) 2823 } 2824 var stringLen uint64 2825 for shift := uint(0); ; shift += 7 { 2826 if shift >= 64 { 2827 return ErrIntOverflowMetadata 2828 } 2829 if iNdEx >= l { 2830 return io.ErrUnexpectedEOF 2831 } 2832 b := dAtA[iNdEx] 2833 iNdEx++ 2834 stringLen |= uint64(b&0x7F) << shift 2835 if b < 0x80 { 2836 break 2837 } 2838 } 2839 intStringLen := int(stringLen) 2840 if intStringLen < 0 { 2841 return ErrInvalidLengthMetadata 2842 } 2843 postIndex := iNdEx + intStringLen 2844 if postIndex < 0 { 2845 return ErrInvalidLengthMetadata 2846 } 2847 if postIndex > l { 2848 return io.ErrUnexpectedEOF 2849 } 2850 m.TxnServiceAddress = string(dAtA[iNdEx:postIndex]) 2851 iNdEx = postIndex 2852 case 3: 2853 if wireType != 2 { 2854 return fmt.Errorf("proto: wrong wireType = %d for field LogTailServiceAddress", wireType) 2855 } 2856 var stringLen uint64 2857 for shift := uint(0); ; shift += 7 { 2858 if shift >= 64 { 2859 return ErrIntOverflowMetadata 2860 } 2861 if iNdEx >= l { 2862 return io.ErrUnexpectedEOF 2863 } 2864 b := dAtA[iNdEx] 2865 iNdEx++ 2866 stringLen |= uint64(b&0x7F) << shift 2867 if b < 0x80 { 2868 break 2869 } 2870 } 2871 intStringLen := int(stringLen) 2872 if intStringLen < 0 { 2873 return ErrInvalidLengthMetadata 2874 } 2875 postIndex := iNdEx + intStringLen 2876 if postIndex < 0 { 2877 return ErrInvalidLengthMetadata 2878 } 2879 if postIndex > l { 2880 return io.ErrUnexpectedEOF 2881 } 2882 m.LogTailServiceAddress = string(dAtA[iNdEx:postIndex]) 2883 iNdEx = postIndex 2884 case 4: 2885 if wireType != 2 { 2886 return fmt.Errorf("proto: wrong wireType = %d for field LockServiceAddress", wireType) 2887 } 2888 var stringLen uint64 2889 for shift := uint(0); ; shift += 7 { 2890 if shift >= 64 { 2891 return ErrIntOverflowMetadata 2892 } 2893 if iNdEx >= l { 2894 return io.ErrUnexpectedEOF 2895 } 2896 b := dAtA[iNdEx] 2897 iNdEx++ 2898 stringLen |= uint64(b&0x7F) << shift 2899 if b < 0x80 { 2900 break 2901 } 2902 } 2903 intStringLen := int(stringLen) 2904 if intStringLen < 0 { 2905 return ErrInvalidLengthMetadata 2906 } 2907 postIndex := iNdEx + intStringLen 2908 if postIndex < 0 { 2909 return ErrInvalidLengthMetadata 2910 } 2911 if postIndex > l { 2912 return io.ErrUnexpectedEOF 2913 } 2914 m.LockServiceAddress = string(dAtA[iNdEx:postIndex]) 2915 iNdEx = postIndex 2916 case 6: 2917 if wireType != 2 { 2918 return fmt.Errorf("proto: wrong wireType = %d for field Shards", wireType) 2919 } 2920 var msglen int 2921 for shift := uint(0); ; shift += 7 { 2922 if shift >= 64 { 2923 return ErrIntOverflowMetadata 2924 } 2925 if iNdEx >= l { 2926 return io.ErrUnexpectedEOF 2927 } 2928 b := dAtA[iNdEx] 2929 iNdEx++ 2930 msglen |= int(b&0x7F) << shift 2931 if b < 0x80 { 2932 break 2933 } 2934 } 2935 if msglen < 0 { 2936 return ErrInvalidLengthMetadata 2937 } 2938 postIndex := iNdEx + msglen 2939 if postIndex < 0 { 2940 return ErrInvalidLengthMetadata 2941 } 2942 if postIndex > l { 2943 return io.ErrUnexpectedEOF 2944 } 2945 m.Shards = append(m.Shards, TNShard{}) 2946 if err := m.Shards[len(m.Shards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2947 return err 2948 } 2949 iNdEx = postIndex 2950 case 7: 2951 if wireType != 2 { 2952 return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) 2953 } 2954 var msglen int 2955 for shift := uint(0); ; shift += 7 { 2956 if shift >= 64 { 2957 return ErrIntOverflowMetadata 2958 } 2959 if iNdEx >= l { 2960 return io.ErrUnexpectedEOF 2961 } 2962 b := dAtA[iNdEx] 2963 iNdEx++ 2964 msglen |= int(b&0x7F) << shift 2965 if b < 0x80 { 2966 break 2967 } 2968 } 2969 if msglen < 0 { 2970 return ErrInvalidLengthMetadata 2971 } 2972 postIndex := iNdEx + msglen 2973 if postIndex < 0 { 2974 return ErrInvalidLengthMetadata 2975 } 2976 if postIndex > l { 2977 return io.ErrUnexpectedEOF 2978 } 2979 if m.Labels == nil { 2980 m.Labels = make(map[string]LabelList) 2981 } 2982 var mapkey string 2983 mapvalue := &LabelList{} 2984 for iNdEx < postIndex { 2985 entryPreIndex := iNdEx 2986 var wire uint64 2987 for shift := uint(0); ; shift += 7 { 2988 if shift >= 64 { 2989 return ErrIntOverflowMetadata 2990 } 2991 if iNdEx >= l { 2992 return io.ErrUnexpectedEOF 2993 } 2994 b := dAtA[iNdEx] 2995 iNdEx++ 2996 wire |= uint64(b&0x7F) << shift 2997 if b < 0x80 { 2998 break 2999 } 3000 } 3001 fieldNum := int32(wire >> 3) 3002 if fieldNum == 1 { 3003 var stringLenmapkey uint64 3004 for shift := uint(0); ; shift += 7 { 3005 if shift >= 64 { 3006 return ErrIntOverflowMetadata 3007 } 3008 if iNdEx >= l { 3009 return io.ErrUnexpectedEOF 3010 } 3011 b := dAtA[iNdEx] 3012 iNdEx++ 3013 stringLenmapkey |= uint64(b&0x7F) << shift 3014 if b < 0x80 { 3015 break 3016 } 3017 } 3018 intStringLenmapkey := int(stringLenmapkey) 3019 if intStringLenmapkey < 0 { 3020 return ErrInvalidLengthMetadata 3021 } 3022 postStringIndexmapkey := iNdEx + intStringLenmapkey 3023 if postStringIndexmapkey < 0 { 3024 return ErrInvalidLengthMetadata 3025 } 3026 if postStringIndexmapkey > l { 3027 return io.ErrUnexpectedEOF 3028 } 3029 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 3030 iNdEx = postStringIndexmapkey 3031 } else if fieldNum == 2 { 3032 var mapmsglen int 3033 for shift := uint(0); ; shift += 7 { 3034 if shift >= 64 { 3035 return ErrIntOverflowMetadata 3036 } 3037 if iNdEx >= l { 3038 return io.ErrUnexpectedEOF 3039 } 3040 b := dAtA[iNdEx] 3041 iNdEx++ 3042 mapmsglen |= int(b&0x7F) << shift 3043 if b < 0x80 { 3044 break 3045 } 3046 } 3047 if mapmsglen < 0 { 3048 return ErrInvalidLengthMetadata 3049 } 3050 postmsgIndex := iNdEx + mapmsglen 3051 if postmsgIndex < 0 { 3052 return ErrInvalidLengthMetadata 3053 } 3054 if postmsgIndex > l { 3055 return io.ErrUnexpectedEOF 3056 } 3057 mapvalue = &LabelList{} 3058 if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { 3059 return err 3060 } 3061 iNdEx = postmsgIndex 3062 } else { 3063 iNdEx = entryPreIndex 3064 skippy, err := skipMetadata(dAtA[iNdEx:]) 3065 if err != nil { 3066 return err 3067 } 3068 if (skippy < 0) || (iNdEx+skippy) < 0 { 3069 return ErrInvalidLengthMetadata 3070 } 3071 if (iNdEx + skippy) > postIndex { 3072 return io.ErrUnexpectedEOF 3073 } 3074 iNdEx += skippy 3075 } 3076 } 3077 m.Labels[mapkey] = *mapvalue 3078 iNdEx = postIndex 3079 case 8: 3080 if wireType != 2 { 3081 return fmt.Errorf("proto: wrong wireType = %d for field QueryAddress", wireType) 3082 } 3083 var stringLen uint64 3084 for shift := uint(0); ; shift += 7 { 3085 if shift >= 64 { 3086 return ErrIntOverflowMetadata 3087 } 3088 if iNdEx >= l { 3089 return io.ErrUnexpectedEOF 3090 } 3091 b := dAtA[iNdEx] 3092 iNdEx++ 3093 stringLen |= uint64(b&0x7F) << shift 3094 if b < 0x80 { 3095 break 3096 } 3097 } 3098 intStringLen := int(stringLen) 3099 if intStringLen < 0 { 3100 return ErrInvalidLengthMetadata 3101 } 3102 postIndex := iNdEx + intStringLen 3103 if postIndex < 0 { 3104 return ErrInvalidLengthMetadata 3105 } 3106 if postIndex > l { 3107 return io.ErrUnexpectedEOF 3108 } 3109 m.QueryAddress = string(dAtA[iNdEx:postIndex]) 3110 iNdEx = postIndex 3111 default: 3112 iNdEx = preIndex 3113 skippy, err := skipMetadata(dAtA[iNdEx:]) 3114 if err != nil { 3115 return err 3116 } 3117 if (skippy < 0) || (iNdEx+skippy) < 0 { 3118 return ErrInvalidLengthMetadata 3119 } 3120 if (iNdEx + skippy) > l { 3121 return io.ErrUnexpectedEOF 3122 } 3123 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3124 iNdEx += skippy 3125 } 3126 } 3127 3128 if iNdEx > l { 3129 return io.ErrUnexpectedEOF 3130 } 3131 return nil 3132 } 3133 func (m *LabelList) Unmarshal(dAtA []byte) error { 3134 l := len(dAtA) 3135 iNdEx := 0 3136 for iNdEx < l { 3137 preIndex := iNdEx 3138 var wire uint64 3139 for shift := uint(0); ; shift += 7 { 3140 if shift >= 64 { 3141 return ErrIntOverflowMetadata 3142 } 3143 if iNdEx >= l { 3144 return io.ErrUnexpectedEOF 3145 } 3146 b := dAtA[iNdEx] 3147 iNdEx++ 3148 wire |= uint64(b&0x7F) << shift 3149 if b < 0x80 { 3150 break 3151 } 3152 } 3153 fieldNum := int32(wire >> 3) 3154 wireType := int(wire & 0x7) 3155 if wireType == 4 { 3156 return fmt.Errorf("proto: LabelList: wiretype end group for non-group") 3157 } 3158 if fieldNum <= 0 { 3159 return fmt.Errorf("proto: LabelList: illegal tag %d (wire type %d)", fieldNum, wire) 3160 } 3161 switch fieldNum { 3162 case 1: 3163 if wireType != 2 { 3164 return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) 3165 } 3166 var stringLen uint64 3167 for shift := uint(0); ; shift += 7 { 3168 if shift >= 64 { 3169 return ErrIntOverflowMetadata 3170 } 3171 if iNdEx >= l { 3172 return io.ErrUnexpectedEOF 3173 } 3174 b := dAtA[iNdEx] 3175 iNdEx++ 3176 stringLen |= uint64(b&0x7F) << shift 3177 if b < 0x80 { 3178 break 3179 } 3180 } 3181 intStringLen := int(stringLen) 3182 if intStringLen < 0 { 3183 return ErrInvalidLengthMetadata 3184 } 3185 postIndex := iNdEx + intStringLen 3186 if postIndex < 0 { 3187 return ErrInvalidLengthMetadata 3188 } 3189 if postIndex > l { 3190 return io.ErrUnexpectedEOF 3191 } 3192 m.Labels = append(m.Labels, string(dAtA[iNdEx:postIndex])) 3193 iNdEx = postIndex 3194 default: 3195 iNdEx = preIndex 3196 skippy, err := skipMetadata(dAtA[iNdEx:]) 3197 if err != nil { 3198 return err 3199 } 3200 if (skippy < 0) || (iNdEx+skippy) < 0 { 3201 return ErrInvalidLengthMetadata 3202 } 3203 if (iNdEx + skippy) > l { 3204 return io.ErrUnexpectedEOF 3205 } 3206 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3207 iNdEx += skippy 3208 } 3209 } 3210 3211 if iNdEx > l { 3212 return io.ErrUnexpectedEOF 3213 } 3214 return nil 3215 } 3216 func skipMetadata(dAtA []byte) (n int, err error) { 3217 l := len(dAtA) 3218 iNdEx := 0 3219 depth := 0 3220 for iNdEx < l { 3221 var wire uint64 3222 for shift := uint(0); ; shift += 7 { 3223 if shift >= 64 { 3224 return 0, ErrIntOverflowMetadata 3225 } 3226 if iNdEx >= l { 3227 return 0, io.ErrUnexpectedEOF 3228 } 3229 b := dAtA[iNdEx] 3230 iNdEx++ 3231 wire |= (uint64(b) & 0x7F) << shift 3232 if b < 0x80 { 3233 break 3234 } 3235 } 3236 wireType := int(wire & 0x7) 3237 switch wireType { 3238 case 0: 3239 for shift := uint(0); ; shift += 7 { 3240 if shift >= 64 { 3241 return 0, ErrIntOverflowMetadata 3242 } 3243 if iNdEx >= l { 3244 return 0, io.ErrUnexpectedEOF 3245 } 3246 iNdEx++ 3247 if dAtA[iNdEx-1] < 0x80 { 3248 break 3249 } 3250 } 3251 case 1: 3252 iNdEx += 8 3253 case 2: 3254 var length int 3255 for shift := uint(0); ; shift += 7 { 3256 if shift >= 64 { 3257 return 0, ErrIntOverflowMetadata 3258 } 3259 if iNdEx >= l { 3260 return 0, io.ErrUnexpectedEOF 3261 } 3262 b := dAtA[iNdEx] 3263 iNdEx++ 3264 length |= (int(b) & 0x7F) << shift 3265 if b < 0x80 { 3266 break 3267 } 3268 } 3269 if length < 0 { 3270 return 0, ErrInvalidLengthMetadata 3271 } 3272 iNdEx += length 3273 case 3: 3274 depth++ 3275 case 4: 3276 if depth == 0 { 3277 return 0, ErrUnexpectedEndOfGroupMetadata 3278 } 3279 depth-- 3280 case 5: 3281 iNdEx += 4 3282 default: 3283 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 3284 } 3285 if iNdEx < 0 { 3286 return 0, ErrInvalidLengthMetadata 3287 } 3288 if depth == 0 { 3289 return iNdEx, nil 3290 } 3291 } 3292 return 0, io.ErrUnexpectedEOF 3293 } 3294 3295 var ( 3296 ErrInvalidLengthMetadata = fmt.Errorf("proto: negative length found during unmarshaling") 3297 ErrIntOverflowMetadata = fmt.Errorf("proto: integer overflow") 3298 ErrUnexpectedEndOfGroupMetadata = fmt.Errorf("proto: unexpected end of group") 3299 )