1// Code generated by protoc-gen-gogo. DO NOT EDIT. 2// source: cluster.proto 3 4package clusterpb 5 6import ( 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. 17var _ = proto.Marshal 18var _ = fmt.Errorf 19var _ = 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. 25const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 26 27type Part struct { 28 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 29 Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` 30 XXX_NoUnkeyedLiteral struct{} `json:"-"` 31 XXX_unrecognized []byte `json:"-"` 32 XXX_sizecache int32 `json:"-"` 33} 34 35func (m *Part) Reset() { *m = Part{} } 36func (m *Part) String() string { return proto.CompactTextString(m) } 37func (*Part) ProtoMessage() {} 38func (*Part) Descriptor() ([]byte, []int) { 39 return fileDescriptor_3cfb3b8ec240c376, []int{0} 40} 41func (m *Part) XXX_Unmarshal(b []byte) error { 42 return m.Unmarshal(b) 43} 44func (m *Part) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 45 if deterministic { 46 return xxx_messageInfo_Part.Marshal(b, m, deterministic) 47 } else { 48 b = b[:cap(b)] 49 n, err := m.MarshalToSizedBuffer(b) 50 if err != nil { 51 return nil, err 52 } 53 return b[:n], nil 54 } 55} 56func (m *Part) XXX_Merge(src proto.Message) { 57 xxx_messageInfo_Part.Merge(m, src) 58} 59func (m *Part) XXX_Size() int { 60 return m.Size() 61} 62func (m *Part) XXX_DiscardUnknown() { 63 xxx_messageInfo_Part.DiscardUnknown(m) 64} 65 66var xxx_messageInfo_Part proto.InternalMessageInfo 67 68type FullState struct { 69 Parts []Part `protobuf:"bytes,1,rep,name=parts,proto3" json:"parts"` 70 XXX_NoUnkeyedLiteral struct{} `json:"-"` 71 XXX_unrecognized []byte `json:"-"` 72 XXX_sizecache int32 `json:"-"` 73} 74 75func (m *FullState) Reset() { *m = FullState{} } 76func (m *FullState) String() string { return proto.CompactTextString(m) } 77func (*FullState) ProtoMessage() {} 78func (*FullState) Descriptor() ([]byte, []int) { 79 return fileDescriptor_3cfb3b8ec240c376, []int{1} 80} 81func (m *FullState) XXX_Unmarshal(b []byte) error { 82 return m.Unmarshal(b) 83} 84func (m *FullState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 85 if deterministic { 86 return xxx_messageInfo_FullState.Marshal(b, m, deterministic) 87 } else { 88 b = b[:cap(b)] 89 n, err := m.MarshalToSizedBuffer(b) 90 if err != nil { 91 return nil, err 92 } 93 return b[:n], nil 94 } 95} 96func (m *FullState) XXX_Merge(src proto.Message) { 97 xxx_messageInfo_FullState.Merge(m, src) 98} 99func (m *FullState) XXX_Size() int { 100 return m.Size() 101} 102func (m *FullState) XXX_DiscardUnknown() { 103 xxx_messageInfo_FullState.DiscardUnknown(m) 104} 105 106var xxx_messageInfo_FullState proto.InternalMessageInfo 107 108func init() { 109 proto.RegisterType((*Part)(nil), "clusterpb.Part") 110 proto.RegisterType((*FullState)(nil), "clusterpb.FullState") 111} 112 113func init() { proto.RegisterFile("cluster.proto", fileDescriptor_3cfb3b8ec240c376) } 114 115var fileDescriptor_3cfb3b8ec240c376 = []byte{ 116 // 168 bytes of a gzipped FileDescriptorProto 117 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4d, 0xce, 0x29, 0x2d, 118 0x2e, 0x49, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x72, 0x0b, 0x92, 0xa4, 119 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0xa2, 0xfa, 0x20, 0x16, 0x44, 0x81, 0x92, 0x0e, 0x17, 0x4b, 120 0x40, 0x62, 0x51, 0x89, 0x90, 0x00, 0x17, 0x73, 0x76, 0x6a, 0xa5, 0x04, 0xa3, 0x02, 0xa3, 0x06, 121 0x67, 0x10, 0x88, 0x29, 0x24, 0xc4, 0xc5, 0x92, 0x92, 0x58, 0x92, 0x28, 0xc1, 0xa4, 0xc0, 0xa8, 122 0xc1, 0x13, 0x04, 0x66, 0x2b, 0x59, 0x70, 0x71, 0xba, 0x95, 0xe6, 0xe4, 0x04, 0x97, 0x24, 0x96, 123 0xa4, 0x0a, 0x69, 0x73, 0xb1, 0x16, 0x24, 0x16, 0x95, 0x14, 0x4b, 0x30, 0x2a, 0x30, 0x6b, 0x70, 124 0x1b, 0xf1, 0xeb, 0xc1, 0xed, 0xd2, 0x03, 0x19, 0xe9, 0xc4, 0x72, 0xe2, 0x9e, 0x3c, 0x43, 0x10, 125 0x44, 0x8d, 0x93, 0xc0, 0x89, 0x87, 0x72, 0x0c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 126 0xf8, 0xe0, 0x91, 0x1c, 0x63, 0x12, 0x1b, 0xd8, 0x01, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 127 0xfd, 0x3c, 0xdb, 0xe7, 0xb2, 0x00, 0x00, 0x00, 128} 129 130func (m *Part) Marshal() (dAtA []byte, err error) { 131 size := m.Size() 132 dAtA = make([]byte, size) 133 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 134 if err != nil { 135 return nil, err 136 } 137 return dAtA[:n], nil 138} 139 140func (m *Part) MarshalTo(dAtA []byte) (int, error) { 141 size := m.Size() 142 return m.MarshalToSizedBuffer(dAtA[:size]) 143} 144 145func (m *Part) MarshalToSizedBuffer(dAtA []byte) (int, error) { 146 i := len(dAtA) 147 _ = i 148 var l int 149 _ = l 150 if m.XXX_unrecognized != nil { 151 i -= len(m.XXX_unrecognized) 152 copy(dAtA[i:], m.XXX_unrecognized) 153 } 154 if len(m.Data) > 0 { 155 i -= len(m.Data) 156 copy(dAtA[i:], m.Data) 157 i = encodeVarintCluster(dAtA, i, uint64(len(m.Data))) 158 i-- 159 dAtA[i] = 0x12 160 } 161 if len(m.Key) > 0 { 162 i -= len(m.Key) 163 copy(dAtA[i:], m.Key) 164 i = encodeVarintCluster(dAtA, i, uint64(len(m.Key))) 165 i-- 166 dAtA[i] = 0xa 167 } 168 return len(dAtA) - i, nil 169} 170 171func (m *FullState) Marshal() (dAtA []byte, err error) { 172 size := m.Size() 173 dAtA = make([]byte, size) 174 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 175 if err != nil { 176 return nil, err 177 } 178 return dAtA[:n], nil 179} 180 181func (m *FullState) MarshalTo(dAtA []byte) (int, error) { 182 size := m.Size() 183 return m.MarshalToSizedBuffer(dAtA[:size]) 184} 185 186func (m *FullState) MarshalToSizedBuffer(dAtA []byte) (int, error) { 187 i := len(dAtA) 188 _ = i 189 var l int 190 _ = l 191 if m.XXX_unrecognized != nil { 192 i -= len(m.XXX_unrecognized) 193 copy(dAtA[i:], m.XXX_unrecognized) 194 } 195 if len(m.Parts) > 0 { 196 for iNdEx := len(m.Parts) - 1; iNdEx >= 0; iNdEx-- { 197 { 198 size, err := m.Parts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 199 if err != nil { 200 return 0, err 201 } 202 i -= size 203 i = encodeVarintCluster(dAtA, i, uint64(size)) 204 } 205 i-- 206 dAtA[i] = 0xa 207 } 208 } 209 return len(dAtA) - i, nil 210} 211 212func encodeVarintCluster(dAtA []byte, offset int, v uint64) int { 213 offset -= sovCluster(v) 214 base := offset 215 for v >= 1<<7 { 216 dAtA[offset] = uint8(v&0x7f | 0x80) 217 v >>= 7 218 offset++ 219 } 220 dAtA[offset] = uint8(v) 221 return base 222} 223func (m *Part) Size() (n int) { 224 if m == nil { 225 return 0 226 } 227 var l int 228 _ = l 229 l = len(m.Key) 230 if l > 0 { 231 n += 1 + l + sovCluster(uint64(l)) 232 } 233 l = len(m.Data) 234 if l > 0 { 235 n += 1 + l + sovCluster(uint64(l)) 236 } 237 if m.XXX_unrecognized != nil { 238 n += len(m.XXX_unrecognized) 239 } 240 return n 241} 242 243func (m *FullState) Size() (n int) { 244 if m == nil { 245 return 0 246 } 247 var l int 248 _ = l 249 if len(m.Parts) > 0 { 250 for _, e := range m.Parts { 251 l = e.Size() 252 n += 1 + l + sovCluster(uint64(l)) 253 } 254 } 255 if m.XXX_unrecognized != nil { 256 n += len(m.XXX_unrecognized) 257 } 258 return n 259} 260 261func sovCluster(x uint64) (n int) { 262 return (math_bits.Len64(x|1) + 6) / 7 263} 264func sozCluster(x uint64) (n int) { 265 return sovCluster(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 266} 267func (m *Part) Unmarshal(dAtA []byte) error { 268 l := len(dAtA) 269 iNdEx := 0 270 for iNdEx < l { 271 preIndex := iNdEx 272 var wire uint64 273 for shift := uint(0); ; shift += 7 { 274 if shift >= 64 { 275 return ErrIntOverflowCluster 276 } 277 if iNdEx >= l { 278 return io.ErrUnexpectedEOF 279 } 280 b := dAtA[iNdEx] 281 iNdEx++ 282 wire |= uint64(b&0x7F) << shift 283 if b < 0x80 { 284 break 285 } 286 } 287 fieldNum := int32(wire >> 3) 288 wireType := int(wire & 0x7) 289 if wireType == 4 { 290 return fmt.Errorf("proto: Part: wiretype end group for non-group") 291 } 292 if fieldNum <= 0 { 293 return fmt.Errorf("proto: Part: illegal tag %d (wire type %d)", fieldNum, wire) 294 } 295 switch fieldNum { 296 case 1: 297 if wireType != 2 { 298 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) 299 } 300 var stringLen uint64 301 for shift := uint(0); ; shift += 7 { 302 if shift >= 64 { 303 return ErrIntOverflowCluster 304 } 305 if iNdEx >= l { 306 return io.ErrUnexpectedEOF 307 } 308 b := dAtA[iNdEx] 309 iNdEx++ 310 stringLen |= uint64(b&0x7F) << shift 311 if b < 0x80 { 312 break 313 } 314 } 315 intStringLen := int(stringLen) 316 if intStringLen < 0 { 317 return ErrInvalidLengthCluster 318 } 319 postIndex := iNdEx + intStringLen 320 if postIndex < 0 { 321 return ErrInvalidLengthCluster 322 } 323 if postIndex > l { 324 return io.ErrUnexpectedEOF 325 } 326 m.Key = string(dAtA[iNdEx:postIndex]) 327 iNdEx = postIndex 328 case 2: 329 if wireType != 2 { 330 return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) 331 } 332 var byteLen int 333 for shift := uint(0); ; shift += 7 { 334 if shift >= 64 { 335 return ErrIntOverflowCluster 336 } 337 if iNdEx >= l { 338 return io.ErrUnexpectedEOF 339 } 340 b := dAtA[iNdEx] 341 iNdEx++ 342 byteLen |= int(b&0x7F) << shift 343 if b < 0x80 { 344 break 345 } 346 } 347 if byteLen < 0 { 348 return ErrInvalidLengthCluster 349 } 350 postIndex := iNdEx + byteLen 351 if postIndex < 0 { 352 return ErrInvalidLengthCluster 353 } 354 if postIndex > l { 355 return io.ErrUnexpectedEOF 356 } 357 m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) 358 if m.Data == nil { 359 m.Data = []byte{} 360 } 361 iNdEx = postIndex 362 default: 363 iNdEx = preIndex 364 skippy, err := skipCluster(dAtA[iNdEx:]) 365 if err != nil { 366 return err 367 } 368 if skippy < 0 { 369 return ErrInvalidLengthCluster 370 } 371 if (iNdEx + skippy) < 0 { 372 return ErrInvalidLengthCluster 373 } 374 if (iNdEx + skippy) > l { 375 return io.ErrUnexpectedEOF 376 } 377 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 378 iNdEx += skippy 379 } 380 } 381 382 if iNdEx > l { 383 return io.ErrUnexpectedEOF 384 } 385 return nil 386} 387func (m *FullState) Unmarshal(dAtA []byte) error { 388 l := len(dAtA) 389 iNdEx := 0 390 for iNdEx < l { 391 preIndex := iNdEx 392 var wire uint64 393 for shift := uint(0); ; shift += 7 { 394 if shift >= 64 { 395 return ErrIntOverflowCluster 396 } 397 if iNdEx >= l { 398 return io.ErrUnexpectedEOF 399 } 400 b := dAtA[iNdEx] 401 iNdEx++ 402 wire |= uint64(b&0x7F) << shift 403 if b < 0x80 { 404 break 405 } 406 } 407 fieldNum := int32(wire >> 3) 408 wireType := int(wire & 0x7) 409 if wireType == 4 { 410 return fmt.Errorf("proto: FullState: wiretype end group for non-group") 411 } 412 if fieldNum <= 0 { 413 return fmt.Errorf("proto: FullState: illegal tag %d (wire type %d)", fieldNum, wire) 414 } 415 switch fieldNum { 416 case 1: 417 if wireType != 2 { 418 return fmt.Errorf("proto: wrong wireType = %d for field Parts", wireType) 419 } 420 var msglen int 421 for shift := uint(0); ; shift += 7 { 422 if shift >= 64 { 423 return ErrIntOverflowCluster 424 } 425 if iNdEx >= l { 426 return io.ErrUnexpectedEOF 427 } 428 b := dAtA[iNdEx] 429 iNdEx++ 430 msglen |= int(b&0x7F) << shift 431 if b < 0x80 { 432 break 433 } 434 } 435 if msglen < 0 { 436 return ErrInvalidLengthCluster 437 } 438 postIndex := iNdEx + msglen 439 if postIndex < 0 { 440 return ErrInvalidLengthCluster 441 } 442 if postIndex > l { 443 return io.ErrUnexpectedEOF 444 } 445 m.Parts = append(m.Parts, Part{}) 446 if err := m.Parts[len(m.Parts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 447 return err 448 } 449 iNdEx = postIndex 450 default: 451 iNdEx = preIndex 452 skippy, err := skipCluster(dAtA[iNdEx:]) 453 if err != nil { 454 return err 455 } 456 if skippy < 0 { 457 return ErrInvalidLengthCluster 458 } 459 if (iNdEx + skippy) < 0 { 460 return ErrInvalidLengthCluster 461 } 462 if (iNdEx + skippy) > l { 463 return io.ErrUnexpectedEOF 464 } 465 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 466 iNdEx += skippy 467 } 468 } 469 470 if iNdEx > l { 471 return io.ErrUnexpectedEOF 472 } 473 return nil 474} 475func skipCluster(dAtA []byte) (n int, err error) { 476 l := len(dAtA) 477 iNdEx := 0 478 for iNdEx < l { 479 var wire uint64 480 for shift := uint(0); ; shift += 7 { 481 if shift >= 64 { 482 return 0, ErrIntOverflowCluster 483 } 484 if iNdEx >= l { 485 return 0, io.ErrUnexpectedEOF 486 } 487 b := dAtA[iNdEx] 488 iNdEx++ 489 wire |= (uint64(b) & 0x7F) << shift 490 if b < 0x80 { 491 break 492 } 493 } 494 wireType := int(wire & 0x7) 495 switch wireType { 496 case 0: 497 for shift := uint(0); ; shift += 7 { 498 if shift >= 64 { 499 return 0, ErrIntOverflowCluster 500 } 501 if iNdEx >= l { 502 return 0, io.ErrUnexpectedEOF 503 } 504 iNdEx++ 505 if dAtA[iNdEx-1] < 0x80 { 506 break 507 } 508 } 509 return iNdEx, nil 510 case 1: 511 iNdEx += 8 512 return iNdEx, nil 513 case 2: 514 var length int 515 for shift := uint(0); ; shift += 7 { 516 if shift >= 64 { 517 return 0, ErrIntOverflowCluster 518 } 519 if iNdEx >= l { 520 return 0, io.ErrUnexpectedEOF 521 } 522 b := dAtA[iNdEx] 523 iNdEx++ 524 length |= (int(b) & 0x7F) << shift 525 if b < 0x80 { 526 break 527 } 528 } 529 if length < 0 { 530 return 0, ErrInvalidLengthCluster 531 } 532 iNdEx += length 533 if iNdEx < 0 { 534 return 0, ErrInvalidLengthCluster 535 } 536 return iNdEx, nil 537 case 3: 538 for { 539 var innerWire uint64 540 var start int = iNdEx 541 for shift := uint(0); ; shift += 7 { 542 if shift >= 64 { 543 return 0, ErrIntOverflowCluster 544 } 545 if iNdEx >= l { 546 return 0, io.ErrUnexpectedEOF 547 } 548 b := dAtA[iNdEx] 549 iNdEx++ 550 innerWire |= (uint64(b) & 0x7F) << shift 551 if b < 0x80 { 552 break 553 } 554 } 555 innerWireType := int(innerWire & 0x7) 556 if innerWireType == 4 { 557 break 558 } 559 next, err := skipCluster(dAtA[start:]) 560 if err != nil { 561 return 0, err 562 } 563 iNdEx = start + next 564 if iNdEx < 0 { 565 return 0, ErrInvalidLengthCluster 566 } 567 } 568 return iNdEx, nil 569 case 4: 570 return iNdEx, nil 571 case 5: 572 iNdEx += 4 573 return iNdEx, nil 574 default: 575 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 576 } 577 } 578 panic("unreachable") 579} 580 581var ( 582 ErrInvalidLengthCluster = fmt.Errorf("proto: negative length found during unmarshaling") 583 ErrIntOverflowCluster = fmt.Errorf("proto: integer overflow") 584) 585