github.com/m3db/m3@v1.5.0/src/cluster/generated/proto/kvpb/kv.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: github.com/m3db/m3/src/cluster/generated/proto/kvpb/kv.proto 3 4 // Copyright (c) 2021 Uber Technologies, Inc. 5 // 6 // Permission is hereby granted, free of charge, to any person obtaining a copy 7 // of this software and associated documentation files (the "Software"), to deal 8 // in the Software without restriction, including without limitation the rights 9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 // copies of the Software, and to permit persons to whom the Software is 11 // furnished to do so, subject to the following conditions: 12 // 13 // The above copyright notice and this permission notice shall be included in 14 // all copies or substantial portions of the Software. 15 // 16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 // THE SOFTWARE. 23 24 /* 25 Package kvpb is a generated protocol buffer package. 26 27 It is generated from these files: 28 github.com/m3db/m3/src/cluster/generated/proto/kvpb/kv.proto 29 30 It has these top-level messages: 31 KeyValueUpdate 32 KeyValueUpdateResult 33 QueryLimits 34 QueryLimit 35 */ 36 package kvpb 37 38 import proto "github.com/gogo/protobuf/proto" 39 import fmt "fmt" 40 import math "math" 41 42 import io "io" 43 44 // Reference imports to suppress errors if they are not otherwise used. 45 var _ = proto.Marshal 46 var _ = fmt.Errorf 47 var _ = math.Inf 48 49 // This is a compile-time assertion to ensure that this generated file 50 // is compatible with the proto package it is being compiled against. 51 // A compilation error at this line likely means your copy of the 52 // proto package needs to be updated. 53 const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 54 55 type KeyValueUpdate struct { 56 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 57 Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` 58 Commit bool `protobuf:"varint,3,opt,name=commit,proto3" json:"commit,omitempty"` 59 } 60 61 func (m *KeyValueUpdate) Reset() { *m = KeyValueUpdate{} } 62 func (m *KeyValueUpdate) String() string { return proto.CompactTextString(m) } 63 func (*KeyValueUpdate) ProtoMessage() {} 64 func (*KeyValueUpdate) Descriptor() ([]byte, []int) { return fileDescriptorKv, []int{0} } 65 66 func (m *KeyValueUpdate) GetKey() string { 67 if m != nil { 68 return m.Key 69 } 70 return "" 71 } 72 73 func (m *KeyValueUpdate) GetValue() string { 74 if m != nil { 75 return m.Value 76 } 77 return "" 78 } 79 80 func (m *KeyValueUpdate) GetCommit() bool { 81 if m != nil { 82 return m.Commit 83 } 84 return false 85 } 86 87 type KeyValueUpdateResult struct { 88 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 89 Old string `protobuf:"bytes,2,opt,name=old,proto3" json:"old,omitempty"` 90 New string `protobuf:"bytes,3,opt,name=new,proto3" json:"new,omitempty"` 91 } 92 93 func (m *KeyValueUpdateResult) Reset() { *m = KeyValueUpdateResult{} } 94 func (m *KeyValueUpdateResult) String() string { return proto.CompactTextString(m) } 95 func (*KeyValueUpdateResult) ProtoMessage() {} 96 func (*KeyValueUpdateResult) Descriptor() ([]byte, []int) { return fileDescriptorKv, []int{1} } 97 98 func (m *KeyValueUpdateResult) GetKey() string { 99 if m != nil { 100 return m.Key 101 } 102 return "" 103 } 104 105 func (m *KeyValueUpdateResult) GetOld() string { 106 if m != nil { 107 return m.Old 108 } 109 return "" 110 } 111 112 func (m *KeyValueUpdateResult) GetNew() string { 113 if m != nil { 114 return m.New 115 } 116 return "" 117 } 118 119 type QueryLimits struct { 120 MaxRecentlyQueriedSeriesBlocks *QueryLimit `protobuf:"bytes,1,opt,name=maxRecentlyQueriedSeriesBlocks" json:"maxRecentlyQueriedSeriesBlocks,omitempty"` 121 MaxRecentlyQueriedSeriesDiskBytesRead *QueryLimit `protobuf:"bytes,2,opt,name=maxRecentlyQueriedSeriesDiskBytesRead" json:"maxRecentlyQueriedSeriesDiskBytesRead,omitempty"` 122 MaxRecentlyQueriedSeriesDiskRead *QueryLimit `protobuf:"bytes,3,opt,name=maxRecentlyQueriedSeriesDiskRead" json:"maxRecentlyQueriedSeriesDiskRead,omitempty"` 123 MaxRecentlyQueriedMetadataRead *QueryLimit `protobuf:"bytes,4,opt,name=maxRecentlyQueriedMetadataRead" json:"maxRecentlyQueriedMetadataRead,omitempty"` 124 } 125 126 func (m *QueryLimits) Reset() { *m = QueryLimits{} } 127 func (m *QueryLimits) String() string { return proto.CompactTextString(m) } 128 func (*QueryLimits) ProtoMessage() {} 129 func (*QueryLimits) Descriptor() ([]byte, []int) { return fileDescriptorKv, []int{2} } 130 131 func (m *QueryLimits) GetMaxRecentlyQueriedSeriesBlocks() *QueryLimit { 132 if m != nil { 133 return m.MaxRecentlyQueriedSeriesBlocks 134 } 135 return nil 136 } 137 138 func (m *QueryLimits) GetMaxRecentlyQueriedSeriesDiskBytesRead() *QueryLimit { 139 if m != nil { 140 return m.MaxRecentlyQueriedSeriesDiskBytesRead 141 } 142 return nil 143 } 144 145 func (m *QueryLimits) GetMaxRecentlyQueriedSeriesDiskRead() *QueryLimit { 146 if m != nil { 147 return m.MaxRecentlyQueriedSeriesDiskRead 148 } 149 return nil 150 } 151 152 func (m *QueryLimits) GetMaxRecentlyQueriedMetadataRead() *QueryLimit { 153 if m != nil { 154 return m.MaxRecentlyQueriedMetadataRead 155 } 156 return nil 157 } 158 159 type QueryLimit struct { 160 Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` 161 LookbackSeconds int64 `protobuf:"varint,2,opt,name=lookbackSeconds,proto3" json:"lookbackSeconds,omitempty"` 162 ForceExceeded bool `protobuf:"varint,3,opt,name=forceExceeded,proto3" json:"forceExceeded,omitempty"` 163 ForceWaited bool `protobuf:"varint,4,opt,name=forceWaited,proto3" json:"forceWaited,omitempty"` 164 } 165 166 func (m *QueryLimit) Reset() { *m = QueryLimit{} } 167 func (m *QueryLimit) String() string { return proto.CompactTextString(m) } 168 func (*QueryLimit) ProtoMessage() {} 169 func (*QueryLimit) Descriptor() ([]byte, []int) { return fileDescriptorKv, []int{3} } 170 171 func (m *QueryLimit) GetLimit() int64 { 172 if m != nil { 173 return m.Limit 174 } 175 return 0 176 } 177 178 func (m *QueryLimit) GetLookbackSeconds() int64 { 179 if m != nil { 180 return m.LookbackSeconds 181 } 182 return 0 183 } 184 185 func (m *QueryLimit) GetForceExceeded() bool { 186 if m != nil { 187 return m.ForceExceeded 188 } 189 return false 190 } 191 192 func (m *QueryLimit) GetForceWaited() bool { 193 if m != nil { 194 return m.ForceWaited 195 } 196 return false 197 } 198 199 func init() { 200 proto.RegisterType((*KeyValueUpdate)(nil), "kvpb.KeyValueUpdate") 201 proto.RegisterType((*KeyValueUpdateResult)(nil), "kvpb.KeyValueUpdateResult") 202 proto.RegisterType((*QueryLimits)(nil), "kvpb.QueryLimits") 203 proto.RegisterType((*QueryLimit)(nil), "kvpb.QueryLimit") 204 } 205 func (m *KeyValueUpdate) Marshal() (dAtA []byte, err error) { 206 size := m.Size() 207 dAtA = make([]byte, size) 208 n, err := m.MarshalTo(dAtA) 209 if err != nil { 210 return nil, err 211 } 212 return dAtA[:n], nil 213 } 214 215 func (m *KeyValueUpdate) MarshalTo(dAtA []byte) (int, error) { 216 var i int 217 _ = i 218 var l int 219 _ = l 220 if len(m.Key) > 0 { 221 dAtA[i] = 0xa 222 i++ 223 i = encodeVarintKv(dAtA, i, uint64(len(m.Key))) 224 i += copy(dAtA[i:], m.Key) 225 } 226 if len(m.Value) > 0 { 227 dAtA[i] = 0x12 228 i++ 229 i = encodeVarintKv(dAtA, i, uint64(len(m.Value))) 230 i += copy(dAtA[i:], m.Value) 231 } 232 if m.Commit { 233 dAtA[i] = 0x18 234 i++ 235 if m.Commit { 236 dAtA[i] = 1 237 } else { 238 dAtA[i] = 0 239 } 240 i++ 241 } 242 return i, nil 243 } 244 245 func (m *KeyValueUpdateResult) Marshal() (dAtA []byte, err error) { 246 size := m.Size() 247 dAtA = make([]byte, size) 248 n, err := m.MarshalTo(dAtA) 249 if err != nil { 250 return nil, err 251 } 252 return dAtA[:n], nil 253 } 254 255 func (m *KeyValueUpdateResult) MarshalTo(dAtA []byte) (int, error) { 256 var i int 257 _ = i 258 var l int 259 _ = l 260 if len(m.Key) > 0 { 261 dAtA[i] = 0xa 262 i++ 263 i = encodeVarintKv(dAtA, i, uint64(len(m.Key))) 264 i += copy(dAtA[i:], m.Key) 265 } 266 if len(m.Old) > 0 { 267 dAtA[i] = 0x12 268 i++ 269 i = encodeVarintKv(dAtA, i, uint64(len(m.Old))) 270 i += copy(dAtA[i:], m.Old) 271 } 272 if len(m.New) > 0 { 273 dAtA[i] = 0x1a 274 i++ 275 i = encodeVarintKv(dAtA, i, uint64(len(m.New))) 276 i += copy(dAtA[i:], m.New) 277 } 278 return i, nil 279 } 280 281 func (m *QueryLimits) Marshal() (dAtA []byte, err error) { 282 size := m.Size() 283 dAtA = make([]byte, size) 284 n, err := m.MarshalTo(dAtA) 285 if err != nil { 286 return nil, err 287 } 288 return dAtA[:n], nil 289 } 290 291 func (m *QueryLimits) MarshalTo(dAtA []byte) (int, error) { 292 var i int 293 _ = i 294 var l int 295 _ = l 296 if m.MaxRecentlyQueriedSeriesBlocks != nil { 297 dAtA[i] = 0xa 298 i++ 299 i = encodeVarintKv(dAtA, i, uint64(m.MaxRecentlyQueriedSeriesBlocks.Size())) 300 n1, err := m.MaxRecentlyQueriedSeriesBlocks.MarshalTo(dAtA[i:]) 301 if err != nil { 302 return 0, err 303 } 304 i += n1 305 } 306 if m.MaxRecentlyQueriedSeriesDiskBytesRead != nil { 307 dAtA[i] = 0x12 308 i++ 309 i = encodeVarintKv(dAtA, i, uint64(m.MaxRecentlyQueriedSeriesDiskBytesRead.Size())) 310 n2, err := m.MaxRecentlyQueriedSeriesDiskBytesRead.MarshalTo(dAtA[i:]) 311 if err != nil { 312 return 0, err 313 } 314 i += n2 315 } 316 if m.MaxRecentlyQueriedSeriesDiskRead != nil { 317 dAtA[i] = 0x1a 318 i++ 319 i = encodeVarintKv(dAtA, i, uint64(m.MaxRecentlyQueriedSeriesDiskRead.Size())) 320 n3, err := m.MaxRecentlyQueriedSeriesDiskRead.MarshalTo(dAtA[i:]) 321 if err != nil { 322 return 0, err 323 } 324 i += n3 325 } 326 if m.MaxRecentlyQueriedMetadataRead != nil { 327 dAtA[i] = 0x22 328 i++ 329 i = encodeVarintKv(dAtA, i, uint64(m.MaxRecentlyQueriedMetadataRead.Size())) 330 n4, err := m.MaxRecentlyQueriedMetadataRead.MarshalTo(dAtA[i:]) 331 if err != nil { 332 return 0, err 333 } 334 i += n4 335 } 336 return i, nil 337 } 338 339 func (m *QueryLimit) Marshal() (dAtA []byte, err error) { 340 size := m.Size() 341 dAtA = make([]byte, size) 342 n, err := m.MarshalTo(dAtA) 343 if err != nil { 344 return nil, err 345 } 346 return dAtA[:n], nil 347 } 348 349 func (m *QueryLimit) MarshalTo(dAtA []byte) (int, error) { 350 var i int 351 _ = i 352 var l int 353 _ = l 354 if m.Limit != 0 { 355 dAtA[i] = 0x8 356 i++ 357 i = encodeVarintKv(dAtA, i, uint64(m.Limit)) 358 } 359 if m.LookbackSeconds != 0 { 360 dAtA[i] = 0x10 361 i++ 362 i = encodeVarintKv(dAtA, i, uint64(m.LookbackSeconds)) 363 } 364 if m.ForceExceeded { 365 dAtA[i] = 0x18 366 i++ 367 if m.ForceExceeded { 368 dAtA[i] = 1 369 } else { 370 dAtA[i] = 0 371 } 372 i++ 373 } 374 if m.ForceWaited { 375 dAtA[i] = 0x20 376 i++ 377 if m.ForceWaited { 378 dAtA[i] = 1 379 } else { 380 dAtA[i] = 0 381 } 382 i++ 383 } 384 return i, nil 385 } 386 387 func encodeVarintKv(dAtA []byte, offset int, v uint64) int { 388 for v >= 1<<7 { 389 dAtA[offset] = uint8(v&0x7f | 0x80) 390 v >>= 7 391 offset++ 392 } 393 dAtA[offset] = uint8(v) 394 return offset + 1 395 } 396 func (m *KeyValueUpdate) Size() (n int) { 397 var l int 398 _ = l 399 l = len(m.Key) 400 if l > 0 { 401 n += 1 + l + sovKv(uint64(l)) 402 } 403 l = len(m.Value) 404 if l > 0 { 405 n += 1 + l + sovKv(uint64(l)) 406 } 407 if m.Commit { 408 n += 2 409 } 410 return n 411 } 412 413 func (m *KeyValueUpdateResult) Size() (n int) { 414 var l int 415 _ = l 416 l = len(m.Key) 417 if l > 0 { 418 n += 1 + l + sovKv(uint64(l)) 419 } 420 l = len(m.Old) 421 if l > 0 { 422 n += 1 + l + sovKv(uint64(l)) 423 } 424 l = len(m.New) 425 if l > 0 { 426 n += 1 + l + sovKv(uint64(l)) 427 } 428 return n 429 } 430 431 func (m *QueryLimits) Size() (n int) { 432 var l int 433 _ = l 434 if m.MaxRecentlyQueriedSeriesBlocks != nil { 435 l = m.MaxRecentlyQueriedSeriesBlocks.Size() 436 n += 1 + l + sovKv(uint64(l)) 437 } 438 if m.MaxRecentlyQueriedSeriesDiskBytesRead != nil { 439 l = m.MaxRecentlyQueriedSeriesDiskBytesRead.Size() 440 n += 1 + l + sovKv(uint64(l)) 441 } 442 if m.MaxRecentlyQueriedSeriesDiskRead != nil { 443 l = m.MaxRecentlyQueriedSeriesDiskRead.Size() 444 n += 1 + l + sovKv(uint64(l)) 445 } 446 if m.MaxRecentlyQueriedMetadataRead != nil { 447 l = m.MaxRecentlyQueriedMetadataRead.Size() 448 n += 1 + l + sovKv(uint64(l)) 449 } 450 return n 451 } 452 453 func (m *QueryLimit) Size() (n int) { 454 var l int 455 _ = l 456 if m.Limit != 0 { 457 n += 1 + sovKv(uint64(m.Limit)) 458 } 459 if m.LookbackSeconds != 0 { 460 n += 1 + sovKv(uint64(m.LookbackSeconds)) 461 } 462 if m.ForceExceeded { 463 n += 2 464 } 465 if m.ForceWaited { 466 n += 2 467 } 468 return n 469 } 470 471 func sovKv(x uint64) (n int) { 472 for { 473 n++ 474 x >>= 7 475 if x == 0 { 476 break 477 } 478 } 479 return n 480 } 481 func sozKv(x uint64) (n int) { 482 return sovKv(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 483 } 484 func (m *KeyValueUpdate) Unmarshal(dAtA []byte) error { 485 l := len(dAtA) 486 iNdEx := 0 487 for iNdEx < l { 488 preIndex := iNdEx 489 var wire uint64 490 for shift := uint(0); ; shift += 7 { 491 if shift >= 64 { 492 return ErrIntOverflowKv 493 } 494 if iNdEx >= l { 495 return io.ErrUnexpectedEOF 496 } 497 b := dAtA[iNdEx] 498 iNdEx++ 499 wire |= (uint64(b) & 0x7F) << shift 500 if b < 0x80 { 501 break 502 } 503 } 504 fieldNum := int32(wire >> 3) 505 wireType := int(wire & 0x7) 506 if wireType == 4 { 507 return fmt.Errorf("proto: KeyValueUpdate: wiretype end group for non-group") 508 } 509 if fieldNum <= 0 { 510 return fmt.Errorf("proto: KeyValueUpdate: illegal tag %d (wire type %d)", fieldNum, wire) 511 } 512 switch fieldNum { 513 case 1: 514 if wireType != 2 { 515 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) 516 } 517 var stringLen uint64 518 for shift := uint(0); ; shift += 7 { 519 if shift >= 64 { 520 return ErrIntOverflowKv 521 } 522 if iNdEx >= l { 523 return io.ErrUnexpectedEOF 524 } 525 b := dAtA[iNdEx] 526 iNdEx++ 527 stringLen |= (uint64(b) & 0x7F) << shift 528 if b < 0x80 { 529 break 530 } 531 } 532 intStringLen := int(stringLen) 533 if intStringLen < 0 { 534 return ErrInvalidLengthKv 535 } 536 postIndex := iNdEx + intStringLen 537 if postIndex > l { 538 return io.ErrUnexpectedEOF 539 } 540 m.Key = string(dAtA[iNdEx:postIndex]) 541 iNdEx = postIndex 542 case 2: 543 if wireType != 2 { 544 return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) 545 } 546 var stringLen uint64 547 for shift := uint(0); ; shift += 7 { 548 if shift >= 64 { 549 return ErrIntOverflowKv 550 } 551 if iNdEx >= l { 552 return io.ErrUnexpectedEOF 553 } 554 b := dAtA[iNdEx] 555 iNdEx++ 556 stringLen |= (uint64(b) & 0x7F) << shift 557 if b < 0x80 { 558 break 559 } 560 } 561 intStringLen := int(stringLen) 562 if intStringLen < 0 { 563 return ErrInvalidLengthKv 564 } 565 postIndex := iNdEx + intStringLen 566 if postIndex > l { 567 return io.ErrUnexpectedEOF 568 } 569 m.Value = string(dAtA[iNdEx:postIndex]) 570 iNdEx = postIndex 571 case 3: 572 if wireType != 0 { 573 return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType) 574 } 575 var v int 576 for shift := uint(0); ; shift += 7 { 577 if shift >= 64 { 578 return ErrIntOverflowKv 579 } 580 if iNdEx >= l { 581 return io.ErrUnexpectedEOF 582 } 583 b := dAtA[iNdEx] 584 iNdEx++ 585 v |= (int(b) & 0x7F) << shift 586 if b < 0x80 { 587 break 588 } 589 } 590 m.Commit = bool(v != 0) 591 default: 592 iNdEx = preIndex 593 skippy, err := skipKv(dAtA[iNdEx:]) 594 if err != nil { 595 return err 596 } 597 if skippy < 0 { 598 return ErrInvalidLengthKv 599 } 600 if (iNdEx + skippy) > l { 601 return io.ErrUnexpectedEOF 602 } 603 iNdEx += skippy 604 } 605 } 606 607 if iNdEx > l { 608 return io.ErrUnexpectedEOF 609 } 610 return nil 611 } 612 func (m *KeyValueUpdateResult) Unmarshal(dAtA []byte) error { 613 l := len(dAtA) 614 iNdEx := 0 615 for iNdEx < l { 616 preIndex := iNdEx 617 var wire uint64 618 for shift := uint(0); ; shift += 7 { 619 if shift >= 64 { 620 return ErrIntOverflowKv 621 } 622 if iNdEx >= l { 623 return io.ErrUnexpectedEOF 624 } 625 b := dAtA[iNdEx] 626 iNdEx++ 627 wire |= (uint64(b) & 0x7F) << shift 628 if b < 0x80 { 629 break 630 } 631 } 632 fieldNum := int32(wire >> 3) 633 wireType := int(wire & 0x7) 634 if wireType == 4 { 635 return fmt.Errorf("proto: KeyValueUpdateResult: wiretype end group for non-group") 636 } 637 if fieldNum <= 0 { 638 return fmt.Errorf("proto: KeyValueUpdateResult: illegal tag %d (wire type %d)", fieldNum, wire) 639 } 640 switch fieldNum { 641 case 1: 642 if wireType != 2 { 643 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) 644 } 645 var stringLen uint64 646 for shift := uint(0); ; shift += 7 { 647 if shift >= 64 { 648 return ErrIntOverflowKv 649 } 650 if iNdEx >= l { 651 return io.ErrUnexpectedEOF 652 } 653 b := dAtA[iNdEx] 654 iNdEx++ 655 stringLen |= (uint64(b) & 0x7F) << shift 656 if b < 0x80 { 657 break 658 } 659 } 660 intStringLen := int(stringLen) 661 if intStringLen < 0 { 662 return ErrInvalidLengthKv 663 } 664 postIndex := iNdEx + intStringLen 665 if postIndex > l { 666 return io.ErrUnexpectedEOF 667 } 668 m.Key = string(dAtA[iNdEx:postIndex]) 669 iNdEx = postIndex 670 case 2: 671 if wireType != 2 { 672 return fmt.Errorf("proto: wrong wireType = %d for field Old", wireType) 673 } 674 var stringLen uint64 675 for shift := uint(0); ; shift += 7 { 676 if shift >= 64 { 677 return ErrIntOverflowKv 678 } 679 if iNdEx >= l { 680 return io.ErrUnexpectedEOF 681 } 682 b := dAtA[iNdEx] 683 iNdEx++ 684 stringLen |= (uint64(b) & 0x7F) << shift 685 if b < 0x80 { 686 break 687 } 688 } 689 intStringLen := int(stringLen) 690 if intStringLen < 0 { 691 return ErrInvalidLengthKv 692 } 693 postIndex := iNdEx + intStringLen 694 if postIndex > l { 695 return io.ErrUnexpectedEOF 696 } 697 m.Old = string(dAtA[iNdEx:postIndex]) 698 iNdEx = postIndex 699 case 3: 700 if wireType != 2 { 701 return fmt.Errorf("proto: wrong wireType = %d for field New", wireType) 702 } 703 var stringLen uint64 704 for shift := uint(0); ; shift += 7 { 705 if shift >= 64 { 706 return ErrIntOverflowKv 707 } 708 if iNdEx >= l { 709 return io.ErrUnexpectedEOF 710 } 711 b := dAtA[iNdEx] 712 iNdEx++ 713 stringLen |= (uint64(b) & 0x7F) << shift 714 if b < 0x80 { 715 break 716 } 717 } 718 intStringLen := int(stringLen) 719 if intStringLen < 0 { 720 return ErrInvalidLengthKv 721 } 722 postIndex := iNdEx + intStringLen 723 if postIndex > l { 724 return io.ErrUnexpectedEOF 725 } 726 m.New = string(dAtA[iNdEx:postIndex]) 727 iNdEx = postIndex 728 default: 729 iNdEx = preIndex 730 skippy, err := skipKv(dAtA[iNdEx:]) 731 if err != nil { 732 return err 733 } 734 if skippy < 0 { 735 return ErrInvalidLengthKv 736 } 737 if (iNdEx + skippy) > l { 738 return io.ErrUnexpectedEOF 739 } 740 iNdEx += skippy 741 } 742 } 743 744 if iNdEx > l { 745 return io.ErrUnexpectedEOF 746 } 747 return nil 748 } 749 func (m *QueryLimits) Unmarshal(dAtA []byte) error { 750 l := len(dAtA) 751 iNdEx := 0 752 for iNdEx < l { 753 preIndex := iNdEx 754 var wire uint64 755 for shift := uint(0); ; shift += 7 { 756 if shift >= 64 { 757 return ErrIntOverflowKv 758 } 759 if iNdEx >= l { 760 return io.ErrUnexpectedEOF 761 } 762 b := dAtA[iNdEx] 763 iNdEx++ 764 wire |= (uint64(b) & 0x7F) << shift 765 if b < 0x80 { 766 break 767 } 768 } 769 fieldNum := int32(wire >> 3) 770 wireType := int(wire & 0x7) 771 if wireType == 4 { 772 return fmt.Errorf("proto: QueryLimits: wiretype end group for non-group") 773 } 774 if fieldNum <= 0 { 775 return fmt.Errorf("proto: QueryLimits: illegal tag %d (wire type %d)", fieldNum, wire) 776 } 777 switch fieldNum { 778 case 1: 779 if wireType != 2 { 780 return fmt.Errorf("proto: wrong wireType = %d for field MaxRecentlyQueriedSeriesBlocks", wireType) 781 } 782 var msglen int 783 for shift := uint(0); ; shift += 7 { 784 if shift >= 64 { 785 return ErrIntOverflowKv 786 } 787 if iNdEx >= l { 788 return io.ErrUnexpectedEOF 789 } 790 b := dAtA[iNdEx] 791 iNdEx++ 792 msglen |= (int(b) & 0x7F) << shift 793 if b < 0x80 { 794 break 795 } 796 } 797 if msglen < 0 { 798 return ErrInvalidLengthKv 799 } 800 postIndex := iNdEx + msglen 801 if postIndex > l { 802 return io.ErrUnexpectedEOF 803 } 804 if m.MaxRecentlyQueriedSeriesBlocks == nil { 805 m.MaxRecentlyQueriedSeriesBlocks = &QueryLimit{} 806 } 807 if err := m.MaxRecentlyQueriedSeriesBlocks.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 808 return err 809 } 810 iNdEx = postIndex 811 case 2: 812 if wireType != 2 { 813 return fmt.Errorf("proto: wrong wireType = %d for field MaxRecentlyQueriedSeriesDiskBytesRead", wireType) 814 } 815 var msglen int 816 for shift := uint(0); ; shift += 7 { 817 if shift >= 64 { 818 return ErrIntOverflowKv 819 } 820 if iNdEx >= l { 821 return io.ErrUnexpectedEOF 822 } 823 b := dAtA[iNdEx] 824 iNdEx++ 825 msglen |= (int(b) & 0x7F) << shift 826 if b < 0x80 { 827 break 828 } 829 } 830 if msglen < 0 { 831 return ErrInvalidLengthKv 832 } 833 postIndex := iNdEx + msglen 834 if postIndex > l { 835 return io.ErrUnexpectedEOF 836 } 837 if m.MaxRecentlyQueriedSeriesDiskBytesRead == nil { 838 m.MaxRecentlyQueriedSeriesDiskBytesRead = &QueryLimit{} 839 } 840 if err := m.MaxRecentlyQueriedSeriesDiskBytesRead.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 841 return err 842 } 843 iNdEx = postIndex 844 case 3: 845 if wireType != 2 { 846 return fmt.Errorf("proto: wrong wireType = %d for field MaxRecentlyQueriedSeriesDiskRead", wireType) 847 } 848 var msglen int 849 for shift := uint(0); ; shift += 7 { 850 if shift >= 64 { 851 return ErrIntOverflowKv 852 } 853 if iNdEx >= l { 854 return io.ErrUnexpectedEOF 855 } 856 b := dAtA[iNdEx] 857 iNdEx++ 858 msglen |= (int(b) & 0x7F) << shift 859 if b < 0x80 { 860 break 861 } 862 } 863 if msglen < 0 { 864 return ErrInvalidLengthKv 865 } 866 postIndex := iNdEx + msglen 867 if postIndex > l { 868 return io.ErrUnexpectedEOF 869 } 870 if m.MaxRecentlyQueriedSeriesDiskRead == nil { 871 m.MaxRecentlyQueriedSeriesDiskRead = &QueryLimit{} 872 } 873 if err := m.MaxRecentlyQueriedSeriesDiskRead.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 874 return err 875 } 876 iNdEx = postIndex 877 case 4: 878 if wireType != 2 { 879 return fmt.Errorf("proto: wrong wireType = %d for field MaxRecentlyQueriedMetadataRead", wireType) 880 } 881 var msglen int 882 for shift := uint(0); ; shift += 7 { 883 if shift >= 64 { 884 return ErrIntOverflowKv 885 } 886 if iNdEx >= l { 887 return io.ErrUnexpectedEOF 888 } 889 b := dAtA[iNdEx] 890 iNdEx++ 891 msglen |= (int(b) & 0x7F) << shift 892 if b < 0x80 { 893 break 894 } 895 } 896 if msglen < 0 { 897 return ErrInvalidLengthKv 898 } 899 postIndex := iNdEx + msglen 900 if postIndex > l { 901 return io.ErrUnexpectedEOF 902 } 903 if m.MaxRecentlyQueriedMetadataRead == nil { 904 m.MaxRecentlyQueriedMetadataRead = &QueryLimit{} 905 } 906 if err := m.MaxRecentlyQueriedMetadataRead.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 907 return err 908 } 909 iNdEx = postIndex 910 default: 911 iNdEx = preIndex 912 skippy, err := skipKv(dAtA[iNdEx:]) 913 if err != nil { 914 return err 915 } 916 if skippy < 0 { 917 return ErrInvalidLengthKv 918 } 919 if (iNdEx + skippy) > l { 920 return io.ErrUnexpectedEOF 921 } 922 iNdEx += skippy 923 } 924 } 925 926 if iNdEx > l { 927 return io.ErrUnexpectedEOF 928 } 929 return nil 930 } 931 func (m *QueryLimit) Unmarshal(dAtA []byte) error { 932 l := len(dAtA) 933 iNdEx := 0 934 for iNdEx < l { 935 preIndex := iNdEx 936 var wire uint64 937 for shift := uint(0); ; shift += 7 { 938 if shift >= 64 { 939 return ErrIntOverflowKv 940 } 941 if iNdEx >= l { 942 return io.ErrUnexpectedEOF 943 } 944 b := dAtA[iNdEx] 945 iNdEx++ 946 wire |= (uint64(b) & 0x7F) << shift 947 if b < 0x80 { 948 break 949 } 950 } 951 fieldNum := int32(wire >> 3) 952 wireType := int(wire & 0x7) 953 if wireType == 4 { 954 return fmt.Errorf("proto: QueryLimit: wiretype end group for non-group") 955 } 956 if fieldNum <= 0 { 957 return fmt.Errorf("proto: QueryLimit: illegal tag %d (wire type %d)", fieldNum, wire) 958 } 959 switch fieldNum { 960 case 1: 961 if wireType != 0 { 962 return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) 963 } 964 m.Limit = 0 965 for shift := uint(0); ; shift += 7 { 966 if shift >= 64 { 967 return ErrIntOverflowKv 968 } 969 if iNdEx >= l { 970 return io.ErrUnexpectedEOF 971 } 972 b := dAtA[iNdEx] 973 iNdEx++ 974 m.Limit |= (int64(b) & 0x7F) << shift 975 if b < 0x80 { 976 break 977 } 978 } 979 case 2: 980 if wireType != 0 { 981 return fmt.Errorf("proto: wrong wireType = %d for field LookbackSeconds", wireType) 982 } 983 m.LookbackSeconds = 0 984 for shift := uint(0); ; shift += 7 { 985 if shift >= 64 { 986 return ErrIntOverflowKv 987 } 988 if iNdEx >= l { 989 return io.ErrUnexpectedEOF 990 } 991 b := dAtA[iNdEx] 992 iNdEx++ 993 m.LookbackSeconds |= (int64(b) & 0x7F) << shift 994 if b < 0x80 { 995 break 996 } 997 } 998 case 3: 999 if wireType != 0 { 1000 return fmt.Errorf("proto: wrong wireType = %d for field ForceExceeded", wireType) 1001 } 1002 var v int 1003 for shift := uint(0); ; shift += 7 { 1004 if shift >= 64 { 1005 return ErrIntOverflowKv 1006 } 1007 if iNdEx >= l { 1008 return io.ErrUnexpectedEOF 1009 } 1010 b := dAtA[iNdEx] 1011 iNdEx++ 1012 v |= (int(b) & 0x7F) << shift 1013 if b < 0x80 { 1014 break 1015 } 1016 } 1017 m.ForceExceeded = bool(v != 0) 1018 case 4: 1019 if wireType != 0 { 1020 return fmt.Errorf("proto: wrong wireType = %d for field ForceWaited", wireType) 1021 } 1022 var v int 1023 for shift := uint(0); ; shift += 7 { 1024 if shift >= 64 { 1025 return ErrIntOverflowKv 1026 } 1027 if iNdEx >= l { 1028 return io.ErrUnexpectedEOF 1029 } 1030 b := dAtA[iNdEx] 1031 iNdEx++ 1032 v |= (int(b) & 0x7F) << shift 1033 if b < 0x80 { 1034 break 1035 } 1036 } 1037 m.ForceWaited = bool(v != 0) 1038 default: 1039 iNdEx = preIndex 1040 skippy, err := skipKv(dAtA[iNdEx:]) 1041 if err != nil { 1042 return err 1043 } 1044 if skippy < 0 { 1045 return ErrInvalidLengthKv 1046 } 1047 if (iNdEx + skippy) > l { 1048 return io.ErrUnexpectedEOF 1049 } 1050 iNdEx += skippy 1051 } 1052 } 1053 1054 if iNdEx > l { 1055 return io.ErrUnexpectedEOF 1056 } 1057 return nil 1058 } 1059 func skipKv(dAtA []byte) (n int, err error) { 1060 l := len(dAtA) 1061 iNdEx := 0 1062 for iNdEx < l { 1063 var wire uint64 1064 for shift := uint(0); ; shift += 7 { 1065 if shift >= 64 { 1066 return 0, ErrIntOverflowKv 1067 } 1068 if iNdEx >= l { 1069 return 0, io.ErrUnexpectedEOF 1070 } 1071 b := dAtA[iNdEx] 1072 iNdEx++ 1073 wire |= (uint64(b) & 0x7F) << shift 1074 if b < 0x80 { 1075 break 1076 } 1077 } 1078 wireType := int(wire & 0x7) 1079 switch wireType { 1080 case 0: 1081 for shift := uint(0); ; shift += 7 { 1082 if shift >= 64 { 1083 return 0, ErrIntOverflowKv 1084 } 1085 if iNdEx >= l { 1086 return 0, io.ErrUnexpectedEOF 1087 } 1088 iNdEx++ 1089 if dAtA[iNdEx-1] < 0x80 { 1090 break 1091 } 1092 } 1093 return iNdEx, nil 1094 case 1: 1095 iNdEx += 8 1096 return iNdEx, nil 1097 case 2: 1098 var length int 1099 for shift := uint(0); ; shift += 7 { 1100 if shift >= 64 { 1101 return 0, ErrIntOverflowKv 1102 } 1103 if iNdEx >= l { 1104 return 0, io.ErrUnexpectedEOF 1105 } 1106 b := dAtA[iNdEx] 1107 iNdEx++ 1108 length |= (int(b) & 0x7F) << shift 1109 if b < 0x80 { 1110 break 1111 } 1112 } 1113 iNdEx += length 1114 if length < 0 { 1115 return 0, ErrInvalidLengthKv 1116 } 1117 return iNdEx, nil 1118 case 3: 1119 for { 1120 var innerWire uint64 1121 var start int = iNdEx 1122 for shift := uint(0); ; shift += 7 { 1123 if shift >= 64 { 1124 return 0, ErrIntOverflowKv 1125 } 1126 if iNdEx >= l { 1127 return 0, io.ErrUnexpectedEOF 1128 } 1129 b := dAtA[iNdEx] 1130 iNdEx++ 1131 innerWire |= (uint64(b) & 0x7F) << shift 1132 if b < 0x80 { 1133 break 1134 } 1135 } 1136 innerWireType := int(innerWire & 0x7) 1137 if innerWireType == 4 { 1138 break 1139 } 1140 next, err := skipKv(dAtA[start:]) 1141 if err != nil { 1142 return 0, err 1143 } 1144 iNdEx = start + next 1145 } 1146 return iNdEx, nil 1147 case 4: 1148 return iNdEx, nil 1149 case 5: 1150 iNdEx += 4 1151 return iNdEx, nil 1152 default: 1153 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1154 } 1155 } 1156 panic("unreachable") 1157 } 1158 1159 var ( 1160 ErrInvalidLengthKv = fmt.Errorf("proto: negative length found during unmarshaling") 1161 ErrIntOverflowKv = fmt.Errorf("proto: integer overflow") 1162 ) 1163 1164 func init() { 1165 proto.RegisterFile("github.com/m3db/m3/src/cluster/generated/proto/kvpb/kv.proto", fileDescriptorKv) 1166 } 1167 1168 var fileDescriptorKv = []byte{ 1169 // 391 bytes of a gzipped FileDescriptorProto 1170 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x4d, 0xab, 0xd3, 0x40, 1171 0x14, 0x35, 0xe6, 0xf9, 0x78, 0xef, 0x16, 0x35, 0x0c, 0x0f, 0xe9, 0x2a, 0x84, 0xa0, 0xd0, 0x55, 1172 0x06, 0xec, 0xd6, 0x55, 0xd1, 0x95, 0x15, 0x74, 0x8a, 0x1f, 0x0b, 0x37, 0x93, 0x99, 0xdb, 0x1a, 1173 0x32, 0xc9, 0x94, 0xcc, 0xa4, 0x36, 0xbf, 0xc0, 0xad, 0x0b, 0x7f, 0x94, 0x4b, 0x7f, 0x82, 0xd4, 1174 0x3f, 0x22, 0x33, 0x29, 0xb4, 0x95, 0xd6, 0x76, 0x13, 0xee, 0x39, 0xb9, 0xe7, 0xdc, 0x3b, 0x87, 1175 0x0b, 0x2f, 0x16, 0x85, 0xfd, 0xd2, 0xe6, 0x99, 0xd0, 0x15, 0xad, 0xc6, 0x32, 0xa7, 0xd5, 0x98, 1176 0x9a, 0x46, 0x50, 0xa1, 0x5a, 0x63, 0xb1, 0xa1, 0x0b, 0xac, 0xb1, 0xe1, 0x16, 0x25, 0x5d, 0x36, 1177 0xda, 0x6a, 0x5a, 0xae, 0x96, 0x39, 0x2d, 0x57, 0x99, 0x47, 0xe4, 0xca, 0xc1, 0xf4, 0x2d, 0x3c, 1178 0x7a, 0x8d, 0xdd, 0x07, 0xae, 0x5a, 0x7c, 0xbf, 0x94, 0xdc, 0x22, 0x89, 0x20, 0x2c, 0xb1, 0x1b, 1179 0x06, 0x49, 0x30, 0xba, 0x65, 0xae, 0x24, 0x77, 0xf0, 0x60, 0xe5, 0x1a, 0x86, 0xf7, 0x3d, 0xd7, 1180 0x03, 0xf2, 0x04, 0xae, 0x85, 0xae, 0xaa, 0xc2, 0x0e, 0xc3, 0x24, 0x18, 0xdd, 0xb0, 0x2d, 0x4a, 1181 0xa7, 0x70, 0x77, 0xe8, 0xc8, 0xd0, 0xb4, 0xca, 0x1e, 0xf1, 0x8d, 0x20, 0xd4, 0x4a, 0x6e, 0x5d, 1182 0x5d, 0xe9, 0x98, 0x1a, 0xbf, 0x7a, 0xc3, 0x5b, 0xe6, 0xca, 0xf4, 0x5b, 0x08, 0x83, 0x77, 0x2d, 1183 0x36, 0xdd, 0xb4, 0xa8, 0x0a, 0x6b, 0xc8, 0x27, 0x88, 0x2b, 0xbe, 0x66, 0x28, 0xb0, 0xb6, 0xaa, 1184 0x73, 0x7f, 0x0a, 0x94, 0x33, 0xf7, 0x35, 0x13, 0xa5, 0x45, 0x69, 0xfc, 0x80, 0xc1, 0xf3, 0x28, 1185 0x73, 0xcf, 0xcb, 0x76, 0x52, 0x76, 0x46, 0x47, 0xe6, 0xf0, 0xec, 0x54, 0xc7, 0xcb, 0xc2, 0x94, 1186 0x93, 0xce, 0xa2, 0x61, 0xc8, 0xfb, 0x7d, 0x8f, 0x0d, 0xb8, 0x4c, 0x4e, 0x3e, 0x43, 0xf2, 0xbf, 1187 0x46, 0x3f, 0x22, 0x3c, 0x31, 0xe2, 0xac, 0xf2, 0x78, 0x3e, 0x6f, 0xd0, 0x72, 0xc9, 0x2d, 0xf7, 1188 0xde, 0x57, 0x97, 0xe7, 0xb3, 0xaf, 0x4b, 0x7f, 0x04, 0x00, 0xbb, 0x76, 0x77, 0x14, 0xca, 0x15, 1189 0x3e, 0xef, 0x90, 0xf5, 0x80, 0x8c, 0xe0, 0xb1, 0xd2, 0xba, 0xcc, 0xb9, 0x28, 0x67, 0x28, 0x74, 1190 0x2d, 0x8d, 0x8f, 0x2b, 0x64, 0xff, 0xd2, 0xe4, 0x29, 0x3c, 0x9c, 0xeb, 0x46, 0xe0, 0xab, 0xb5, 1191 0x40, 0x94, 0x28, 0xb7, 0x57, 0x74, 0x48, 0x92, 0x04, 0x06, 0x9e, 0xf8, 0xc8, 0x0b, 0x8b, 0xfd, 1192 0xee, 0x37, 0x6c, 0x9f, 0x9a, 0x44, 0x3f, 0x37, 0x71, 0xf0, 0x6b, 0x13, 0x07, 0xbf, 0x37, 0x71, 1193 0xf0, 0xfd, 0x4f, 0x7c, 0x2f, 0xbf, 0xf6, 0xf7, 0x3d, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x1c, 1194 0x39, 0x9e, 0xf7, 0x1f, 0x03, 0x00, 0x00, 1195 }