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.GoGoProtoPackageIsVersion3 // 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) || (iNdEx+skippy) < 0 { 369 return ErrInvalidLengthCluster 370 } 371 if (iNdEx + skippy) > l { 372 return io.ErrUnexpectedEOF 373 } 374 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 375 iNdEx += skippy 376 } 377 } 378 379 if iNdEx > l { 380 return io.ErrUnexpectedEOF 381 } 382 return nil 383} 384func (m *FullState) Unmarshal(dAtA []byte) error { 385 l := len(dAtA) 386 iNdEx := 0 387 for iNdEx < l { 388 preIndex := iNdEx 389 var wire uint64 390 for shift := uint(0); ; shift += 7 { 391 if shift >= 64 { 392 return ErrIntOverflowCluster 393 } 394 if iNdEx >= l { 395 return io.ErrUnexpectedEOF 396 } 397 b := dAtA[iNdEx] 398 iNdEx++ 399 wire |= uint64(b&0x7F) << shift 400 if b < 0x80 { 401 break 402 } 403 } 404 fieldNum := int32(wire >> 3) 405 wireType := int(wire & 0x7) 406 if wireType == 4 { 407 return fmt.Errorf("proto: FullState: wiretype end group for non-group") 408 } 409 if fieldNum <= 0 { 410 return fmt.Errorf("proto: FullState: illegal tag %d (wire type %d)", fieldNum, wire) 411 } 412 switch fieldNum { 413 case 1: 414 if wireType != 2 { 415 return fmt.Errorf("proto: wrong wireType = %d for field Parts", wireType) 416 } 417 var msglen int 418 for shift := uint(0); ; shift += 7 { 419 if shift >= 64 { 420 return ErrIntOverflowCluster 421 } 422 if iNdEx >= l { 423 return io.ErrUnexpectedEOF 424 } 425 b := dAtA[iNdEx] 426 iNdEx++ 427 msglen |= int(b&0x7F) << shift 428 if b < 0x80 { 429 break 430 } 431 } 432 if msglen < 0 { 433 return ErrInvalidLengthCluster 434 } 435 postIndex := iNdEx + msglen 436 if postIndex < 0 { 437 return ErrInvalidLengthCluster 438 } 439 if postIndex > l { 440 return io.ErrUnexpectedEOF 441 } 442 m.Parts = append(m.Parts, Part{}) 443 if err := m.Parts[len(m.Parts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 444 return err 445 } 446 iNdEx = postIndex 447 default: 448 iNdEx = preIndex 449 skippy, err := skipCluster(dAtA[iNdEx:]) 450 if err != nil { 451 return err 452 } 453 if (skippy < 0) || (iNdEx+skippy) < 0 { 454 return ErrInvalidLengthCluster 455 } 456 if (iNdEx + skippy) > l { 457 return io.ErrUnexpectedEOF 458 } 459 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 460 iNdEx += skippy 461 } 462 } 463 464 if iNdEx > l { 465 return io.ErrUnexpectedEOF 466 } 467 return nil 468} 469func skipCluster(dAtA []byte) (n int, err error) { 470 l := len(dAtA) 471 iNdEx := 0 472 depth := 0 473 for iNdEx < l { 474 var wire uint64 475 for shift := uint(0); ; shift += 7 { 476 if shift >= 64 { 477 return 0, ErrIntOverflowCluster 478 } 479 if iNdEx >= l { 480 return 0, io.ErrUnexpectedEOF 481 } 482 b := dAtA[iNdEx] 483 iNdEx++ 484 wire |= (uint64(b) & 0x7F) << shift 485 if b < 0x80 { 486 break 487 } 488 } 489 wireType := int(wire & 0x7) 490 switch wireType { 491 case 0: 492 for shift := uint(0); ; shift += 7 { 493 if shift >= 64 { 494 return 0, ErrIntOverflowCluster 495 } 496 if iNdEx >= l { 497 return 0, io.ErrUnexpectedEOF 498 } 499 iNdEx++ 500 if dAtA[iNdEx-1] < 0x80 { 501 break 502 } 503 } 504 case 1: 505 iNdEx += 8 506 case 2: 507 var length int 508 for shift := uint(0); ; shift += 7 { 509 if shift >= 64 { 510 return 0, ErrIntOverflowCluster 511 } 512 if iNdEx >= l { 513 return 0, io.ErrUnexpectedEOF 514 } 515 b := dAtA[iNdEx] 516 iNdEx++ 517 length |= (int(b) & 0x7F) << shift 518 if b < 0x80 { 519 break 520 } 521 } 522 if length < 0 { 523 return 0, ErrInvalidLengthCluster 524 } 525 iNdEx += length 526 case 3: 527 depth++ 528 case 4: 529 if depth == 0 { 530 return 0, ErrUnexpectedEndOfGroupCluster 531 } 532 depth-- 533 case 5: 534 iNdEx += 4 535 default: 536 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 537 } 538 if iNdEx < 0 { 539 return 0, ErrInvalidLengthCluster 540 } 541 if depth == 0 { 542 return iNdEx, nil 543 } 544 } 545 return 0, io.ErrUnexpectedEOF 546} 547 548var ( 549 ErrInvalidLengthCluster = fmt.Errorf("proto: negative length found during unmarshaling") 550 ErrIntOverflowCluster = fmt.Errorf("proto: integer overflow") 551 ErrUnexpectedEndOfGroupCluster = fmt.Errorf("proto: unexpected end of group") 552) 553