github.com/minio/minio@v0.0.0-20240328213742-3f72439b8a27/cmd/data-usage-cache_gen.go (about) 1 package cmd 2 3 // Code generated by github.com/tinylib/msgp DO NOT EDIT. 4 5 import ( 6 "time" 7 8 "github.com/tinylib/msgp/msgp" 9 ) 10 11 // DecodeMsg implements msgp.Decodable 12 func (z *allTierStats) DecodeMsg(dc *msgp.Reader) (err error) { 13 var field []byte 14 _ = field 15 var zb0001 uint32 16 zb0001, err = dc.ReadMapHeader() 17 if err != nil { 18 err = msgp.WrapError(err) 19 return 20 } 21 for zb0001 > 0 { 22 zb0001-- 23 field, err = dc.ReadMapKeyPtr() 24 if err != nil { 25 err = msgp.WrapError(err) 26 return 27 } 28 switch msgp.UnsafeString(field) { 29 case "ts": 30 var zb0002 uint32 31 zb0002, err = dc.ReadMapHeader() 32 if err != nil { 33 err = msgp.WrapError(err, "Tiers") 34 return 35 } 36 if z.Tiers == nil { 37 z.Tiers = make(map[string]tierStats, zb0002) 38 } else if len(z.Tiers) > 0 { 39 for key := range z.Tiers { 40 delete(z.Tiers, key) 41 } 42 } 43 for zb0002 > 0 { 44 zb0002-- 45 var za0001 string 46 var za0002 tierStats 47 za0001, err = dc.ReadString() 48 if err != nil { 49 err = msgp.WrapError(err, "Tiers") 50 return 51 } 52 var zb0003 uint32 53 zb0003, err = dc.ReadMapHeader() 54 if err != nil { 55 err = msgp.WrapError(err, "Tiers", za0001) 56 return 57 } 58 for zb0003 > 0 { 59 zb0003-- 60 field, err = dc.ReadMapKeyPtr() 61 if err != nil { 62 err = msgp.WrapError(err, "Tiers", za0001) 63 return 64 } 65 switch msgp.UnsafeString(field) { 66 case "ts": 67 za0002.TotalSize, err = dc.ReadUint64() 68 if err != nil { 69 err = msgp.WrapError(err, "Tiers", za0001, "TotalSize") 70 return 71 } 72 case "nv": 73 za0002.NumVersions, err = dc.ReadInt() 74 if err != nil { 75 err = msgp.WrapError(err, "Tiers", za0001, "NumVersions") 76 return 77 } 78 case "no": 79 za0002.NumObjects, err = dc.ReadInt() 80 if err != nil { 81 err = msgp.WrapError(err, "Tiers", za0001, "NumObjects") 82 return 83 } 84 default: 85 err = dc.Skip() 86 if err != nil { 87 err = msgp.WrapError(err, "Tiers", za0001) 88 return 89 } 90 } 91 } 92 z.Tiers[za0001] = za0002 93 } 94 default: 95 err = dc.Skip() 96 if err != nil { 97 err = msgp.WrapError(err) 98 return 99 } 100 } 101 } 102 return 103 } 104 105 // EncodeMsg implements msgp.Encodable 106 func (z *allTierStats) EncodeMsg(en *msgp.Writer) (err error) { 107 // map header, size 1 108 // write "ts" 109 err = en.Append(0x81, 0xa2, 0x74, 0x73) 110 if err != nil { 111 return 112 } 113 err = en.WriteMapHeader(uint32(len(z.Tiers))) 114 if err != nil { 115 err = msgp.WrapError(err, "Tiers") 116 return 117 } 118 for za0001, za0002 := range z.Tiers { 119 err = en.WriteString(za0001) 120 if err != nil { 121 err = msgp.WrapError(err, "Tiers") 122 return 123 } 124 // map header, size 3 125 // write "ts" 126 err = en.Append(0x83, 0xa2, 0x74, 0x73) 127 if err != nil { 128 return 129 } 130 err = en.WriteUint64(za0002.TotalSize) 131 if err != nil { 132 err = msgp.WrapError(err, "Tiers", za0001, "TotalSize") 133 return 134 } 135 // write "nv" 136 err = en.Append(0xa2, 0x6e, 0x76) 137 if err != nil { 138 return 139 } 140 err = en.WriteInt(za0002.NumVersions) 141 if err != nil { 142 err = msgp.WrapError(err, "Tiers", za0001, "NumVersions") 143 return 144 } 145 // write "no" 146 err = en.Append(0xa2, 0x6e, 0x6f) 147 if err != nil { 148 return 149 } 150 err = en.WriteInt(za0002.NumObjects) 151 if err != nil { 152 err = msgp.WrapError(err, "Tiers", za0001, "NumObjects") 153 return 154 } 155 } 156 return 157 } 158 159 // MarshalMsg implements msgp.Marshaler 160 func (z *allTierStats) MarshalMsg(b []byte) (o []byte, err error) { 161 o = msgp.Require(b, z.Msgsize()) 162 // map header, size 1 163 // string "ts" 164 o = append(o, 0x81, 0xa2, 0x74, 0x73) 165 o = msgp.AppendMapHeader(o, uint32(len(z.Tiers))) 166 for za0001, za0002 := range z.Tiers { 167 o = msgp.AppendString(o, za0001) 168 // map header, size 3 169 // string "ts" 170 o = append(o, 0x83, 0xa2, 0x74, 0x73) 171 o = msgp.AppendUint64(o, za0002.TotalSize) 172 // string "nv" 173 o = append(o, 0xa2, 0x6e, 0x76) 174 o = msgp.AppendInt(o, za0002.NumVersions) 175 // string "no" 176 o = append(o, 0xa2, 0x6e, 0x6f) 177 o = msgp.AppendInt(o, za0002.NumObjects) 178 } 179 return 180 } 181 182 // UnmarshalMsg implements msgp.Unmarshaler 183 func (z *allTierStats) UnmarshalMsg(bts []byte) (o []byte, err error) { 184 var field []byte 185 _ = field 186 var zb0001 uint32 187 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 188 if err != nil { 189 err = msgp.WrapError(err) 190 return 191 } 192 for zb0001 > 0 { 193 zb0001-- 194 field, bts, err = msgp.ReadMapKeyZC(bts) 195 if err != nil { 196 err = msgp.WrapError(err) 197 return 198 } 199 switch msgp.UnsafeString(field) { 200 case "ts": 201 var zb0002 uint32 202 zb0002, bts, err = msgp.ReadMapHeaderBytes(bts) 203 if err != nil { 204 err = msgp.WrapError(err, "Tiers") 205 return 206 } 207 if z.Tiers == nil { 208 z.Tiers = make(map[string]tierStats, zb0002) 209 } else if len(z.Tiers) > 0 { 210 for key := range z.Tiers { 211 delete(z.Tiers, key) 212 } 213 } 214 for zb0002 > 0 { 215 var za0001 string 216 var za0002 tierStats 217 zb0002-- 218 za0001, bts, err = msgp.ReadStringBytes(bts) 219 if err != nil { 220 err = msgp.WrapError(err, "Tiers") 221 return 222 } 223 var zb0003 uint32 224 zb0003, bts, err = msgp.ReadMapHeaderBytes(bts) 225 if err != nil { 226 err = msgp.WrapError(err, "Tiers", za0001) 227 return 228 } 229 for zb0003 > 0 { 230 zb0003-- 231 field, bts, err = msgp.ReadMapKeyZC(bts) 232 if err != nil { 233 err = msgp.WrapError(err, "Tiers", za0001) 234 return 235 } 236 switch msgp.UnsafeString(field) { 237 case "ts": 238 za0002.TotalSize, bts, err = msgp.ReadUint64Bytes(bts) 239 if err != nil { 240 err = msgp.WrapError(err, "Tiers", za0001, "TotalSize") 241 return 242 } 243 case "nv": 244 za0002.NumVersions, bts, err = msgp.ReadIntBytes(bts) 245 if err != nil { 246 err = msgp.WrapError(err, "Tiers", za0001, "NumVersions") 247 return 248 } 249 case "no": 250 za0002.NumObjects, bts, err = msgp.ReadIntBytes(bts) 251 if err != nil { 252 err = msgp.WrapError(err, "Tiers", za0001, "NumObjects") 253 return 254 } 255 default: 256 bts, err = msgp.Skip(bts) 257 if err != nil { 258 err = msgp.WrapError(err, "Tiers", za0001) 259 return 260 } 261 } 262 } 263 z.Tiers[za0001] = za0002 264 } 265 default: 266 bts, err = msgp.Skip(bts) 267 if err != nil { 268 err = msgp.WrapError(err) 269 return 270 } 271 } 272 } 273 o = bts 274 return 275 } 276 277 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 278 func (z *allTierStats) Msgsize() (s int) { 279 s = 1 + 3 + msgp.MapHeaderSize 280 if z.Tiers != nil { 281 for za0001, za0002 := range z.Tiers { 282 _ = za0002 283 s += msgp.StringPrefixSize + len(za0001) + 1 + 3 + msgp.Uint64Size + 3 + msgp.IntSize + 3 + msgp.IntSize 284 } 285 } 286 return 287 } 288 289 // MarshalMsg implements msgp.Marshaler 290 func (z *currentScannerCycle) MarshalMsg(b []byte) (o []byte, err error) { 291 o = msgp.Require(b, z.Msgsize()) 292 // map header, size 4 293 // string "current" 294 o = append(o, 0x84, 0xa7, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74) 295 o = msgp.AppendUint64(o, z.current) 296 // string "next" 297 o = append(o, 0xa4, 0x6e, 0x65, 0x78, 0x74) 298 o = msgp.AppendUint64(o, z.next) 299 // string "started" 300 o = append(o, 0xa7, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64) 301 o = msgp.AppendTime(o, z.started) 302 // string "cycleCompleted" 303 o = append(o, 0xae, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64) 304 o = msgp.AppendArrayHeader(o, uint32(len(z.cycleCompleted))) 305 for za0001 := range z.cycleCompleted { 306 o = msgp.AppendTime(o, z.cycleCompleted[za0001]) 307 } 308 return 309 } 310 311 // UnmarshalMsg implements msgp.Unmarshaler 312 func (z *currentScannerCycle) UnmarshalMsg(bts []byte) (o []byte, err error) { 313 var field []byte 314 _ = field 315 var zb0001 uint32 316 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 317 if err != nil { 318 err = msgp.WrapError(err) 319 return 320 } 321 for zb0001 > 0 { 322 zb0001-- 323 field, bts, err = msgp.ReadMapKeyZC(bts) 324 if err != nil { 325 err = msgp.WrapError(err) 326 return 327 } 328 switch msgp.UnsafeString(field) { 329 case "current": 330 z.current, bts, err = msgp.ReadUint64Bytes(bts) 331 if err != nil { 332 err = msgp.WrapError(err, "current") 333 return 334 } 335 case "next": 336 z.next, bts, err = msgp.ReadUint64Bytes(bts) 337 if err != nil { 338 err = msgp.WrapError(err, "next") 339 return 340 } 341 case "started": 342 z.started, bts, err = msgp.ReadTimeBytes(bts) 343 if err != nil { 344 err = msgp.WrapError(err, "started") 345 return 346 } 347 case "cycleCompleted": 348 var zb0002 uint32 349 zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) 350 if err != nil { 351 err = msgp.WrapError(err, "cycleCompleted") 352 return 353 } 354 if cap(z.cycleCompleted) >= int(zb0002) { 355 z.cycleCompleted = (z.cycleCompleted)[:zb0002] 356 } else { 357 z.cycleCompleted = make([]time.Time, zb0002) 358 } 359 for za0001 := range z.cycleCompleted { 360 z.cycleCompleted[za0001], bts, err = msgp.ReadTimeBytes(bts) 361 if err != nil { 362 err = msgp.WrapError(err, "cycleCompleted", za0001) 363 return 364 } 365 } 366 default: 367 bts, err = msgp.Skip(bts) 368 if err != nil { 369 err = msgp.WrapError(err) 370 return 371 } 372 } 373 } 374 o = bts 375 return 376 } 377 378 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 379 func (z *currentScannerCycle) Msgsize() (s int) { 380 s = 1 + 8 + msgp.Uint64Size + 5 + msgp.Uint64Size + 8 + msgp.TimeSize + 15 + msgp.ArrayHeaderSize + (len(z.cycleCompleted) * (msgp.TimeSize)) 381 return 382 } 383 384 // DecodeMsg implements msgp.Decodable 385 func (z *dataUsageCache) DecodeMsg(dc *msgp.Reader) (err error) { 386 var field []byte 387 _ = field 388 var zb0001 uint32 389 zb0001, err = dc.ReadMapHeader() 390 if err != nil { 391 err = msgp.WrapError(err) 392 return 393 } 394 for zb0001 > 0 { 395 zb0001-- 396 field, err = dc.ReadMapKeyPtr() 397 if err != nil { 398 err = msgp.WrapError(err) 399 return 400 } 401 switch msgp.UnsafeString(field) { 402 case "Info": 403 err = z.Info.DecodeMsg(dc) 404 if err != nil { 405 err = msgp.WrapError(err, "Info") 406 return 407 } 408 case "Cache": 409 var zb0002 uint32 410 zb0002, err = dc.ReadMapHeader() 411 if err != nil { 412 err = msgp.WrapError(err, "Cache") 413 return 414 } 415 if z.Cache == nil { 416 z.Cache = make(map[string]dataUsageEntry, zb0002) 417 } else if len(z.Cache) > 0 { 418 for key := range z.Cache { 419 delete(z.Cache, key) 420 } 421 } 422 for zb0002 > 0 { 423 zb0002-- 424 var za0001 string 425 var za0002 dataUsageEntry 426 za0001, err = dc.ReadString() 427 if err != nil { 428 err = msgp.WrapError(err, "Cache") 429 return 430 } 431 err = za0002.DecodeMsg(dc) 432 if err != nil { 433 err = msgp.WrapError(err, "Cache", za0001) 434 return 435 } 436 z.Cache[za0001] = za0002 437 } 438 default: 439 err = dc.Skip() 440 if err != nil { 441 err = msgp.WrapError(err) 442 return 443 } 444 } 445 } 446 return 447 } 448 449 // EncodeMsg implements msgp.Encodable 450 func (z *dataUsageCache) EncodeMsg(en *msgp.Writer) (err error) { 451 // map header, size 2 452 // write "Info" 453 err = en.Append(0x82, 0xa4, 0x49, 0x6e, 0x66, 0x6f) 454 if err != nil { 455 return 456 } 457 err = z.Info.EncodeMsg(en) 458 if err != nil { 459 err = msgp.WrapError(err, "Info") 460 return 461 } 462 // write "Cache" 463 err = en.Append(0xa5, 0x43, 0x61, 0x63, 0x68, 0x65) 464 if err != nil { 465 return 466 } 467 err = en.WriteMapHeader(uint32(len(z.Cache))) 468 if err != nil { 469 err = msgp.WrapError(err, "Cache") 470 return 471 } 472 for za0001, za0002 := range z.Cache { 473 err = en.WriteString(za0001) 474 if err != nil { 475 err = msgp.WrapError(err, "Cache") 476 return 477 } 478 err = za0002.EncodeMsg(en) 479 if err != nil { 480 err = msgp.WrapError(err, "Cache", za0001) 481 return 482 } 483 } 484 return 485 } 486 487 // MarshalMsg implements msgp.Marshaler 488 func (z *dataUsageCache) MarshalMsg(b []byte) (o []byte, err error) { 489 o = msgp.Require(b, z.Msgsize()) 490 // map header, size 2 491 // string "Info" 492 o = append(o, 0x82, 0xa4, 0x49, 0x6e, 0x66, 0x6f) 493 o, err = z.Info.MarshalMsg(o) 494 if err != nil { 495 err = msgp.WrapError(err, "Info") 496 return 497 } 498 // string "Cache" 499 o = append(o, 0xa5, 0x43, 0x61, 0x63, 0x68, 0x65) 500 o = msgp.AppendMapHeader(o, uint32(len(z.Cache))) 501 for za0001, za0002 := range z.Cache { 502 o = msgp.AppendString(o, za0001) 503 o, err = za0002.MarshalMsg(o) 504 if err != nil { 505 err = msgp.WrapError(err, "Cache", za0001) 506 return 507 } 508 } 509 return 510 } 511 512 // UnmarshalMsg implements msgp.Unmarshaler 513 func (z *dataUsageCache) UnmarshalMsg(bts []byte) (o []byte, err error) { 514 var field []byte 515 _ = field 516 var zb0001 uint32 517 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 518 if err != nil { 519 err = msgp.WrapError(err) 520 return 521 } 522 for zb0001 > 0 { 523 zb0001-- 524 field, bts, err = msgp.ReadMapKeyZC(bts) 525 if err != nil { 526 err = msgp.WrapError(err) 527 return 528 } 529 switch msgp.UnsafeString(field) { 530 case "Info": 531 bts, err = z.Info.UnmarshalMsg(bts) 532 if err != nil { 533 err = msgp.WrapError(err, "Info") 534 return 535 } 536 case "Cache": 537 var zb0002 uint32 538 zb0002, bts, err = msgp.ReadMapHeaderBytes(bts) 539 if err != nil { 540 err = msgp.WrapError(err, "Cache") 541 return 542 } 543 if z.Cache == nil { 544 z.Cache = make(map[string]dataUsageEntry, zb0002) 545 } else if len(z.Cache) > 0 { 546 for key := range z.Cache { 547 delete(z.Cache, key) 548 } 549 } 550 for zb0002 > 0 { 551 var za0001 string 552 var za0002 dataUsageEntry 553 zb0002-- 554 za0001, bts, err = msgp.ReadStringBytes(bts) 555 if err != nil { 556 err = msgp.WrapError(err, "Cache") 557 return 558 } 559 bts, err = za0002.UnmarshalMsg(bts) 560 if err != nil { 561 err = msgp.WrapError(err, "Cache", za0001) 562 return 563 } 564 z.Cache[za0001] = za0002 565 } 566 default: 567 bts, err = msgp.Skip(bts) 568 if err != nil { 569 err = msgp.WrapError(err) 570 return 571 } 572 } 573 } 574 o = bts 575 return 576 } 577 578 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 579 func (z *dataUsageCache) Msgsize() (s int) { 580 s = 1 + 5 + z.Info.Msgsize() + 6 + msgp.MapHeaderSize 581 if z.Cache != nil { 582 for za0001, za0002 := range z.Cache { 583 _ = za0002 584 s += msgp.StringPrefixSize + len(za0001) + za0002.Msgsize() 585 } 586 } 587 return 588 } 589 590 // DecodeMsg implements msgp.Decodable 591 func (z *dataUsageCacheInfo) DecodeMsg(dc *msgp.Reader) (err error) { 592 var field []byte 593 _ = field 594 var zb0001 uint32 595 zb0001, err = dc.ReadMapHeader() 596 if err != nil { 597 err = msgp.WrapError(err) 598 return 599 } 600 for zb0001 > 0 { 601 zb0001-- 602 field, err = dc.ReadMapKeyPtr() 603 if err != nil { 604 err = msgp.WrapError(err) 605 return 606 } 607 switch msgp.UnsafeString(field) { 608 case "Name": 609 z.Name, err = dc.ReadString() 610 if err != nil { 611 err = msgp.WrapError(err, "Name") 612 return 613 } 614 case "NextCycle": 615 z.NextCycle, err = dc.ReadUint32() 616 if err != nil { 617 err = msgp.WrapError(err, "NextCycle") 618 return 619 } 620 case "LastUpdate": 621 z.LastUpdate, err = dc.ReadTime() 622 if err != nil { 623 err = msgp.WrapError(err, "LastUpdate") 624 return 625 } 626 case "SkipHealing": 627 z.SkipHealing, err = dc.ReadBool() 628 if err != nil { 629 err = msgp.WrapError(err, "SkipHealing") 630 return 631 } 632 default: 633 err = dc.Skip() 634 if err != nil { 635 err = msgp.WrapError(err) 636 return 637 } 638 } 639 } 640 return 641 } 642 643 // EncodeMsg implements msgp.Encodable 644 func (z *dataUsageCacheInfo) EncodeMsg(en *msgp.Writer) (err error) { 645 // map header, size 4 646 // write "Name" 647 err = en.Append(0x84, 0xa4, 0x4e, 0x61, 0x6d, 0x65) 648 if err != nil { 649 return 650 } 651 err = en.WriteString(z.Name) 652 if err != nil { 653 err = msgp.WrapError(err, "Name") 654 return 655 } 656 // write "NextCycle" 657 err = en.Append(0xa9, 0x4e, 0x65, 0x78, 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65) 658 if err != nil { 659 return 660 } 661 err = en.WriteUint32(z.NextCycle) 662 if err != nil { 663 err = msgp.WrapError(err, "NextCycle") 664 return 665 } 666 // write "LastUpdate" 667 err = en.Append(0xaa, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65) 668 if err != nil { 669 return 670 } 671 err = en.WriteTime(z.LastUpdate) 672 if err != nil { 673 err = msgp.WrapError(err, "LastUpdate") 674 return 675 } 676 // write "SkipHealing" 677 err = en.Append(0xab, 0x53, 0x6b, 0x69, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x69, 0x6e, 0x67) 678 if err != nil { 679 return 680 } 681 err = en.WriteBool(z.SkipHealing) 682 if err != nil { 683 err = msgp.WrapError(err, "SkipHealing") 684 return 685 } 686 return 687 } 688 689 // MarshalMsg implements msgp.Marshaler 690 func (z *dataUsageCacheInfo) MarshalMsg(b []byte) (o []byte, err error) { 691 o = msgp.Require(b, z.Msgsize()) 692 // map header, size 4 693 // string "Name" 694 o = append(o, 0x84, 0xa4, 0x4e, 0x61, 0x6d, 0x65) 695 o = msgp.AppendString(o, z.Name) 696 // string "NextCycle" 697 o = append(o, 0xa9, 0x4e, 0x65, 0x78, 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65) 698 o = msgp.AppendUint32(o, z.NextCycle) 699 // string "LastUpdate" 700 o = append(o, 0xaa, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65) 701 o = msgp.AppendTime(o, z.LastUpdate) 702 // string "SkipHealing" 703 o = append(o, 0xab, 0x53, 0x6b, 0x69, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x69, 0x6e, 0x67) 704 o = msgp.AppendBool(o, z.SkipHealing) 705 return 706 } 707 708 // UnmarshalMsg implements msgp.Unmarshaler 709 func (z *dataUsageCacheInfo) UnmarshalMsg(bts []byte) (o []byte, err error) { 710 var field []byte 711 _ = field 712 var zb0001 uint32 713 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 714 if err != nil { 715 err = msgp.WrapError(err) 716 return 717 } 718 for zb0001 > 0 { 719 zb0001-- 720 field, bts, err = msgp.ReadMapKeyZC(bts) 721 if err != nil { 722 err = msgp.WrapError(err) 723 return 724 } 725 switch msgp.UnsafeString(field) { 726 case "Name": 727 z.Name, bts, err = msgp.ReadStringBytes(bts) 728 if err != nil { 729 err = msgp.WrapError(err, "Name") 730 return 731 } 732 case "NextCycle": 733 z.NextCycle, bts, err = msgp.ReadUint32Bytes(bts) 734 if err != nil { 735 err = msgp.WrapError(err, "NextCycle") 736 return 737 } 738 case "LastUpdate": 739 z.LastUpdate, bts, err = msgp.ReadTimeBytes(bts) 740 if err != nil { 741 err = msgp.WrapError(err, "LastUpdate") 742 return 743 } 744 case "SkipHealing": 745 z.SkipHealing, bts, err = msgp.ReadBoolBytes(bts) 746 if err != nil { 747 err = msgp.WrapError(err, "SkipHealing") 748 return 749 } 750 default: 751 bts, err = msgp.Skip(bts) 752 if err != nil { 753 err = msgp.WrapError(err) 754 return 755 } 756 } 757 } 758 o = bts 759 return 760 } 761 762 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 763 func (z *dataUsageCacheInfo) Msgsize() (s int) { 764 s = 1 + 5 + msgp.StringPrefixSize + len(z.Name) + 10 + msgp.Uint32Size + 11 + msgp.TimeSize + 12 + msgp.BoolSize 765 return 766 } 767 768 // DecodeMsg implements msgp.Decodable 769 func (z *dataUsageCacheV2) DecodeMsg(dc *msgp.Reader) (err error) { 770 var field []byte 771 _ = field 772 var zb0001 uint32 773 zb0001, err = dc.ReadMapHeader() 774 if err != nil { 775 err = msgp.WrapError(err) 776 return 777 } 778 for zb0001 > 0 { 779 zb0001-- 780 field, err = dc.ReadMapKeyPtr() 781 if err != nil { 782 err = msgp.WrapError(err) 783 return 784 } 785 switch msgp.UnsafeString(field) { 786 case "Info": 787 err = z.Info.DecodeMsg(dc) 788 if err != nil { 789 err = msgp.WrapError(err, "Info") 790 return 791 } 792 case "Cache": 793 var zb0002 uint32 794 zb0002, err = dc.ReadMapHeader() 795 if err != nil { 796 err = msgp.WrapError(err, "Cache") 797 return 798 } 799 if z.Cache == nil { 800 z.Cache = make(map[string]dataUsageEntryV2, zb0002) 801 } else if len(z.Cache) > 0 { 802 for key := range z.Cache { 803 delete(z.Cache, key) 804 } 805 } 806 for zb0002 > 0 { 807 zb0002-- 808 var za0001 string 809 var za0002 dataUsageEntryV2 810 za0001, err = dc.ReadString() 811 if err != nil { 812 err = msgp.WrapError(err, "Cache") 813 return 814 } 815 err = za0002.DecodeMsg(dc) 816 if err != nil { 817 err = msgp.WrapError(err, "Cache", za0001) 818 return 819 } 820 z.Cache[za0001] = za0002 821 } 822 default: 823 err = dc.Skip() 824 if err != nil { 825 err = msgp.WrapError(err) 826 return 827 } 828 } 829 } 830 return 831 } 832 833 // UnmarshalMsg implements msgp.Unmarshaler 834 func (z *dataUsageCacheV2) UnmarshalMsg(bts []byte) (o []byte, err error) { 835 var field []byte 836 _ = field 837 var zb0001 uint32 838 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 839 if err != nil { 840 err = msgp.WrapError(err) 841 return 842 } 843 for zb0001 > 0 { 844 zb0001-- 845 field, bts, err = msgp.ReadMapKeyZC(bts) 846 if err != nil { 847 err = msgp.WrapError(err) 848 return 849 } 850 switch msgp.UnsafeString(field) { 851 case "Info": 852 bts, err = z.Info.UnmarshalMsg(bts) 853 if err != nil { 854 err = msgp.WrapError(err, "Info") 855 return 856 } 857 case "Cache": 858 var zb0002 uint32 859 zb0002, bts, err = msgp.ReadMapHeaderBytes(bts) 860 if err != nil { 861 err = msgp.WrapError(err, "Cache") 862 return 863 } 864 if z.Cache == nil { 865 z.Cache = make(map[string]dataUsageEntryV2, zb0002) 866 } else if len(z.Cache) > 0 { 867 for key := range z.Cache { 868 delete(z.Cache, key) 869 } 870 } 871 for zb0002 > 0 { 872 var za0001 string 873 var za0002 dataUsageEntryV2 874 zb0002-- 875 za0001, bts, err = msgp.ReadStringBytes(bts) 876 if err != nil { 877 err = msgp.WrapError(err, "Cache") 878 return 879 } 880 bts, err = za0002.UnmarshalMsg(bts) 881 if err != nil { 882 err = msgp.WrapError(err, "Cache", za0001) 883 return 884 } 885 z.Cache[za0001] = za0002 886 } 887 default: 888 bts, err = msgp.Skip(bts) 889 if err != nil { 890 err = msgp.WrapError(err) 891 return 892 } 893 } 894 } 895 o = bts 896 return 897 } 898 899 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 900 func (z *dataUsageCacheV2) Msgsize() (s int) { 901 s = 1 + 5 + z.Info.Msgsize() + 6 + msgp.MapHeaderSize 902 if z.Cache != nil { 903 for za0001, za0002 := range z.Cache { 904 _ = za0002 905 s += msgp.StringPrefixSize + len(za0001) + za0002.Msgsize() 906 } 907 } 908 return 909 } 910 911 // DecodeMsg implements msgp.Decodable 912 func (z *dataUsageCacheV3) DecodeMsg(dc *msgp.Reader) (err error) { 913 var field []byte 914 _ = field 915 var zb0001 uint32 916 zb0001, err = dc.ReadMapHeader() 917 if err != nil { 918 err = msgp.WrapError(err) 919 return 920 } 921 for zb0001 > 0 { 922 zb0001-- 923 field, err = dc.ReadMapKeyPtr() 924 if err != nil { 925 err = msgp.WrapError(err) 926 return 927 } 928 switch msgp.UnsafeString(field) { 929 case "Info": 930 err = z.Info.DecodeMsg(dc) 931 if err != nil { 932 err = msgp.WrapError(err, "Info") 933 return 934 } 935 case "Cache": 936 var zb0002 uint32 937 zb0002, err = dc.ReadMapHeader() 938 if err != nil { 939 err = msgp.WrapError(err, "Cache") 940 return 941 } 942 if z.Cache == nil { 943 z.Cache = make(map[string]dataUsageEntryV3, zb0002) 944 } else if len(z.Cache) > 0 { 945 for key := range z.Cache { 946 delete(z.Cache, key) 947 } 948 } 949 for zb0002 > 0 { 950 zb0002-- 951 var za0001 string 952 var za0002 dataUsageEntryV3 953 za0001, err = dc.ReadString() 954 if err != nil { 955 err = msgp.WrapError(err, "Cache") 956 return 957 } 958 err = za0002.DecodeMsg(dc) 959 if err != nil { 960 err = msgp.WrapError(err, "Cache", za0001) 961 return 962 } 963 z.Cache[za0001] = za0002 964 } 965 default: 966 err = dc.Skip() 967 if err != nil { 968 err = msgp.WrapError(err) 969 return 970 } 971 } 972 } 973 return 974 } 975 976 // UnmarshalMsg implements msgp.Unmarshaler 977 func (z *dataUsageCacheV3) UnmarshalMsg(bts []byte) (o []byte, err error) { 978 var field []byte 979 _ = field 980 var zb0001 uint32 981 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 982 if err != nil { 983 err = msgp.WrapError(err) 984 return 985 } 986 for zb0001 > 0 { 987 zb0001-- 988 field, bts, err = msgp.ReadMapKeyZC(bts) 989 if err != nil { 990 err = msgp.WrapError(err) 991 return 992 } 993 switch msgp.UnsafeString(field) { 994 case "Info": 995 bts, err = z.Info.UnmarshalMsg(bts) 996 if err != nil { 997 err = msgp.WrapError(err, "Info") 998 return 999 } 1000 case "Cache": 1001 var zb0002 uint32 1002 zb0002, bts, err = msgp.ReadMapHeaderBytes(bts) 1003 if err != nil { 1004 err = msgp.WrapError(err, "Cache") 1005 return 1006 } 1007 if z.Cache == nil { 1008 z.Cache = make(map[string]dataUsageEntryV3, zb0002) 1009 } else if len(z.Cache) > 0 { 1010 for key := range z.Cache { 1011 delete(z.Cache, key) 1012 } 1013 } 1014 for zb0002 > 0 { 1015 var za0001 string 1016 var za0002 dataUsageEntryV3 1017 zb0002-- 1018 za0001, bts, err = msgp.ReadStringBytes(bts) 1019 if err != nil { 1020 err = msgp.WrapError(err, "Cache") 1021 return 1022 } 1023 bts, err = za0002.UnmarshalMsg(bts) 1024 if err != nil { 1025 err = msgp.WrapError(err, "Cache", za0001) 1026 return 1027 } 1028 z.Cache[za0001] = za0002 1029 } 1030 default: 1031 bts, err = msgp.Skip(bts) 1032 if err != nil { 1033 err = msgp.WrapError(err) 1034 return 1035 } 1036 } 1037 } 1038 o = bts 1039 return 1040 } 1041 1042 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 1043 func (z *dataUsageCacheV3) Msgsize() (s int) { 1044 s = 1 + 5 + z.Info.Msgsize() + 6 + msgp.MapHeaderSize 1045 if z.Cache != nil { 1046 for za0001, za0002 := range z.Cache { 1047 _ = za0002 1048 s += msgp.StringPrefixSize + len(za0001) + za0002.Msgsize() 1049 } 1050 } 1051 return 1052 } 1053 1054 // DecodeMsg implements msgp.Decodable 1055 func (z *dataUsageCacheV4) DecodeMsg(dc *msgp.Reader) (err error) { 1056 var field []byte 1057 _ = field 1058 var zb0001 uint32 1059 zb0001, err = dc.ReadMapHeader() 1060 if err != nil { 1061 err = msgp.WrapError(err) 1062 return 1063 } 1064 for zb0001 > 0 { 1065 zb0001-- 1066 field, err = dc.ReadMapKeyPtr() 1067 if err != nil { 1068 err = msgp.WrapError(err) 1069 return 1070 } 1071 switch msgp.UnsafeString(field) { 1072 case "Info": 1073 err = z.Info.DecodeMsg(dc) 1074 if err != nil { 1075 err = msgp.WrapError(err, "Info") 1076 return 1077 } 1078 case "Cache": 1079 var zb0002 uint32 1080 zb0002, err = dc.ReadMapHeader() 1081 if err != nil { 1082 err = msgp.WrapError(err, "Cache") 1083 return 1084 } 1085 if z.Cache == nil { 1086 z.Cache = make(map[string]dataUsageEntryV4, zb0002) 1087 } else if len(z.Cache) > 0 { 1088 for key := range z.Cache { 1089 delete(z.Cache, key) 1090 } 1091 } 1092 for zb0002 > 0 { 1093 zb0002-- 1094 var za0001 string 1095 var za0002 dataUsageEntryV4 1096 za0001, err = dc.ReadString() 1097 if err != nil { 1098 err = msgp.WrapError(err, "Cache") 1099 return 1100 } 1101 err = za0002.DecodeMsg(dc) 1102 if err != nil { 1103 err = msgp.WrapError(err, "Cache", za0001) 1104 return 1105 } 1106 z.Cache[za0001] = za0002 1107 } 1108 default: 1109 err = dc.Skip() 1110 if err != nil { 1111 err = msgp.WrapError(err) 1112 return 1113 } 1114 } 1115 } 1116 return 1117 } 1118 1119 // UnmarshalMsg implements msgp.Unmarshaler 1120 func (z *dataUsageCacheV4) UnmarshalMsg(bts []byte) (o []byte, err error) { 1121 var field []byte 1122 _ = field 1123 var zb0001 uint32 1124 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 1125 if err != nil { 1126 err = msgp.WrapError(err) 1127 return 1128 } 1129 for zb0001 > 0 { 1130 zb0001-- 1131 field, bts, err = msgp.ReadMapKeyZC(bts) 1132 if err != nil { 1133 err = msgp.WrapError(err) 1134 return 1135 } 1136 switch msgp.UnsafeString(field) { 1137 case "Info": 1138 bts, err = z.Info.UnmarshalMsg(bts) 1139 if err != nil { 1140 err = msgp.WrapError(err, "Info") 1141 return 1142 } 1143 case "Cache": 1144 var zb0002 uint32 1145 zb0002, bts, err = msgp.ReadMapHeaderBytes(bts) 1146 if err != nil { 1147 err = msgp.WrapError(err, "Cache") 1148 return 1149 } 1150 if z.Cache == nil { 1151 z.Cache = make(map[string]dataUsageEntryV4, zb0002) 1152 } else if len(z.Cache) > 0 { 1153 for key := range z.Cache { 1154 delete(z.Cache, key) 1155 } 1156 } 1157 for zb0002 > 0 { 1158 var za0001 string 1159 var za0002 dataUsageEntryV4 1160 zb0002-- 1161 za0001, bts, err = msgp.ReadStringBytes(bts) 1162 if err != nil { 1163 err = msgp.WrapError(err, "Cache") 1164 return 1165 } 1166 bts, err = za0002.UnmarshalMsg(bts) 1167 if err != nil { 1168 err = msgp.WrapError(err, "Cache", za0001) 1169 return 1170 } 1171 z.Cache[za0001] = za0002 1172 } 1173 default: 1174 bts, err = msgp.Skip(bts) 1175 if err != nil { 1176 err = msgp.WrapError(err) 1177 return 1178 } 1179 } 1180 } 1181 o = bts 1182 return 1183 } 1184 1185 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 1186 func (z *dataUsageCacheV4) Msgsize() (s int) { 1187 s = 1 + 5 + z.Info.Msgsize() + 6 + msgp.MapHeaderSize 1188 if z.Cache != nil { 1189 for za0001, za0002 := range z.Cache { 1190 _ = za0002 1191 s += msgp.StringPrefixSize + len(za0001) + za0002.Msgsize() 1192 } 1193 } 1194 return 1195 } 1196 1197 // DecodeMsg implements msgp.Decodable 1198 func (z *dataUsageCacheV5) DecodeMsg(dc *msgp.Reader) (err error) { 1199 var field []byte 1200 _ = field 1201 var zb0001 uint32 1202 zb0001, err = dc.ReadMapHeader() 1203 if err != nil { 1204 err = msgp.WrapError(err) 1205 return 1206 } 1207 for zb0001 > 0 { 1208 zb0001-- 1209 field, err = dc.ReadMapKeyPtr() 1210 if err != nil { 1211 err = msgp.WrapError(err) 1212 return 1213 } 1214 switch msgp.UnsafeString(field) { 1215 case "Info": 1216 err = z.Info.DecodeMsg(dc) 1217 if err != nil { 1218 err = msgp.WrapError(err, "Info") 1219 return 1220 } 1221 case "Cache": 1222 var zb0002 uint32 1223 zb0002, err = dc.ReadMapHeader() 1224 if err != nil { 1225 err = msgp.WrapError(err, "Cache") 1226 return 1227 } 1228 if z.Cache == nil { 1229 z.Cache = make(map[string]dataUsageEntryV5, zb0002) 1230 } else if len(z.Cache) > 0 { 1231 for key := range z.Cache { 1232 delete(z.Cache, key) 1233 } 1234 } 1235 for zb0002 > 0 { 1236 zb0002-- 1237 var za0001 string 1238 var za0002 dataUsageEntryV5 1239 za0001, err = dc.ReadString() 1240 if err != nil { 1241 err = msgp.WrapError(err, "Cache") 1242 return 1243 } 1244 err = za0002.DecodeMsg(dc) 1245 if err != nil { 1246 err = msgp.WrapError(err, "Cache", za0001) 1247 return 1248 } 1249 z.Cache[za0001] = za0002 1250 } 1251 default: 1252 err = dc.Skip() 1253 if err != nil { 1254 err = msgp.WrapError(err) 1255 return 1256 } 1257 } 1258 } 1259 return 1260 } 1261 1262 // UnmarshalMsg implements msgp.Unmarshaler 1263 func (z *dataUsageCacheV5) UnmarshalMsg(bts []byte) (o []byte, err error) { 1264 var field []byte 1265 _ = field 1266 var zb0001 uint32 1267 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 1268 if err != nil { 1269 err = msgp.WrapError(err) 1270 return 1271 } 1272 for zb0001 > 0 { 1273 zb0001-- 1274 field, bts, err = msgp.ReadMapKeyZC(bts) 1275 if err != nil { 1276 err = msgp.WrapError(err) 1277 return 1278 } 1279 switch msgp.UnsafeString(field) { 1280 case "Info": 1281 bts, err = z.Info.UnmarshalMsg(bts) 1282 if err != nil { 1283 err = msgp.WrapError(err, "Info") 1284 return 1285 } 1286 case "Cache": 1287 var zb0002 uint32 1288 zb0002, bts, err = msgp.ReadMapHeaderBytes(bts) 1289 if err != nil { 1290 err = msgp.WrapError(err, "Cache") 1291 return 1292 } 1293 if z.Cache == nil { 1294 z.Cache = make(map[string]dataUsageEntryV5, zb0002) 1295 } else if len(z.Cache) > 0 { 1296 for key := range z.Cache { 1297 delete(z.Cache, key) 1298 } 1299 } 1300 for zb0002 > 0 { 1301 var za0001 string 1302 var za0002 dataUsageEntryV5 1303 zb0002-- 1304 za0001, bts, err = msgp.ReadStringBytes(bts) 1305 if err != nil { 1306 err = msgp.WrapError(err, "Cache") 1307 return 1308 } 1309 bts, err = za0002.UnmarshalMsg(bts) 1310 if err != nil { 1311 err = msgp.WrapError(err, "Cache", za0001) 1312 return 1313 } 1314 z.Cache[za0001] = za0002 1315 } 1316 default: 1317 bts, err = msgp.Skip(bts) 1318 if err != nil { 1319 err = msgp.WrapError(err) 1320 return 1321 } 1322 } 1323 } 1324 o = bts 1325 return 1326 } 1327 1328 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 1329 func (z *dataUsageCacheV5) Msgsize() (s int) { 1330 s = 1 + 5 + z.Info.Msgsize() + 6 + msgp.MapHeaderSize 1331 if z.Cache != nil { 1332 for za0001, za0002 := range z.Cache { 1333 _ = za0002 1334 s += msgp.StringPrefixSize + len(za0001) + za0002.Msgsize() 1335 } 1336 } 1337 return 1338 } 1339 1340 // DecodeMsg implements msgp.Decodable 1341 func (z *dataUsageCacheV6) DecodeMsg(dc *msgp.Reader) (err error) { 1342 var field []byte 1343 _ = field 1344 var zb0001 uint32 1345 zb0001, err = dc.ReadMapHeader() 1346 if err != nil { 1347 err = msgp.WrapError(err) 1348 return 1349 } 1350 for zb0001 > 0 { 1351 zb0001-- 1352 field, err = dc.ReadMapKeyPtr() 1353 if err != nil { 1354 err = msgp.WrapError(err) 1355 return 1356 } 1357 switch msgp.UnsafeString(field) { 1358 case "Info": 1359 err = z.Info.DecodeMsg(dc) 1360 if err != nil { 1361 err = msgp.WrapError(err, "Info") 1362 return 1363 } 1364 case "Cache": 1365 var zb0002 uint32 1366 zb0002, err = dc.ReadMapHeader() 1367 if err != nil { 1368 err = msgp.WrapError(err, "Cache") 1369 return 1370 } 1371 if z.Cache == nil { 1372 z.Cache = make(map[string]dataUsageEntryV6, zb0002) 1373 } else if len(z.Cache) > 0 { 1374 for key := range z.Cache { 1375 delete(z.Cache, key) 1376 } 1377 } 1378 for zb0002 > 0 { 1379 zb0002-- 1380 var za0001 string 1381 var za0002 dataUsageEntryV6 1382 za0001, err = dc.ReadString() 1383 if err != nil { 1384 err = msgp.WrapError(err, "Cache") 1385 return 1386 } 1387 err = za0002.DecodeMsg(dc) 1388 if err != nil { 1389 err = msgp.WrapError(err, "Cache", za0001) 1390 return 1391 } 1392 z.Cache[za0001] = za0002 1393 } 1394 default: 1395 err = dc.Skip() 1396 if err != nil { 1397 err = msgp.WrapError(err) 1398 return 1399 } 1400 } 1401 } 1402 return 1403 } 1404 1405 // UnmarshalMsg implements msgp.Unmarshaler 1406 func (z *dataUsageCacheV6) UnmarshalMsg(bts []byte) (o []byte, err error) { 1407 var field []byte 1408 _ = field 1409 var zb0001 uint32 1410 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 1411 if err != nil { 1412 err = msgp.WrapError(err) 1413 return 1414 } 1415 for zb0001 > 0 { 1416 zb0001-- 1417 field, bts, err = msgp.ReadMapKeyZC(bts) 1418 if err != nil { 1419 err = msgp.WrapError(err) 1420 return 1421 } 1422 switch msgp.UnsafeString(field) { 1423 case "Info": 1424 bts, err = z.Info.UnmarshalMsg(bts) 1425 if err != nil { 1426 err = msgp.WrapError(err, "Info") 1427 return 1428 } 1429 case "Cache": 1430 var zb0002 uint32 1431 zb0002, bts, err = msgp.ReadMapHeaderBytes(bts) 1432 if err != nil { 1433 err = msgp.WrapError(err, "Cache") 1434 return 1435 } 1436 if z.Cache == nil { 1437 z.Cache = make(map[string]dataUsageEntryV6, zb0002) 1438 } else if len(z.Cache) > 0 { 1439 for key := range z.Cache { 1440 delete(z.Cache, key) 1441 } 1442 } 1443 for zb0002 > 0 { 1444 var za0001 string 1445 var za0002 dataUsageEntryV6 1446 zb0002-- 1447 za0001, bts, err = msgp.ReadStringBytes(bts) 1448 if err != nil { 1449 err = msgp.WrapError(err, "Cache") 1450 return 1451 } 1452 bts, err = za0002.UnmarshalMsg(bts) 1453 if err != nil { 1454 err = msgp.WrapError(err, "Cache", za0001) 1455 return 1456 } 1457 z.Cache[za0001] = za0002 1458 } 1459 default: 1460 bts, err = msgp.Skip(bts) 1461 if err != nil { 1462 err = msgp.WrapError(err) 1463 return 1464 } 1465 } 1466 } 1467 o = bts 1468 return 1469 } 1470 1471 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 1472 func (z *dataUsageCacheV6) Msgsize() (s int) { 1473 s = 1 + 5 + z.Info.Msgsize() + 6 + msgp.MapHeaderSize 1474 if z.Cache != nil { 1475 for za0001, za0002 := range z.Cache { 1476 _ = za0002 1477 s += msgp.StringPrefixSize + len(za0001) + za0002.Msgsize() 1478 } 1479 } 1480 return 1481 } 1482 1483 // DecodeMsg implements msgp.Decodable 1484 func (z *dataUsageCacheV7) DecodeMsg(dc *msgp.Reader) (err error) { 1485 var field []byte 1486 _ = field 1487 var zb0001 uint32 1488 zb0001, err = dc.ReadMapHeader() 1489 if err != nil { 1490 err = msgp.WrapError(err) 1491 return 1492 } 1493 for zb0001 > 0 { 1494 zb0001-- 1495 field, err = dc.ReadMapKeyPtr() 1496 if err != nil { 1497 err = msgp.WrapError(err) 1498 return 1499 } 1500 switch msgp.UnsafeString(field) { 1501 case "Info": 1502 err = z.Info.DecodeMsg(dc) 1503 if err != nil { 1504 err = msgp.WrapError(err, "Info") 1505 return 1506 } 1507 case "Cache": 1508 var zb0002 uint32 1509 zb0002, err = dc.ReadMapHeader() 1510 if err != nil { 1511 err = msgp.WrapError(err, "Cache") 1512 return 1513 } 1514 if z.Cache == nil { 1515 z.Cache = make(map[string]dataUsageEntryV7, zb0002) 1516 } else if len(z.Cache) > 0 { 1517 for key := range z.Cache { 1518 delete(z.Cache, key) 1519 } 1520 } 1521 for zb0002 > 0 { 1522 zb0002-- 1523 var za0001 string 1524 var za0002 dataUsageEntryV7 1525 za0001, err = dc.ReadString() 1526 if err != nil { 1527 err = msgp.WrapError(err, "Cache") 1528 return 1529 } 1530 err = za0002.DecodeMsg(dc) 1531 if err != nil { 1532 err = msgp.WrapError(err, "Cache", za0001) 1533 return 1534 } 1535 z.Cache[za0001] = za0002 1536 } 1537 default: 1538 err = dc.Skip() 1539 if err != nil { 1540 err = msgp.WrapError(err) 1541 return 1542 } 1543 } 1544 } 1545 return 1546 } 1547 1548 // UnmarshalMsg implements msgp.Unmarshaler 1549 func (z *dataUsageCacheV7) UnmarshalMsg(bts []byte) (o []byte, err error) { 1550 var field []byte 1551 _ = field 1552 var zb0001 uint32 1553 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 1554 if err != nil { 1555 err = msgp.WrapError(err) 1556 return 1557 } 1558 for zb0001 > 0 { 1559 zb0001-- 1560 field, bts, err = msgp.ReadMapKeyZC(bts) 1561 if err != nil { 1562 err = msgp.WrapError(err) 1563 return 1564 } 1565 switch msgp.UnsafeString(field) { 1566 case "Info": 1567 bts, err = z.Info.UnmarshalMsg(bts) 1568 if err != nil { 1569 err = msgp.WrapError(err, "Info") 1570 return 1571 } 1572 case "Cache": 1573 var zb0002 uint32 1574 zb0002, bts, err = msgp.ReadMapHeaderBytes(bts) 1575 if err != nil { 1576 err = msgp.WrapError(err, "Cache") 1577 return 1578 } 1579 if z.Cache == nil { 1580 z.Cache = make(map[string]dataUsageEntryV7, zb0002) 1581 } else if len(z.Cache) > 0 { 1582 for key := range z.Cache { 1583 delete(z.Cache, key) 1584 } 1585 } 1586 for zb0002 > 0 { 1587 var za0001 string 1588 var za0002 dataUsageEntryV7 1589 zb0002-- 1590 za0001, bts, err = msgp.ReadStringBytes(bts) 1591 if err != nil { 1592 err = msgp.WrapError(err, "Cache") 1593 return 1594 } 1595 bts, err = za0002.UnmarshalMsg(bts) 1596 if err != nil { 1597 err = msgp.WrapError(err, "Cache", za0001) 1598 return 1599 } 1600 z.Cache[za0001] = za0002 1601 } 1602 default: 1603 bts, err = msgp.Skip(bts) 1604 if err != nil { 1605 err = msgp.WrapError(err) 1606 return 1607 } 1608 } 1609 } 1610 o = bts 1611 return 1612 } 1613 1614 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 1615 func (z *dataUsageCacheV7) Msgsize() (s int) { 1616 s = 1 + 5 + z.Info.Msgsize() + 6 + msgp.MapHeaderSize 1617 if z.Cache != nil { 1618 for za0001, za0002 := range z.Cache { 1619 _ = za0002 1620 s += msgp.StringPrefixSize + len(za0001) + za0002.Msgsize() 1621 } 1622 } 1623 return 1624 } 1625 1626 // DecodeMsg implements msgp.Decodable 1627 func (z *dataUsageEntry) DecodeMsg(dc *msgp.Reader) (err error) { 1628 var field []byte 1629 _ = field 1630 var zb0001 uint32 1631 zb0001, err = dc.ReadMapHeader() 1632 if err != nil { 1633 err = msgp.WrapError(err) 1634 return 1635 } 1636 for zb0001 > 0 { 1637 zb0001-- 1638 field, err = dc.ReadMapKeyPtr() 1639 if err != nil { 1640 err = msgp.WrapError(err) 1641 return 1642 } 1643 switch msgp.UnsafeString(field) { 1644 case "ch": 1645 err = z.Children.DecodeMsg(dc) 1646 if err != nil { 1647 err = msgp.WrapError(err, "Children") 1648 return 1649 } 1650 case "sz": 1651 z.Size, err = dc.ReadInt64() 1652 if err != nil { 1653 err = msgp.WrapError(err, "Size") 1654 return 1655 } 1656 case "os": 1657 z.Objects, err = dc.ReadUint64() 1658 if err != nil { 1659 err = msgp.WrapError(err, "Objects") 1660 return 1661 } 1662 case "vs": 1663 z.Versions, err = dc.ReadUint64() 1664 if err != nil { 1665 err = msgp.WrapError(err, "Versions") 1666 return 1667 } 1668 case "dms": 1669 z.DeleteMarkers, err = dc.ReadUint64() 1670 if err != nil { 1671 err = msgp.WrapError(err, "DeleteMarkers") 1672 return 1673 } 1674 case "szs": 1675 var zb0002 uint32 1676 zb0002, err = dc.ReadArrayHeader() 1677 if err != nil { 1678 err = msgp.WrapError(err, "ObjSizes") 1679 return 1680 } 1681 if zb0002 != uint32(dataUsageBucketLen) { 1682 err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002} 1683 return 1684 } 1685 for za0001 := range z.ObjSizes { 1686 z.ObjSizes[za0001], err = dc.ReadUint64() 1687 if err != nil { 1688 err = msgp.WrapError(err, "ObjSizes", za0001) 1689 return 1690 } 1691 } 1692 case "vh": 1693 var zb0003 uint32 1694 zb0003, err = dc.ReadArrayHeader() 1695 if err != nil { 1696 err = msgp.WrapError(err, "ObjVersions") 1697 return 1698 } 1699 if zb0003 != uint32(dataUsageVersionLen) { 1700 err = msgp.ArrayError{Wanted: uint32(dataUsageVersionLen), Got: zb0003} 1701 return 1702 } 1703 for za0002 := range z.ObjVersions { 1704 z.ObjVersions[za0002], err = dc.ReadUint64() 1705 if err != nil { 1706 err = msgp.WrapError(err, "ObjVersions", za0002) 1707 return 1708 } 1709 } 1710 case "rs": 1711 if dc.IsNil() { 1712 err = dc.ReadNil() 1713 if err != nil { 1714 err = msgp.WrapError(err, "ReplicationStats") 1715 return 1716 } 1717 z.ReplicationStats = nil 1718 } else { 1719 if z.ReplicationStats == nil { 1720 z.ReplicationStats = new(replicationAllStats) 1721 } 1722 err = z.ReplicationStats.DecodeMsg(dc) 1723 if err != nil { 1724 err = msgp.WrapError(err, "ReplicationStats") 1725 return 1726 } 1727 } 1728 case "ats": 1729 if dc.IsNil() { 1730 err = dc.ReadNil() 1731 if err != nil { 1732 err = msgp.WrapError(err, "AllTierStats") 1733 return 1734 } 1735 z.AllTierStats = nil 1736 } else { 1737 if z.AllTierStats == nil { 1738 z.AllTierStats = new(allTierStats) 1739 } 1740 err = z.AllTierStats.DecodeMsg(dc) 1741 if err != nil { 1742 err = msgp.WrapError(err, "AllTierStats") 1743 return 1744 } 1745 } 1746 case "c": 1747 z.Compacted, err = dc.ReadBool() 1748 if err != nil { 1749 err = msgp.WrapError(err, "Compacted") 1750 return 1751 } 1752 default: 1753 err = dc.Skip() 1754 if err != nil { 1755 err = msgp.WrapError(err) 1756 return 1757 } 1758 } 1759 } 1760 return 1761 } 1762 1763 // EncodeMsg implements msgp.Encodable 1764 func (z *dataUsageEntry) EncodeMsg(en *msgp.Writer) (err error) { 1765 // check for omitted fields 1766 zb0001Len := uint32(10) 1767 var zb0001Mask uint16 /* 10 bits */ 1768 _ = zb0001Mask 1769 if z.ReplicationStats == nil { 1770 zb0001Len-- 1771 zb0001Mask |= 0x80 1772 } 1773 if z.AllTierStats == nil { 1774 zb0001Len-- 1775 zb0001Mask |= 0x100 1776 } 1777 // variable map header, size zb0001Len 1778 err = en.Append(0x80 | uint8(zb0001Len)) 1779 if err != nil { 1780 return 1781 } 1782 if zb0001Len == 0 { 1783 return 1784 } 1785 // write "ch" 1786 err = en.Append(0xa2, 0x63, 0x68) 1787 if err != nil { 1788 return 1789 } 1790 err = z.Children.EncodeMsg(en) 1791 if err != nil { 1792 err = msgp.WrapError(err, "Children") 1793 return 1794 } 1795 // write "sz" 1796 err = en.Append(0xa2, 0x73, 0x7a) 1797 if err != nil { 1798 return 1799 } 1800 err = en.WriteInt64(z.Size) 1801 if err != nil { 1802 err = msgp.WrapError(err, "Size") 1803 return 1804 } 1805 // write "os" 1806 err = en.Append(0xa2, 0x6f, 0x73) 1807 if err != nil { 1808 return 1809 } 1810 err = en.WriteUint64(z.Objects) 1811 if err != nil { 1812 err = msgp.WrapError(err, "Objects") 1813 return 1814 } 1815 // write "vs" 1816 err = en.Append(0xa2, 0x76, 0x73) 1817 if err != nil { 1818 return 1819 } 1820 err = en.WriteUint64(z.Versions) 1821 if err != nil { 1822 err = msgp.WrapError(err, "Versions") 1823 return 1824 } 1825 // write "dms" 1826 err = en.Append(0xa3, 0x64, 0x6d, 0x73) 1827 if err != nil { 1828 return 1829 } 1830 err = en.WriteUint64(z.DeleteMarkers) 1831 if err != nil { 1832 err = msgp.WrapError(err, "DeleteMarkers") 1833 return 1834 } 1835 // write "szs" 1836 err = en.Append(0xa3, 0x73, 0x7a, 0x73) 1837 if err != nil { 1838 return 1839 } 1840 err = en.WriteArrayHeader(uint32(dataUsageBucketLen)) 1841 if err != nil { 1842 err = msgp.WrapError(err, "ObjSizes") 1843 return 1844 } 1845 for za0001 := range z.ObjSizes { 1846 err = en.WriteUint64(z.ObjSizes[za0001]) 1847 if err != nil { 1848 err = msgp.WrapError(err, "ObjSizes", za0001) 1849 return 1850 } 1851 } 1852 // write "vh" 1853 err = en.Append(0xa2, 0x76, 0x68) 1854 if err != nil { 1855 return 1856 } 1857 err = en.WriteArrayHeader(uint32(dataUsageVersionLen)) 1858 if err != nil { 1859 err = msgp.WrapError(err, "ObjVersions") 1860 return 1861 } 1862 for za0002 := range z.ObjVersions { 1863 err = en.WriteUint64(z.ObjVersions[za0002]) 1864 if err != nil { 1865 err = msgp.WrapError(err, "ObjVersions", za0002) 1866 return 1867 } 1868 } 1869 if (zb0001Mask & 0x80) == 0 { // if not omitted 1870 // write "rs" 1871 err = en.Append(0xa2, 0x72, 0x73) 1872 if err != nil { 1873 return 1874 } 1875 if z.ReplicationStats == nil { 1876 err = en.WriteNil() 1877 if err != nil { 1878 return 1879 } 1880 } else { 1881 err = z.ReplicationStats.EncodeMsg(en) 1882 if err != nil { 1883 err = msgp.WrapError(err, "ReplicationStats") 1884 return 1885 } 1886 } 1887 } 1888 if (zb0001Mask & 0x100) == 0 { // if not omitted 1889 // write "ats" 1890 err = en.Append(0xa3, 0x61, 0x74, 0x73) 1891 if err != nil { 1892 return 1893 } 1894 if z.AllTierStats == nil { 1895 err = en.WriteNil() 1896 if err != nil { 1897 return 1898 } 1899 } else { 1900 err = z.AllTierStats.EncodeMsg(en) 1901 if err != nil { 1902 err = msgp.WrapError(err, "AllTierStats") 1903 return 1904 } 1905 } 1906 } 1907 // write "c" 1908 err = en.Append(0xa1, 0x63) 1909 if err != nil { 1910 return 1911 } 1912 err = en.WriteBool(z.Compacted) 1913 if err != nil { 1914 err = msgp.WrapError(err, "Compacted") 1915 return 1916 } 1917 return 1918 } 1919 1920 // MarshalMsg implements msgp.Marshaler 1921 func (z *dataUsageEntry) MarshalMsg(b []byte) (o []byte, err error) { 1922 o = msgp.Require(b, z.Msgsize()) 1923 // check for omitted fields 1924 zb0001Len := uint32(10) 1925 var zb0001Mask uint16 /* 10 bits */ 1926 _ = zb0001Mask 1927 if z.ReplicationStats == nil { 1928 zb0001Len-- 1929 zb0001Mask |= 0x80 1930 } 1931 if z.AllTierStats == nil { 1932 zb0001Len-- 1933 zb0001Mask |= 0x100 1934 } 1935 // variable map header, size zb0001Len 1936 o = append(o, 0x80|uint8(zb0001Len)) 1937 if zb0001Len == 0 { 1938 return 1939 } 1940 // string "ch" 1941 o = append(o, 0xa2, 0x63, 0x68) 1942 o, err = z.Children.MarshalMsg(o) 1943 if err != nil { 1944 err = msgp.WrapError(err, "Children") 1945 return 1946 } 1947 // string "sz" 1948 o = append(o, 0xa2, 0x73, 0x7a) 1949 o = msgp.AppendInt64(o, z.Size) 1950 // string "os" 1951 o = append(o, 0xa2, 0x6f, 0x73) 1952 o = msgp.AppendUint64(o, z.Objects) 1953 // string "vs" 1954 o = append(o, 0xa2, 0x76, 0x73) 1955 o = msgp.AppendUint64(o, z.Versions) 1956 // string "dms" 1957 o = append(o, 0xa3, 0x64, 0x6d, 0x73) 1958 o = msgp.AppendUint64(o, z.DeleteMarkers) 1959 // string "szs" 1960 o = append(o, 0xa3, 0x73, 0x7a, 0x73) 1961 o = msgp.AppendArrayHeader(o, uint32(dataUsageBucketLen)) 1962 for za0001 := range z.ObjSizes { 1963 o = msgp.AppendUint64(o, z.ObjSizes[za0001]) 1964 } 1965 // string "vh" 1966 o = append(o, 0xa2, 0x76, 0x68) 1967 o = msgp.AppendArrayHeader(o, uint32(dataUsageVersionLen)) 1968 for za0002 := range z.ObjVersions { 1969 o = msgp.AppendUint64(o, z.ObjVersions[za0002]) 1970 } 1971 if (zb0001Mask & 0x80) == 0 { // if not omitted 1972 // string "rs" 1973 o = append(o, 0xa2, 0x72, 0x73) 1974 if z.ReplicationStats == nil { 1975 o = msgp.AppendNil(o) 1976 } else { 1977 o, err = z.ReplicationStats.MarshalMsg(o) 1978 if err != nil { 1979 err = msgp.WrapError(err, "ReplicationStats") 1980 return 1981 } 1982 } 1983 } 1984 if (zb0001Mask & 0x100) == 0 { // if not omitted 1985 // string "ats" 1986 o = append(o, 0xa3, 0x61, 0x74, 0x73) 1987 if z.AllTierStats == nil { 1988 o = msgp.AppendNil(o) 1989 } else { 1990 o, err = z.AllTierStats.MarshalMsg(o) 1991 if err != nil { 1992 err = msgp.WrapError(err, "AllTierStats") 1993 return 1994 } 1995 } 1996 } 1997 // string "c" 1998 o = append(o, 0xa1, 0x63) 1999 o = msgp.AppendBool(o, z.Compacted) 2000 return 2001 } 2002 2003 // UnmarshalMsg implements msgp.Unmarshaler 2004 func (z *dataUsageEntry) UnmarshalMsg(bts []byte) (o []byte, err error) { 2005 var field []byte 2006 _ = field 2007 var zb0001 uint32 2008 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 2009 if err != nil { 2010 err = msgp.WrapError(err) 2011 return 2012 } 2013 for zb0001 > 0 { 2014 zb0001-- 2015 field, bts, err = msgp.ReadMapKeyZC(bts) 2016 if err != nil { 2017 err = msgp.WrapError(err) 2018 return 2019 } 2020 switch msgp.UnsafeString(field) { 2021 case "ch": 2022 bts, err = z.Children.UnmarshalMsg(bts) 2023 if err != nil { 2024 err = msgp.WrapError(err, "Children") 2025 return 2026 } 2027 case "sz": 2028 z.Size, bts, err = msgp.ReadInt64Bytes(bts) 2029 if err != nil { 2030 err = msgp.WrapError(err, "Size") 2031 return 2032 } 2033 case "os": 2034 z.Objects, bts, err = msgp.ReadUint64Bytes(bts) 2035 if err != nil { 2036 err = msgp.WrapError(err, "Objects") 2037 return 2038 } 2039 case "vs": 2040 z.Versions, bts, err = msgp.ReadUint64Bytes(bts) 2041 if err != nil { 2042 err = msgp.WrapError(err, "Versions") 2043 return 2044 } 2045 case "dms": 2046 z.DeleteMarkers, bts, err = msgp.ReadUint64Bytes(bts) 2047 if err != nil { 2048 err = msgp.WrapError(err, "DeleteMarkers") 2049 return 2050 } 2051 case "szs": 2052 var zb0002 uint32 2053 zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) 2054 if err != nil { 2055 err = msgp.WrapError(err, "ObjSizes") 2056 return 2057 } 2058 if zb0002 != uint32(dataUsageBucketLen) { 2059 err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002} 2060 return 2061 } 2062 for za0001 := range z.ObjSizes { 2063 z.ObjSizes[za0001], bts, err = msgp.ReadUint64Bytes(bts) 2064 if err != nil { 2065 err = msgp.WrapError(err, "ObjSizes", za0001) 2066 return 2067 } 2068 } 2069 case "vh": 2070 var zb0003 uint32 2071 zb0003, bts, err = msgp.ReadArrayHeaderBytes(bts) 2072 if err != nil { 2073 err = msgp.WrapError(err, "ObjVersions") 2074 return 2075 } 2076 if zb0003 != uint32(dataUsageVersionLen) { 2077 err = msgp.ArrayError{Wanted: uint32(dataUsageVersionLen), Got: zb0003} 2078 return 2079 } 2080 for za0002 := range z.ObjVersions { 2081 z.ObjVersions[za0002], bts, err = msgp.ReadUint64Bytes(bts) 2082 if err != nil { 2083 err = msgp.WrapError(err, "ObjVersions", za0002) 2084 return 2085 } 2086 } 2087 case "rs": 2088 if msgp.IsNil(bts) { 2089 bts, err = msgp.ReadNilBytes(bts) 2090 if err != nil { 2091 return 2092 } 2093 z.ReplicationStats = nil 2094 } else { 2095 if z.ReplicationStats == nil { 2096 z.ReplicationStats = new(replicationAllStats) 2097 } 2098 bts, err = z.ReplicationStats.UnmarshalMsg(bts) 2099 if err != nil { 2100 err = msgp.WrapError(err, "ReplicationStats") 2101 return 2102 } 2103 } 2104 case "ats": 2105 if msgp.IsNil(bts) { 2106 bts, err = msgp.ReadNilBytes(bts) 2107 if err != nil { 2108 return 2109 } 2110 z.AllTierStats = nil 2111 } else { 2112 if z.AllTierStats == nil { 2113 z.AllTierStats = new(allTierStats) 2114 } 2115 bts, err = z.AllTierStats.UnmarshalMsg(bts) 2116 if err != nil { 2117 err = msgp.WrapError(err, "AllTierStats") 2118 return 2119 } 2120 } 2121 case "c": 2122 z.Compacted, bts, err = msgp.ReadBoolBytes(bts) 2123 if err != nil { 2124 err = msgp.WrapError(err, "Compacted") 2125 return 2126 } 2127 default: 2128 bts, err = msgp.Skip(bts) 2129 if err != nil { 2130 err = msgp.WrapError(err) 2131 return 2132 } 2133 } 2134 } 2135 o = bts 2136 return 2137 } 2138 2139 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 2140 func (z *dataUsageEntry) Msgsize() (s int) { 2141 s = 1 + 3 + z.Children.Msgsize() + 3 + msgp.Int64Size + 3 + msgp.Uint64Size + 3 + msgp.Uint64Size + 4 + msgp.Uint64Size + 4 + msgp.ArrayHeaderSize + (dataUsageBucketLen * (msgp.Uint64Size)) + 3 + msgp.ArrayHeaderSize + (dataUsageVersionLen * (msgp.Uint64Size)) + 3 2142 if z.ReplicationStats == nil { 2143 s += msgp.NilSize 2144 } else { 2145 s += z.ReplicationStats.Msgsize() 2146 } 2147 s += 4 2148 if z.AllTierStats == nil { 2149 s += msgp.NilSize 2150 } else { 2151 s += z.AllTierStats.Msgsize() 2152 } 2153 s += 2 + msgp.BoolSize 2154 return 2155 } 2156 2157 // DecodeMsg implements msgp.Decodable 2158 func (z *dataUsageEntryV2) DecodeMsg(dc *msgp.Reader) (err error) { 2159 var zb0001 uint32 2160 zb0001, err = dc.ReadArrayHeader() 2161 if err != nil { 2162 err = msgp.WrapError(err) 2163 return 2164 } 2165 if zb0001 != 4 { 2166 err = msgp.ArrayError{Wanted: 4, Got: zb0001} 2167 return 2168 } 2169 z.Size, err = dc.ReadInt64() 2170 if err != nil { 2171 err = msgp.WrapError(err, "Size") 2172 return 2173 } 2174 z.Objects, err = dc.ReadUint64() 2175 if err != nil { 2176 err = msgp.WrapError(err, "Objects") 2177 return 2178 } 2179 var zb0002 uint32 2180 zb0002, err = dc.ReadArrayHeader() 2181 if err != nil { 2182 err = msgp.WrapError(err, "ObjSizes") 2183 return 2184 } 2185 if zb0002 != uint32(dataUsageBucketLen) { 2186 err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002} 2187 return 2188 } 2189 for za0001 := range z.ObjSizes { 2190 z.ObjSizes[za0001], err = dc.ReadUint64() 2191 if err != nil { 2192 err = msgp.WrapError(err, "ObjSizes", za0001) 2193 return 2194 } 2195 } 2196 err = z.Children.DecodeMsg(dc) 2197 if err != nil { 2198 err = msgp.WrapError(err, "Children") 2199 return 2200 } 2201 return 2202 } 2203 2204 // UnmarshalMsg implements msgp.Unmarshaler 2205 func (z *dataUsageEntryV2) UnmarshalMsg(bts []byte) (o []byte, err error) { 2206 var zb0001 uint32 2207 zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts) 2208 if err != nil { 2209 err = msgp.WrapError(err) 2210 return 2211 } 2212 if zb0001 != 4 { 2213 err = msgp.ArrayError{Wanted: 4, Got: zb0001} 2214 return 2215 } 2216 z.Size, bts, err = msgp.ReadInt64Bytes(bts) 2217 if err != nil { 2218 err = msgp.WrapError(err, "Size") 2219 return 2220 } 2221 z.Objects, bts, err = msgp.ReadUint64Bytes(bts) 2222 if err != nil { 2223 err = msgp.WrapError(err, "Objects") 2224 return 2225 } 2226 var zb0002 uint32 2227 zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) 2228 if err != nil { 2229 err = msgp.WrapError(err, "ObjSizes") 2230 return 2231 } 2232 if zb0002 != uint32(dataUsageBucketLen) { 2233 err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002} 2234 return 2235 } 2236 for za0001 := range z.ObjSizes { 2237 z.ObjSizes[za0001], bts, err = msgp.ReadUint64Bytes(bts) 2238 if err != nil { 2239 err = msgp.WrapError(err, "ObjSizes", za0001) 2240 return 2241 } 2242 } 2243 bts, err = z.Children.UnmarshalMsg(bts) 2244 if err != nil { 2245 err = msgp.WrapError(err, "Children") 2246 return 2247 } 2248 o = bts 2249 return 2250 } 2251 2252 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 2253 func (z *dataUsageEntryV2) Msgsize() (s int) { 2254 s = 1 + msgp.Int64Size + msgp.Uint64Size + msgp.ArrayHeaderSize + (dataUsageBucketLen * (msgp.Uint64Size)) + z.Children.Msgsize() 2255 return 2256 } 2257 2258 // DecodeMsg implements msgp.Decodable 2259 func (z *dataUsageEntryV3) DecodeMsg(dc *msgp.Reader) (err error) { 2260 var zb0001 uint32 2261 zb0001, err = dc.ReadArrayHeader() 2262 if err != nil { 2263 err = msgp.WrapError(err) 2264 return 2265 } 2266 if zb0001 != 8 { 2267 err = msgp.ArrayError{Wanted: 8, Got: zb0001} 2268 return 2269 } 2270 z.Size, err = dc.ReadInt64() 2271 if err != nil { 2272 err = msgp.WrapError(err, "Size") 2273 return 2274 } 2275 z.ReplicatedSize, err = dc.ReadUint64() 2276 if err != nil { 2277 err = msgp.WrapError(err, "ReplicatedSize") 2278 return 2279 } 2280 z.ReplicationPendingSize, err = dc.ReadUint64() 2281 if err != nil { 2282 err = msgp.WrapError(err, "ReplicationPendingSize") 2283 return 2284 } 2285 z.ReplicationFailedSize, err = dc.ReadUint64() 2286 if err != nil { 2287 err = msgp.WrapError(err, "ReplicationFailedSize") 2288 return 2289 } 2290 z.ReplicaSize, err = dc.ReadUint64() 2291 if err != nil { 2292 err = msgp.WrapError(err, "ReplicaSize") 2293 return 2294 } 2295 z.Objects, err = dc.ReadUint64() 2296 if err != nil { 2297 err = msgp.WrapError(err, "Objects") 2298 return 2299 } 2300 var zb0002 uint32 2301 zb0002, err = dc.ReadArrayHeader() 2302 if err != nil { 2303 err = msgp.WrapError(err, "ObjSizes") 2304 return 2305 } 2306 if zb0002 != uint32(dataUsageBucketLen) { 2307 err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002} 2308 return 2309 } 2310 for za0001 := range z.ObjSizes { 2311 z.ObjSizes[za0001], err = dc.ReadUint64() 2312 if err != nil { 2313 err = msgp.WrapError(err, "ObjSizes", za0001) 2314 return 2315 } 2316 } 2317 err = z.Children.DecodeMsg(dc) 2318 if err != nil { 2319 err = msgp.WrapError(err, "Children") 2320 return 2321 } 2322 return 2323 } 2324 2325 // UnmarshalMsg implements msgp.Unmarshaler 2326 func (z *dataUsageEntryV3) UnmarshalMsg(bts []byte) (o []byte, err error) { 2327 var zb0001 uint32 2328 zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts) 2329 if err != nil { 2330 err = msgp.WrapError(err) 2331 return 2332 } 2333 if zb0001 != 8 { 2334 err = msgp.ArrayError{Wanted: 8, Got: zb0001} 2335 return 2336 } 2337 z.Size, bts, err = msgp.ReadInt64Bytes(bts) 2338 if err != nil { 2339 err = msgp.WrapError(err, "Size") 2340 return 2341 } 2342 z.ReplicatedSize, bts, err = msgp.ReadUint64Bytes(bts) 2343 if err != nil { 2344 err = msgp.WrapError(err, "ReplicatedSize") 2345 return 2346 } 2347 z.ReplicationPendingSize, bts, err = msgp.ReadUint64Bytes(bts) 2348 if err != nil { 2349 err = msgp.WrapError(err, "ReplicationPendingSize") 2350 return 2351 } 2352 z.ReplicationFailedSize, bts, err = msgp.ReadUint64Bytes(bts) 2353 if err != nil { 2354 err = msgp.WrapError(err, "ReplicationFailedSize") 2355 return 2356 } 2357 z.ReplicaSize, bts, err = msgp.ReadUint64Bytes(bts) 2358 if err != nil { 2359 err = msgp.WrapError(err, "ReplicaSize") 2360 return 2361 } 2362 z.Objects, bts, err = msgp.ReadUint64Bytes(bts) 2363 if err != nil { 2364 err = msgp.WrapError(err, "Objects") 2365 return 2366 } 2367 var zb0002 uint32 2368 zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) 2369 if err != nil { 2370 err = msgp.WrapError(err, "ObjSizes") 2371 return 2372 } 2373 if zb0002 != uint32(dataUsageBucketLen) { 2374 err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002} 2375 return 2376 } 2377 for za0001 := range z.ObjSizes { 2378 z.ObjSizes[za0001], bts, err = msgp.ReadUint64Bytes(bts) 2379 if err != nil { 2380 err = msgp.WrapError(err, "ObjSizes", za0001) 2381 return 2382 } 2383 } 2384 bts, err = z.Children.UnmarshalMsg(bts) 2385 if err != nil { 2386 err = msgp.WrapError(err, "Children") 2387 return 2388 } 2389 o = bts 2390 return 2391 } 2392 2393 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 2394 func (z *dataUsageEntryV3) Msgsize() (s int) { 2395 s = 1 + msgp.Int64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.ArrayHeaderSize + (dataUsageBucketLen * (msgp.Uint64Size)) + z.Children.Msgsize() 2396 return 2397 } 2398 2399 // DecodeMsg implements msgp.Decodable 2400 func (z *dataUsageEntryV4) DecodeMsg(dc *msgp.Reader) (err error) { 2401 var zb0001 uint32 2402 zb0001, err = dc.ReadArrayHeader() 2403 if err != nil { 2404 err = msgp.WrapError(err) 2405 return 2406 } 2407 if zb0001 != 5 { 2408 err = msgp.ArrayError{Wanted: 5, Got: zb0001} 2409 return 2410 } 2411 err = z.Children.DecodeMsg(dc) 2412 if err != nil { 2413 err = msgp.WrapError(err, "Children") 2414 return 2415 } 2416 z.Size, err = dc.ReadInt64() 2417 if err != nil { 2418 err = msgp.WrapError(err, "Size") 2419 return 2420 } 2421 z.Objects, err = dc.ReadUint64() 2422 if err != nil { 2423 err = msgp.WrapError(err, "Objects") 2424 return 2425 } 2426 var zb0002 uint32 2427 zb0002, err = dc.ReadArrayHeader() 2428 if err != nil { 2429 err = msgp.WrapError(err, "ObjSizes") 2430 return 2431 } 2432 if zb0002 != uint32(dataUsageBucketLen) { 2433 err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002} 2434 return 2435 } 2436 for za0001 := range z.ObjSizes { 2437 z.ObjSizes[za0001], err = dc.ReadUint64() 2438 if err != nil { 2439 err = msgp.WrapError(err, "ObjSizes", za0001) 2440 return 2441 } 2442 } 2443 err = z.ReplicationStats.DecodeMsg(dc) 2444 if err != nil { 2445 err = msgp.WrapError(err, "ReplicationStats") 2446 return 2447 } 2448 return 2449 } 2450 2451 // UnmarshalMsg implements msgp.Unmarshaler 2452 func (z *dataUsageEntryV4) UnmarshalMsg(bts []byte) (o []byte, err error) { 2453 var zb0001 uint32 2454 zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts) 2455 if err != nil { 2456 err = msgp.WrapError(err) 2457 return 2458 } 2459 if zb0001 != 5 { 2460 err = msgp.ArrayError{Wanted: 5, Got: zb0001} 2461 return 2462 } 2463 bts, err = z.Children.UnmarshalMsg(bts) 2464 if err != nil { 2465 err = msgp.WrapError(err, "Children") 2466 return 2467 } 2468 z.Size, bts, err = msgp.ReadInt64Bytes(bts) 2469 if err != nil { 2470 err = msgp.WrapError(err, "Size") 2471 return 2472 } 2473 z.Objects, bts, err = msgp.ReadUint64Bytes(bts) 2474 if err != nil { 2475 err = msgp.WrapError(err, "Objects") 2476 return 2477 } 2478 var zb0002 uint32 2479 zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) 2480 if err != nil { 2481 err = msgp.WrapError(err, "ObjSizes") 2482 return 2483 } 2484 if zb0002 != uint32(dataUsageBucketLen) { 2485 err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002} 2486 return 2487 } 2488 for za0001 := range z.ObjSizes { 2489 z.ObjSizes[za0001], bts, err = msgp.ReadUint64Bytes(bts) 2490 if err != nil { 2491 err = msgp.WrapError(err, "ObjSizes", za0001) 2492 return 2493 } 2494 } 2495 bts, err = z.ReplicationStats.UnmarshalMsg(bts) 2496 if err != nil { 2497 err = msgp.WrapError(err, "ReplicationStats") 2498 return 2499 } 2500 o = bts 2501 return 2502 } 2503 2504 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 2505 func (z *dataUsageEntryV4) Msgsize() (s int) { 2506 s = 1 + z.Children.Msgsize() + msgp.Int64Size + msgp.Uint64Size + msgp.ArrayHeaderSize + (dataUsageBucketLen * (msgp.Uint64Size)) + z.ReplicationStats.Msgsize() 2507 return 2508 } 2509 2510 // DecodeMsg implements msgp.Decodable 2511 func (z *dataUsageEntryV5) DecodeMsg(dc *msgp.Reader) (err error) { 2512 var zb0001 uint32 2513 zb0001, err = dc.ReadArrayHeader() 2514 if err != nil { 2515 err = msgp.WrapError(err) 2516 return 2517 } 2518 if zb0001 != 7 { 2519 err = msgp.ArrayError{Wanted: 7, Got: zb0001} 2520 return 2521 } 2522 err = z.Children.DecodeMsg(dc) 2523 if err != nil { 2524 err = msgp.WrapError(err, "Children") 2525 return 2526 } 2527 z.Size, err = dc.ReadInt64() 2528 if err != nil { 2529 err = msgp.WrapError(err, "Size") 2530 return 2531 } 2532 z.Objects, err = dc.ReadUint64() 2533 if err != nil { 2534 err = msgp.WrapError(err, "Objects") 2535 return 2536 } 2537 z.Versions, err = dc.ReadUint64() 2538 if err != nil { 2539 err = msgp.WrapError(err, "Versions") 2540 return 2541 } 2542 var zb0002 uint32 2543 zb0002, err = dc.ReadArrayHeader() 2544 if err != nil { 2545 err = msgp.WrapError(err, "ObjSizes") 2546 return 2547 } 2548 if zb0002 != uint32(dataUsageBucketLen) { 2549 err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002} 2550 return 2551 } 2552 for za0001 := range z.ObjSizes { 2553 z.ObjSizes[za0001], err = dc.ReadUint64() 2554 if err != nil { 2555 err = msgp.WrapError(err, "ObjSizes", za0001) 2556 return 2557 } 2558 } 2559 if dc.IsNil() { 2560 err = dc.ReadNil() 2561 if err != nil { 2562 err = msgp.WrapError(err, "ReplicationStats") 2563 return 2564 } 2565 z.ReplicationStats = nil 2566 } else { 2567 if z.ReplicationStats == nil { 2568 z.ReplicationStats = new(replicationStatsV1) 2569 } 2570 err = z.ReplicationStats.DecodeMsg(dc) 2571 if err != nil { 2572 err = msgp.WrapError(err, "ReplicationStats") 2573 return 2574 } 2575 } 2576 z.Compacted, err = dc.ReadBool() 2577 if err != nil { 2578 err = msgp.WrapError(err, "Compacted") 2579 return 2580 } 2581 return 2582 } 2583 2584 // UnmarshalMsg implements msgp.Unmarshaler 2585 func (z *dataUsageEntryV5) UnmarshalMsg(bts []byte) (o []byte, err error) { 2586 var zb0001 uint32 2587 zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts) 2588 if err != nil { 2589 err = msgp.WrapError(err) 2590 return 2591 } 2592 if zb0001 != 7 { 2593 err = msgp.ArrayError{Wanted: 7, Got: zb0001} 2594 return 2595 } 2596 bts, err = z.Children.UnmarshalMsg(bts) 2597 if err != nil { 2598 err = msgp.WrapError(err, "Children") 2599 return 2600 } 2601 z.Size, bts, err = msgp.ReadInt64Bytes(bts) 2602 if err != nil { 2603 err = msgp.WrapError(err, "Size") 2604 return 2605 } 2606 z.Objects, bts, err = msgp.ReadUint64Bytes(bts) 2607 if err != nil { 2608 err = msgp.WrapError(err, "Objects") 2609 return 2610 } 2611 z.Versions, bts, err = msgp.ReadUint64Bytes(bts) 2612 if err != nil { 2613 err = msgp.WrapError(err, "Versions") 2614 return 2615 } 2616 var zb0002 uint32 2617 zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) 2618 if err != nil { 2619 err = msgp.WrapError(err, "ObjSizes") 2620 return 2621 } 2622 if zb0002 != uint32(dataUsageBucketLen) { 2623 err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002} 2624 return 2625 } 2626 for za0001 := range z.ObjSizes { 2627 z.ObjSizes[za0001], bts, err = msgp.ReadUint64Bytes(bts) 2628 if err != nil { 2629 err = msgp.WrapError(err, "ObjSizes", za0001) 2630 return 2631 } 2632 } 2633 if msgp.IsNil(bts) { 2634 bts, err = msgp.ReadNilBytes(bts) 2635 if err != nil { 2636 return 2637 } 2638 z.ReplicationStats = nil 2639 } else { 2640 if z.ReplicationStats == nil { 2641 z.ReplicationStats = new(replicationStatsV1) 2642 } 2643 bts, err = z.ReplicationStats.UnmarshalMsg(bts) 2644 if err != nil { 2645 err = msgp.WrapError(err, "ReplicationStats") 2646 return 2647 } 2648 } 2649 z.Compacted, bts, err = msgp.ReadBoolBytes(bts) 2650 if err != nil { 2651 err = msgp.WrapError(err, "Compacted") 2652 return 2653 } 2654 o = bts 2655 return 2656 } 2657 2658 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 2659 func (z *dataUsageEntryV5) Msgsize() (s int) { 2660 s = 1 + z.Children.Msgsize() + msgp.Int64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.ArrayHeaderSize + (dataUsageBucketLen * (msgp.Uint64Size)) 2661 if z.ReplicationStats == nil { 2662 s += msgp.NilSize 2663 } else { 2664 s += z.ReplicationStats.Msgsize() 2665 } 2666 s += msgp.BoolSize 2667 return 2668 } 2669 2670 // DecodeMsg implements msgp.Decodable 2671 func (z *dataUsageEntryV6) DecodeMsg(dc *msgp.Reader) (err error) { 2672 var zb0001 uint32 2673 zb0001, err = dc.ReadArrayHeader() 2674 if err != nil { 2675 err = msgp.WrapError(err) 2676 return 2677 } 2678 if zb0001 != 7 { 2679 err = msgp.ArrayError{Wanted: 7, Got: zb0001} 2680 return 2681 } 2682 err = z.Children.DecodeMsg(dc) 2683 if err != nil { 2684 err = msgp.WrapError(err, "Children") 2685 return 2686 } 2687 z.Size, err = dc.ReadInt64() 2688 if err != nil { 2689 err = msgp.WrapError(err, "Size") 2690 return 2691 } 2692 z.Objects, err = dc.ReadUint64() 2693 if err != nil { 2694 err = msgp.WrapError(err, "Objects") 2695 return 2696 } 2697 z.Versions, err = dc.ReadUint64() 2698 if err != nil { 2699 err = msgp.WrapError(err, "Versions") 2700 return 2701 } 2702 var zb0002 uint32 2703 zb0002, err = dc.ReadArrayHeader() 2704 if err != nil { 2705 err = msgp.WrapError(err, "ObjSizes") 2706 return 2707 } 2708 if zb0002 != uint32(dataUsageBucketLen) { 2709 err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002} 2710 return 2711 } 2712 for za0001 := range z.ObjSizes { 2713 z.ObjSizes[za0001], err = dc.ReadUint64() 2714 if err != nil { 2715 err = msgp.WrapError(err, "ObjSizes", za0001) 2716 return 2717 } 2718 } 2719 if dc.IsNil() { 2720 err = dc.ReadNil() 2721 if err != nil { 2722 err = msgp.WrapError(err, "ReplicationStats") 2723 return 2724 } 2725 z.ReplicationStats = nil 2726 } else { 2727 if z.ReplicationStats == nil { 2728 z.ReplicationStats = new(replicationAllStatsV1) 2729 } 2730 err = z.ReplicationStats.DecodeMsg(dc) 2731 if err != nil { 2732 err = msgp.WrapError(err, "ReplicationStats") 2733 return 2734 } 2735 } 2736 z.Compacted, err = dc.ReadBool() 2737 if err != nil { 2738 err = msgp.WrapError(err, "Compacted") 2739 return 2740 } 2741 return 2742 } 2743 2744 // UnmarshalMsg implements msgp.Unmarshaler 2745 func (z *dataUsageEntryV6) UnmarshalMsg(bts []byte) (o []byte, err error) { 2746 var zb0001 uint32 2747 zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts) 2748 if err != nil { 2749 err = msgp.WrapError(err) 2750 return 2751 } 2752 if zb0001 != 7 { 2753 err = msgp.ArrayError{Wanted: 7, Got: zb0001} 2754 return 2755 } 2756 bts, err = z.Children.UnmarshalMsg(bts) 2757 if err != nil { 2758 err = msgp.WrapError(err, "Children") 2759 return 2760 } 2761 z.Size, bts, err = msgp.ReadInt64Bytes(bts) 2762 if err != nil { 2763 err = msgp.WrapError(err, "Size") 2764 return 2765 } 2766 z.Objects, bts, err = msgp.ReadUint64Bytes(bts) 2767 if err != nil { 2768 err = msgp.WrapError(err, "Objects") 2769 return 2770 } 2771 z.Versions, bts, err = msgp.ReadUint64Bytes(bts) 2772 if err != nil { 2773 err = msgp.WrapError(err, "Versions") 2774 return 2775 } 2776 var zb0002 uint32 2777 zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) 2778 if err != nil { 2779 err = msgp.WrapError(err, "ObjSizes") 2780 return 2781 } 2782 if zb0002 != uint32(dataUsageBucketLen) { 2783 err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002} 2784 return 2785 } 2786 for za0001 := range z.ObjSizes { 2787 z.ObjSizes[za0001], bts, err = msgp.ReadUint64Bytes(bts) 2788 if err != nil { 2789 err = msgp.WrapError(err, "ObjSizes", za0001) 2790 return 2791 } 2792 } 2793 if msgp.IsNil(bts) { 2794 bts, err = msgp.ReadNilBytes(bts) 2795 if err != nil { 2796 return 2797 } 2798 z.ReplicationStats = nil 2799 } else { 2800 if z.ReplicationStats == nil { 2801 z.ReplicationStats = new(replicationAllStatsV1) 2802 } 2803 bts, err = z.ReplicationStats.UnmarshalMsg(bts) 2804 if err != nil { 2805 err = msgp.WrapError(err, "ReplicationStats") 2806 return 2807 } 2808 } 2809 z.Compacted, bts, err = msgp.ReadBoolBytes(bts) 2810 if err != nil { 2811 err = msgp.WrapError(err, "Compacted") 2812 return 2813 } 2814 o = bts 2815 return 2816 } 2817 2818 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 2819 func (z *dataUsageEntryV6) Msgsize() (s int) { 2820 s = 1 + z.Children.Msgsize() + msgp.Int64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.ArrayHeaderSize + (dataUsageBucketLen * (msgp.Uint64Size)) 2821 if z.ReplicationStats == nil { 2822 s += msgp.NilSize 2823 } else { 2824 s += z.ReplicationStats.Msgsize() 2825 } 2826 s += msgp.BoolSize 2827 return 2828 } 2829 2830 // DecodeMsg implements msgp.Decodable 2831 func (z *dataUsageEntryV7) DecodeMsg(dc *msgp.Reader) (err error) { 2832 var field []byte 2833 _ = field 2834 var zb0001 uint32 2835 zb0001, err = dc.ReadMapHeader() 2836 if err != nil { 2837 err = msgp.WrapError(err) 2838 return 2839 } 2840 for zb0001 > 0 { 2841 zb0001-- 2842 field, err = dc.ReadMapKeyPtr() 2843 if err != nil { 2844 err = msgp.WrapError(err) 2845 return 2846 } 2847 switch msgp.UnsafeString(field) { 2848 case "ch": 2849 err = z.Children.DecodeMsg(dc) 2850 if err != nil { 2851 err = msgp.WrapError(err, "Children") 2852 return 2853 } 2854 case "sz": 2855 z.Size, err = dc.ReadInt64() 2856 if err != nil { 2857 err = msgp.WrapError(err, "Size") 2858 return 2859 } 2860 case "os": 2861 z.Objects, err = dc.ReadUint64() 2862 if err != nil { 2863 err = msgp.WrapError(err, "Objects") 2864 return 2865 } 2866 case "vs": 2867 z.Versions, err = dc.ReadUint64() 2868 if err != nil { 2869 err = msgp.WrapError(err, "Versions") 2870 return 2871 } 2872 case "dms": 2873 z.DeleteMarkers, err = dc.ReadUint64() 2874 if err != nil { 2875 err = msgp.WrapError(err, "DeleteMarkers") 2876 return 2877 } 2878 case "szs": 2879 var zb0002 uint32 2880 zb0002, err = dc.ReadArrayHeader() 2881 if err != nil { 2882 err = msgp.WrapError(err, "ObjSizes") 2883 return 2884 } 2885 if zb0002 != uint32(dataUsageBucketLenV1) { 2886 err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLenV1), Got: zb0002} 2887 return 2888 } 2889 for za0001 := range z.ObjSizes { 2890 z.ObjSizes[za0001], err = dc.ReadUint64() 2891 if err != nil { 2892 err = msgp.WrapError(err, "ObjSizes", za0001) 2893 return 2894 } 2895 } 2896 case "vh": 2897 var zb0003 uint32 2898 zb0003, err = dc.ReadArrayHeader() 2899 if err != nil { 2900 err = msgp.WrapError(err, "ObjVersions") 2901 return 2902 } 2903 if zb0003 != uint32(dataUsageVersionLen) { 2904 err = msgp.ArrayError{Wanted: uint32(dataUsageVersionLen), Got: zb0003} 2905 return 2906 } 2907 for za0002 := range z.ObjVersions { 2908 z.ObjVersions[za0002], err = dc.ReadUint64() 2909 if err != nil { 2910 err = msgp.WrapError(err, "ObjVersions", za0002) 2911 return 2912 } 2913 } 2914 case "rs": 2915 if dc.IsNil() { 2916 err = dc.ReadNil() 2917 if err != nil { 2918 err = msgp.WrapError(err, "ReplicationStats") 2919 return 2920 } 2921 z.ReplicationStats = nil 2922 } else { 2923 if z.ReplicationStats == nil { 2924 z.ReplicationStats = new(replicationAllStats) 2925 } 2926 err = z.ReplicationStats.DecodeMsg(dc) 2927 if err != nil { 2928 err = msgp.WrapError(err, "ReplicationStats") 2929 return 2930 } 2931 } 2932 case "ats": 2933 if dc.IsNil() { 2934 err = dc.ReadNil() 2935 if err != nil { 2936 err = msgp.WrapError(err, "AllTierStats") 2937 return 2938 } 2939 z.AllTierStats = nil 2940 } else { 2941 if z.AllTierStats == nil { 2942 z.AllTierStats = new(allTierStats) 2943 } 2944 err = z.AllTierStats.DecodeMsg(dc) 2945 if err != nil { 2946 err = msgp.WrapError(err, "AllTierStats") 2947 return 2948 } 2949 } 2950 case "c": 2951 z.Compacted, err = dc.ReadBool() 2952 if err != nil { 2953 err = msgp.WrapError(err, "Compacted") 2954 return 2955 } 2956 default: 2957 err = dc.Skip() 2958 if err != nil { 2959 err = msgp.WrapError(err) 2960 return 2961 } 2962 } 2963 } 2964 return 2965 } 2966 2967 // UnmarshalMsg implements msgp.Unmarshaler 2968 func (z *dataUsageEntryV7) UnmarshalMsg(bts []byte) (o []byte, err error) { 2969 var field []byte 2970 _ = field 2971 var zb0001 uint32 2972 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 2973 if err != nil { 2974 err = msgp.WrapError(err) 2975 return 2976 } 2977 for zb0001 > 0 { 2978 zb0001-- 2979 field, bts, err = msgp.ReadMapKeyZC(bts) 2980 if err != nil { 2981 err = msgp.WrapError(err) 2982 return 2983 } 2984 switch msgp.UnsafeString(field) { 2985 case "ch": 2986 bts, err = z.Children.UnmarshalMsg(bts) 2987 if err != nil { 2988 err = msgp.WrapError(err, "Children") 2989 return 2990 } 2991 case "sz": 2992 z.Size, bts, err = msgp.ReadInt64Bytes(bts) 2993 if err != nil { 2994 err = msgp.WrapError(err, "Size") 2995 return 2996 } 2997 case "os": 2998 z.Objects, bts, err = msgp.ReadUint64Bytes(bts) 2999 if err != nil { 3000 err = msgp.WrapError(err, "Objects") 3001 return 3002 } 3003 case "vs": 3004 z.Versions, bts, err = msgp.ReadUint64Bytes(bts) 3005 if err != nil { 3006 err = msgp.WrapError(err, "Versions") 3007 return 3008 } 3009 case "dms": 3010 z.DeleteMarkers, bts, err = msgp.ReadUint64Bytes(bts) 3011 if err != nil { 3012 err = msgp.WrapError(err, "DeleteMarkers") 3013 return 3014 } 3015 case "szs": 3016 var zb0002 uint32 3017 zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) 3018 if err != nil { 3019 err = msgp.WrapError(err, "ObjSizes") 3020 return 3021 } 3022 if zb0002 != uint32(dataUsageBucketLenV1) { 3023 err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLenV1), Got: zb0002} 3024 return 3025 } 3026 for za0001 := range z.ObjSizes { 3027 z.ObjSizes[za0001], bts, err = msgp.ReadUint64Bytes(bts) 3028 if err != nil { 3029 err = msgp.WrapError(err, "ObjSizes", za0001) 3030 return 3031 } 3032 } 3033 case "vh": 3034 var zb0003 uint32 3035 zb0003, bts, err = msgp.ReadArrayHeaderBytes(bts) 3036 if err != nil { 3037 err = msgp.WrapError(err, "ObjVersions") 3038 return 3039 } 3040 if zb0003 != uint32(dataUsageVersionLen) { 3041 err = msgp.ArrayError{Wanted: uint32(dataUsageVersionLen), Got: zb0003} 3042 return 3043 } 3044 for za0002 := range z.ObjVersions { 3045 z.ObjVersions[za0002], bts, err = msgp.ReadUint64Bytes(bts) 3046 if err != nil { 3047 err = msgp.WrapError(err, "ObjVersions", za0002) 3048 return 3049 } 3050 } 3051 case "rs": 3052 if msgp.IsNil(bts) { 3053 bts, err = msgp.ReadNilBytes(bts) 3054 if err != nil { 3055 return 3056 } 3057 z.ReplicationStats = nil 3058 } else { 3059 if z.ReplicationStats == nil { 3060 z.ReplicationStats = new(replicationAllStats) 3061 } 3062 bts, err = z.ReplicationStats.UnmarshalMsg(bts) 3063 if err != nil { 3064 err = msgp.WrapError(err, "ReplicationStats") 3065 return 3066 } 3067 } 3068 case "ats": 3069 if msgp.IsNil(bts) { 3070 bts, err = msgp.ReadNilBytes(bts) 3071 if err != nil { 3072 return 3073 } 3074 z.AllTierStats = nil 3075 } else { 3076 if z.AllTierStats == nil { 3077 z.AllTierStats = new(allTierStats) 3078 } 3079 bts, err = z.AllTierStats.UnmarshalMsg(bts) 3080 if err != nil { 3081 err = msgp.WrapError(err, "AllTierStats") 3082 return 3083 } 3084 } 3085 case "c": 3086 z.Compacted, bts, err = msgp.ReadBoolBytes(bts) 3087 if err != nil { 3088 err = msgp.WrapError(err, "Compacted") 3089 return 3090 } 3091 default: 3092 bts, err = msgp.Skip(bts) 3093 if err != nil { 3094 err = msgp.WrapError(err) 3095 return 3096 } 3097 } 3098 } 3099 o = bts 3100 return 3101 } 3102 3103 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 3104 func (z *dataUsageEntryV7) Msgsize() (s int) { 3105 s = 1 + 3 + z.Children.Msgsize() + 3 + msgp.Int64Size + 3 + msgp.Uint64Size + 3 + msgp.Uint64Size + 4 + msgp.Uint64Size + 4 + msgp.ArrayHeaderSize + (dataUsageBucketLenV1 * (msgp.Uint64Size)) + 3 + msgp.ArrayHeaderSize + (dataUsageVersionLen * (msgp.Uint64Size)) + 3 3106 if z.ReplicationStats == nil { 3107 s += msgp.NilSize 3108 } else { 3109 s += z.ReplicationStats.Msgsize() 3110 } 3111 s += 4 3112 if z.AllTierStats == nil { 3113 s += msgp.NilSize 3114 } else { 3115 s += z.AllTierStats.Msgsize() 3116 } 3117 s += 2 + msgp.BoolSize 3118 return 3119 } 3120 3121 // DecodeMsg implements msgp.Decodable 3122 func (z *dataUsageHash) DecodeMsg(dc *msgp.Reader) (err error) { 3123 { 3124 var zb0001 string 3125 zb0001, err = dc.ReadString() 3126 if err != nil { 3127 err = msgp.WrapError(err) 3128 return 3129 } 3130 (*z) = dataUsageHash(zb0001) 3131 } 3132 return 3133 } 3134 3135 // EncodeMsg implements msgp.Encodable 3136 func (z dataUsageHash) EncodeMsg(en *msgp.Writer) (err error) { 3137 err = en.WriteString(string(z)) 3138 if err != nil { 3139 err = msgp.WrapError(err) 3140 return 3141 } 3142 return 3143 } 3144 3145 // MarshalMsg implements msgp.Marshaler 3146 func (z dataUsageHash) MarshalMsg(b []byte) (o []byte, err error) { 3147 o = msgp.Require(b, z.Msgsize()) 3148 o = msgp.AppendString(o, string(z)) 3149 return 3150 } 3151 3152 // UnmarshalMsg implements msgp.Unmarshaler 3153 func (z *dataUsageHash) UnmarshalMsg(bts []byte) (o []byte, err error) { 3154 { 3155 var zb0001 string 3156 zb0001, bts, err = msgp.ReadStringBytes(bts) 3157 if err != nil { 3158 err = msgp.WrapError(err) 3159 return 3160 } 3161 (*z) = dataUsageHash(zb0001) 3162 } 3163 o = bts 3164 return 3165 } 3166 3167 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 3168 func (z dataUsageHash) Msgsize() (s int) { 3169 s = msgp.StringPrefixSize + len(string(z)) 3170 return 3171 } 3172 3173 // DecodeMsg implements msgp.Decodable 3174 func (z *replicationAllStats) DecodeMsg(dc *msgp.Reader) (err error) { 3175 var field []byte 3176 _ = field 3177 var zb0001 uint32 3178 zb0001, err = dc.ReadMapHeader() 3179 if err != nil { 3180 err = msgp.WrapError(err) 3181 return 3182 } 3183 for zb0001 > 0 { 3184 zb0001-- 3185 field, err = dc.ReadMapKeyPtr() 3186 if err != nil { 3187 err = msgp.WrapError(err) 3188 return 3189 } 3190 switch msgp.UnsafeString(field) { 3191 case "t": 3192 var zb0002 uint32 3193 zb0002, err = dc.ReadMapHeader() 3194 if err != nil { 3195 err = msgp.WrapError(err, "Targets") 3196 return 3197 } 3198 if z.Targets == nil { 3199 z.Targets = make(map[string]replicationStats, zb0002) 3200 } else if len(z.Targets) > 0 { 3201 for key := range z.Targets { 3202 delete(z.Targets, key) 3203 } 3204 } 3205 for zb0002 > 0 { 3206 zb0002-- 3207 var za0001 string 3208 var za0002 replicationStats 3209 za0001, err = dc.ReadString() 3210 if err != nil { 3211 err = msgp.WrapError(err, "Targets") 3212 return 3213 } 3214 err = za0002.DecodeMsg(dc) 3215 if err != nil { 3216 err = msgp.WrapError(err, "Targets", za0001) 3217 return 3218 } 3219 z.Targets[za0001] = za0002 3220 } 3221 case "r": 3222 z.ReplicaSize, err = dc.ReadUint64() 3223 if err != nil { 3224 err = msgp.WrapError(err, "ReplicaSize") 3225 return 3226 } 3227 case "rc": 3228 z.ReplicaCount, err = dc.ReadUint64() 3229 if err != nil { 3230 err = msgp.WrapError(err, "ReplicaCount") 3231 return 3232 } 3233 default: 3234 err = dc.Skip() 3235 if err != nil { 3236 err = msgp.WrapError(err) 3237 return 3238 } 3239 } 3240 } 3241 return 3242 } 3243 3244 // EncodeMsg implements msgp.Encodable 3245 func (z *replicationAllStats) EncodeMsg(en *msgp.Writer) (err error) { 3246 // check for omitted fields 3247 zb0001Len := uint32(3) 3248 var zb0001Mask uint8 /* 3 bits */ 3249 _ = zb0001Mask 3250 if z.Targets == nil { 3251 zb0001Len-- 3252 zb0001Mask |= 0x1 3253 } 3254 if z.ReplicaSize == 0 { 3255 zb0001Len-- 3256 zb0001Mask |= 0x2 3257 } 3258 if z.ReplicaCount == 0 { 3259 zb0001Len-- 3260 zb0001Mask |= 0x4 3261 } 3262 // variable map header, size zb0001Len 3263 err = en.Append(0x80 | uint8(zb0001Len)) 3264 if err != nil { 3265 return 3266 } 3267 if zb0001Len == 0 { 3268 return 3269 } 3270 if (zb0001Mask & 0x1) == 0 { // if not omitted 3271 // write "t" 3272 err = en.Append(0xa1, 0x74) 3273 if err != nil { 3274 return 3275 } 3276 err = en.WriteMapHeader(uint32(len(z.Targets))) 3277 if err != nil { 3278 err = msgp.WrapError(err, "Targets") 3279 return 3280 } 3281 for za0001, za0002 := range z.Targets { 3282 err = en.WriteString(za0001) 3283 if err != nil { 3284 err = msgp.WrapError(err, "Targets") 3285 return 3286 } 3287 err = za0002.EncodeMsg(en) 3288 if err != nil { 3289 err = msgp.WrapError(err, "Targets", za0001) 3290 return 3291 } 3292 } 3293 } 3294 if (zb0001Mask & 0x2) == 0 { // if not omitted 3295 // write "r" 3296 err = en.Append(0xa1, 0x72) 3297 if err != nil { 3298 return 3299 } 3300 err = en.WriteUint64(z.ReplicaSize) 3301 if err != nil { 3302 err = msgp.WrapError(err, "ReplicaSize") 3303 return 3304 } 3305 } 3306 if (zb0001Mask & 0x4) == 0 { // if not omitted 3307 // write "rc" 3308 err = en.Append(0xa2, 0x72, 0x63) 3309 if err != nil { 3310 return 3311 } 3312 err = en.WriteUint64(z.ReplicaCount) 3313 if err != nil { 3314 err = msgp.WrapError(err, "ReplicaCount") 3315 return 3316 } 3317 } 3318 return 3319 } 3320 3321 // MarshalMsg implements msgp.Marshaler 3322 func (z *replicationAllStats) MarshalMsg(b []byte) (o []byte, err error) { 3323 o = msgp.Require(b, z.Msgsize()) 3324 // check for omitted fields 3325 zb0001Len := uint32(3) 3326 var zb0001Mask uint8 /* 3 bits */ 3327 _ = zb0001Mask 3328 if z.Targets == nil { 3329 zb0001Len-- 3330 zb0001Mask |= 0x1 3331 } 3332 if z.ReplicaSize == 0 { 3333 zb0001Len-- 3334 zb0001Mask |= 0x2 3335 } 3336 if z.ReplicaCount == 0 { 3337 zb0001Len-- 3338 zb0001Mask |= 0x4 3339 } 3340 // variable map header, size zb0001Len 3341 o = append(o, 0x80|uint8(zb0001Len)) 3342 if zb0001Len == 0 { 3343 return 3344 } 3345 if (zb0001Mask & 0x1) == 0 { // if not omitted 3346 // string "t" 3347 o = append(o, 0xa1, 0x74) 3348 o = msgp.AppendMapHeader(o, uint32(len(z.Targets))) 3349 for za0001, za0002 := range z.Targets { 3350 o = msgp.AppendString(o, za0001) 3351 o, err = za0002.MarshalMsg(o) 3352 if err != nil { 3353 err = msgp.WrapError(err, "Targets", za0001) 3354 return 3355 } 3356 } 3357 } 3358 if (zb0001Mask & 0x2) == 0 { // if not omitted 3359 // string "r" 3360 o = append(o, 0xa1, 0x72) 3361 o = msgp.AppendUint64(o, z.ReplicaSize) 3362 } 3363 if (zb0001Mask & 0x4) == 0 { // if not omitted 3364 // string "rc" 3365 o = append(o, 0xa2, 0x72, 0x63) 3366 o = msgp.AppendUint64(o, z.ReplicaCount) 3367 } 3368 return 3369 } 3370 3371 // UnmarshalMsg implements msgp.Unmarshaler 3372 func (z *replicationAllStats) UnmarshalMsg(bts []byte) (o []byte, err error) { 3373 var field []byte 3374 _ = field 3375 var zb0001 uint32 3376 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 3377 if err != nil { 3378 err = msgp.WrapError(err) 3379 return 3380 } 3381 for zb0001 > 0 { 3382 zb0001-- 3383 field, bts, err = msgp.ReadMapKeyZC(bts) 3384 if err != nil { 3385 err = msgp.WrapError(err) 3386 return 3387 } 3388 switch msgp.UnsafeString(field) { 3389 case "t": 3390 var zb0002 uint32 3391 zb0002, bts, err = msgp.ReadMapHeaderBytes(bts) 3392 if err != nil { 3393 err = msgp.WrapError(err, "Targets") 3394 return 3395 } 3396 if z.Targets == nil { 3397 z.Targets = make(map[string]replicationStats, zb0002) 3398 } else if len(z.Targets) > 0 { 3399 for key := range z.Targets { 3400 delete(z.Targets, key) 3401 } 3402 } 3403 for zb0002 > 0 { 3404 var za0001 string 3405 var za0002 replicationStats 3406 zb0002-- 3407 za0001, bts, err = msgp.ReadStringBytes(bts) 3408 if err != nil { 3409 err = msgp.WrapError(err, "Targets") 3410 return 3411 } 3412 bts, err = za0002.UnmarshalMsg(bts) 3413 if err != nil { 3414 err = msgp.WrapError(err, "Targets", za0001) 3415 return 3416 } 3417 z.Targets[za0001] = za0002 3418 } 3419 case "r": 3420 z.ReplicaSize, bts, err = msgp.ReadUint64Bytes(bts) 3421 if err != nil { 3422 err = msgp.WrapError(err, "ReplicaSize") 3423 return 3424 } 3425 case "rc": 3426 z.ReplicaCount, bts, err = msgp.ReadUint64Bytes(bts) 3427 if err != nil { 3428 err = msgp.WrapError(err, "ReplicaCount") 3429 return 3430 } 3431 default: 3432 bts, err = msgp.Skip(bts) 3433 if err != nil { 3434 err = msgp.WrapError(err) 3435 return 3436 } 3437 } 3438 } 3439 o = bts 3440 return 3441 } 3442 3443 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 3444 func (z *replicationAllStats) Msgsize() (s int) { 3445 s = 1 + 2 + msgp.MapHeaderSize 3446 if z.Targets != nil { 3447 for za0001, za0002 := range z.Targets { 3448 _ = za0002 3449 s += msgp.StringPrefixSize + len(za0001) + za0002.Msgsize() 3450 } 3451 } 3452 s += 2 + msgp.Uint64Size + 3 + msgp.Uint64Size 3453 return 3454 } 3455 3456 // DecodeMsg implements msgp.Decodable 3457 func (z *replicationAllStatsV1) DecodeMsg(dc *msgp.Reader) (err error) { 3458 var zb0001 uint32 3459 zb0001, err = dc.ReadArrayHeader() 3460 if err != nil { 3461 err = msgp.WrapError(err) 3462 return 3463 } 3464 if zb0001 != 3 { 3465 err = msgp.ArrayError{Wanted: 3, Got: zb0001} 3466 return 3467 } 3468 var zb0002 uint32 3469 zb0002, err = dc.ReadMapHeader() 3470 if err != nil { 3471 err = msgp.WrapError(err, "Targets") 3472 return 3473 } 3474 if z.Targets == nil { 3475 z.Targets = make(map[string]replicationStats, zb0002) 3476 } else if len(z.Targets) > 0 { 3477 for key := range z.Targets { 3478 delete(z.Targets, key) 3479 } 3480 } 3481 var field []byte 3482 _ = field 3483 for zb0002 > 0 { 3484 zb0002-- 3485 var za0001 string 3486 var za0002 replicationStats 3487 za0001, err = dc.ReadString() 3488 if err != nil { 3489 err = msgp.WrapError(err, "Targets") 3490 return 3491 } 3492 err = za0002.DecodeMsg(dc) 3493 if err != nil { 3494 err = msgp.WrapError(err, "Targets", za0001) 3495 return 3496 } 3497 z.Targets[za0001] = za0002 3498 } 3499 z.ReplicaSize, err = dc.ReadUint64() 3500 if err != nil { 3501 err = msgp.WrapError(err, "ReplicaSize") 3502 return 3503 } 3504 z.ReplicaCount, err = dc.ReadUint64() 3505 if err != nil { 3506 err = msgp.WrapError(err, "ReplicaCount") 3507 return 3508 } 3509 return 3510 } 3511 3512 // EncodeMsg implements msgp.Encodable 3513 func (z *replicationAllStatsV1) EncodeMsg(en *msgp.Writer) (err error) { 3514 // array header, size 3 3515 err = en.Append(0x93) 3516 if err != nil { 3517 return 3518 } 3519 err = en.WriteMapHeader(uint32(len(z.Targets))) 3520 if err != nil { 3521 err = msgp.WrapError(err, "Targets") 3522 return 3523 } 3524 for za0001, za0002 := range z.Targets { 3525 err = en.WriteString(za0001) 3526 if err != nil { 3527 err = msgp.WrapError(err, "Targets") 3528 return 3529 } 3530 err = za0002.EncodeMsg(en) 3531 if err != nil { 3532 err = msgp.WrapError(err, "Targets", za0001) 3533 return 3534 } 3535 } 3536 err = en.WriteUint64(z.ReplicaSize) 3537 if err != nil { 3538 err = msgp.WrapError(err, "ReplicaSize") 3539 return 3540 } 3541 err = en.WriteUint64(z.ReplicaCount) 3542 if err != nil { 3543 err = msgp.WrapError(err, "ReplicaCount") 3544 return 3545 } 3546 return 3547 } 3548 3549 // MarshalMsg implements msgp.Marshaler 3550 func (z *replicationAllStatsV1) MarshalMsg(b []byte) (o []byte, err error) { 3551 o = msgp.Require(b, z.Msgsize()) 3552 // array header, size 3 3553 o = append(o, 0x93) 3554 o = msgp.AppendMapHeader(o, uint32(len(z.Targets))) 3555 for za0001, za0002 := range z.Targets { 3556 o = msgp.AppendString(o, za0001) 3557 o, err = za0002.MarshalMsg(o) 3558 if err != nil { 3559 err = msgp.WrapError(err, "Targets", za0001) 3560 return 3561 } 3562 } 3563 o = msgp.AppendUint64(o, z.ReplicaSize) 3564 o = msgp.AppendUint64(o, z.ReplicaCount) 3565 return 3566 } 3567 3568 // UnmarshalMsg implements msgp.Unmarshaler 3569 func (z *replicationAllStatsV1) UnmarshalMsg(bts []byte) (o []byte, err error) { 3570 var zb0001 uint32 3571 zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts) 3572 if err != nil { 3573 err = msgp.WrapError(err) 3574 return 3575 } 3576 if zb0001 != 3 { 3577 err = msgp.ArrayError{Wanted: 3, Got: zb0001} 3578 return 3579 } 3580 var zb0002 uint32 3581 zb0002, bts, err = msgp.ReadMapHeaderBytes(bts) 3582 if err != nil { 3583 err = msgp.WrapError(err, "Targets") 3584 return 3585 } 3586 if z.Targets == nil { 3587 z.Targets = make(map[string]replicationStats, zb0002) 3588 } else if len(z.Targets) > 0 { 3589 for key := range z.Targets { 3590 delete(z.Targets, key) 3591 } 3592 } 3593 var field []byte 3594 _ = field 3595 for zb0002 > 0 { 3596 var za0001 string 3597 var za0002 replicationStats 3598 zb0002-- 3599 za0001, bts, err = msgp.ReadStringBytes(bts) 3600 if err != nil { 3601 err = msgp.WrapError(err, "Targets") 3602 return 3603 } 3604 bts, err = za0002.UnmarshalMsg(bts) 3605 if err != nil { 3606 err = msgp.WrapError(err, "Targets", za0001) 3607 return 3608 } 3609 z.Targets[za0001] = za0002 3610 } 3611 z.ReplicaSize, bts, err = msgp.ReadUint64Bytes(bts) 3612 if err != nil { 3613 err = msgp.WrapError(err, "ReplicaSize") 3614 return 3615 } 3616 z.ReplicaCount, bts, err = msgp.ReadUint64Bytes(bts) 3617 if err != nil { 3618 err = msgp.WrapError(err, "ReplicaCount") 3619 return 3620 } 3621 o = bts 3622 return 3623 } 3624 3625 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 3626 func (z *replicationAllStatsV1) Msgsize() (s int) { 3627 s = 1 + msgp.MapHeaderSize 3628 if z.Targets != nil { 3629 for za0001, za0002 := range z.Targets { 3630 _ = za0002 3631 s += msgp.StringPrefixSize + len(za0001) + za0002.Msgsize() 3632 } 3633 } 3634 s += msgp.Uint64Size + msgp.Uint64Size 3635 return 3636 } 3637 3638 // DecodeMsg implements msgp.Decodable 3639 func (z *replicationStats) DecodeMsg(dc *msgp.Reader) (err error) { 3640 var zb0001 uint32 3641 zb0001, err = dc.ReadArrayHeader() 3642 if err != nil { 3643 err = msgp.WrapError(err) 3644 return 3645 } 3646 if zb0001 != 10 { 3647 err = msgp.ArrayError{Wanted: 10, Got: zb0001} 3648 return 3649 } 3650 z.PendingSize, err = dc.ReadUint64() 3651 if err != nil { 3652 err = msgp.WrapError(err, "PendingSize") 3653 return 3654 } 3655 z.ReplicatedSize, err = dc.ReadUint64() 3656 if err != nil { 3657 err = msgp.WrapError(err, "ReplicatedSize") 3658 return 3659 } 3660 z.FailedSize, err = dc.ReadUint64() 3661 if err != nil { 3662 err = msgp.WrapError(err, "FailedSize") 3663 return 3664 } 3665 z.FailedCount, err = dc.ReadUint64() 3666 if err != nil { 3667 err = msgp.WrapError(err, "FailedCount") 3668 return 3669 } 3670 z.PendingCount, err = dc.ReadUint64() 3671 if err != nil { 3672 err = msgp.WrapError(err, "PendingCount") 3673 return 3674 } 3675 z.MissedThresholdSize, err = dc.ReadUint64() 3676 if err != nil { 3677 err = msgp.WrapError(err, "MissedThresholdSize") 3678 return 3679 } 3680 z.AfterThresholdSize, err = dc.ReadUint64() 3681 if err != nil { 3682 err = msgp.WrapError(err, "AfterThresholdSize") 3683 return 3684 } 3685 z.MissedThresholdCount, err = dc.ReadUint64() 3686 if err != nil { 3687 err = msgp.WrapError(err, "MissedThresholdCount") 3688 return 3689 } 3690 z.AfterThresholdCount, err = dc.ReadUint64() 3691 if err != nil { 3692 err = msgp.WrapError(err, "AfterThresholdCount") 3693 return 3694 } 3695 z.ReplicatedCount, err = dc.ReadUint64() 3696 if err != nil { 3697 err = msgp.WrapError(err, "ReplicatedCount") 3698 return 3699 } 3700 return 3701 } 3702 3703 // EncodeMsg implements msgp.Encodable 3704 func (z *replicationStats) EncodeMsg(en *msgp.Writer) (err error) { 3705 // array header, size 10 3706 err = en.Append(0x9a) 3707 if err != nil { 3708 return 3709 } 3710 err = en.WriteUint64(z.PendingSize) 3711 if err != nil { 3712 err = msgp.WrapError(err, "PendingSize") 3713 return 3714 } 3715 err = en.WriteUint64(z.ReplicatedSize) 3716 if err != nil { 3717 err = msgp.WrapError(err, "ReplicatedSize") 3718 return 3719 } 3720 err = en.WriteUint64(z.FailedSize) 3721 if err != nil { 3722 err = msgp.WrapError(err, "FailedSize") 3723 return 3724 } 3725 err = en.WriteUint64(z.FailedCount) 3726 if err != nil { 3727 err = msgp.WrapError(err, "FailedCount") 3728 return 3729 } 3730 err = en.WriteUint64(z.PendingCount) 3731 if err != nil { 3732 err = msgp.WrapError(err, "PendingCount") 3733 return 3734 } 3735 err = en.WriteUint64(z.MissedThresholdSize) 3736 if err != nil { 3737 err = msgp.WrapError(err, "MissedThresholdSize") 3738 return 3739 } 3740 err = en.WriteUint64(z.AfterThresholdSize) 3741 if err != nil { 3742 err = msgp.WrapError(err, "AfterThresholdSize") 3743 return 3744 } 3745 err = en.WriteUint64(z.MissedThresholdCount) 3746 if err != nil { 3747 err = msgp.WrapError(err, "MissedThresholdCount") 3748 return 3749 } 3750 err = en.WriteUint64(z.AfterThresholdCount) 3751 if err != nil { 3752 err = msgp.WrapError(err, "AfterThresholdCount") 3753 return 3754 } 3755 err = en.WriteUint64(z.ReplicatedCount) 3756 if err != nil { 3757 err = msgp.WrapError(err, "ReplicatedCount") 3758 return 3759 } 3760 return 3761 } 3762 3763 // MarshalMsg implements msgp.Marshaler 3764 func (z *replicationStats) MarshalMsg(b []byte) (o []byte, err error) { 3765 o = msgp.Require(b, z.Msgsize()) 3766 // array header, size 10 3767 o = append(o, 0x9a) 3768 o = msgp.AppendUint64(o, z.PendingSize) 3769 o = msgp.AppendUint64(o, z.ReplicatedSize) 3770 o = msgp.AppendUint64(o, z.FailedSize) 3771 o = msgp.AppendUint64(o, z.FailedCount) 3772 o = msgp.AppendUint64(o, z.PendingCount) 3773 o = msgp.AppendUint64(o, z.MissedThresholdSize) 3774 o = msgp.AppendUint64(o, z.AfterThresholdSize) 3775 o = msgp.AppendUint64(o, z.MissedThresholdCount) 3776 o = msgp.AppendUint64(o, z.AfterThresholdCount) 3777 o = msgp.AppendUint64(o, z.ReplicatedCount) 3778 return 3779 } 3780 3781 // UnmarshalMsg implements msgp.Unmarshaler 3782 func (z *replicationStats) UnmarshalMsg(bts []byte) (o []byte, err error) { 3783 var zb0001 uint32 3784 zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts) 3785 if err != nil { 3786 err = msgp.WrapError(err) 3787 return 3788 } 3789 if zb0001 != 10 { 3790 err = msgp.ArrayError{Wanted: 10, Got: zb0001} 3791 return 3792 } 3793 z.PendingSize, bts, err = msgp.ReadUint64Bytes(bts) 3794 if err != nil { 3795 err = msgp.WrapError(err, "PendingSize") 3796 return 3797 } 3798 z.ReplicatedSize, bts, err = msgp.ReadUint64Bytes(bts) 3799 if err != nil { 3800 err = msgp.WrapError(err, "ReplicatedSize") 3801 return 3802 } 3803 z.FailedSize, bts, err = msgp.ReadUint64Bytes(bts) 3804 if err != nil { 3805 err = msgp.WrapError(err, "FailedSize") 3806 return 3807 } 3808 z.FailedCount, bts, err = msgp.ReadUint64Bytes(bts) 3809 if err != nil { 3810 err = msgp.WrapError(err, "FailedCount") 3811 return 3812 } 3813 z.PendingCount, bts, err = msgp.ReadUint64Bytes(bts) 3814 if err != nil { 3815 err = msgp.WrapError(err, "PendingCount") 3816 return 3817 } 3818 z.MissedThresholdSize, bts, err = msgp.ReadUint64Bytes(bts) 3819 if err != nil { 3820 err = msgp.WrapError(err, "MissedThresholdSize") 3821 return 3822 } 3823 z.AfterThresholdSize, bts, err = msgp.ReadUint64Bytes(bts) 3824 if err != nil { 3825 err = msgp.WrapError(err, "AfterThresholdSize") 3826 return 3827 } 3828 z.MissedThresholdCount, bts, err = msgp.ReadUint64Bytes(bts) 3829 if err != nil { 3830 err = msgp.WrapError(err, "MissedThresholdCount") 3831 return 3832 } 3833 z.AfterThresholdCount, bts, err = msgp.ReadUint64Bytes(bts) 3834 if err != nil { 3835 err = msgp.WrapError(err, "AfterThresholdCount") 3836 return 3837 } 3838 z.ReplicatedCount, bts, err = msgp.ReadUint64Bytes(bts) 3839 if err != nil { 3840 err = msgp.WrapError(err, "ReplicatedCount") 3841 return 3842 } 3843 o = bts 3844 return 3845 } 3846 3847 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 3848 func (z *replicationStats) Msgsize() (s int) { 3849 s = 1 + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size 3850 return 3851 } 3852 3853 // DecodeMsg implements msgp.Decodable 3854 func (z *replicationStatsV1) DecodeMsg(dc *msgp.Reader) (err error) { 3855 var zb0001 uint32 3856 zb0001, err = dc.ReadArrayHeader() 3857 if err != nil { 3858 err = msgp.WrapError(err) 3859 return 3860 } 3861 if zb0001 != 10 { 3862 err = msgp.ArrayError{Wanted: 10, Got: zb0001} 3863 return 3864 } 3865 z.PendingSize, err = dc.ReadUint64() 3866 if err != nil { 3867 err = msgp.WrapError(err, "PendingSize") 3868 return 3869 } 3870 z.ReplicatedSize, err = dc.ReadUint64() 3871 if err != nil { 3872 err = msgp.WrapError(err, "ReplicatedSize") 3873 return 3874 } 3875 z.FailedSize, err = dc.ReadUint64() 3876 if err != nil { 3877 err = msgp.WrapError(err, "FailedSize") 3878 return 3879 } 3880 z.ReplicaSize, err = dc.ReadUint64() 3881 if err != nil { 3882 err = msgp.WrapError(err, "ReplicaSize") 3883 return 3884 } 3885 z.FailedCount, err = dc.ReadUint64() 3886 if err != nil { 3887 err = msgp.WrapError(err, "FailedCount") 3888 return 3889 } 3890 z.PendingCount, err = dc.ReadUint64() 3891 if err != nil { 3892 err = msgp.WrapError(err, "PendingCount") 3893 return 3894 } 3895 z.MissedThresholdSize, err = dc.ReadUint64() 3896 if err != nil { 3897 err = msgp.WrapError(err, "MissedThresholdSize") 3898 return 3899 } 3900 z.AfterThresholdSize, err = dc.ReadUint64() 3901 if err != nil { 3902 err = msgp.WrapError(err, "AfterThresholdSize") 3903 return 3904 } 3905 z.MissedThresholdCount, err = dc.ReadUint64() 3906 if err != nil { 3907 err = msgp.WrapError(err, "MissedThresholdCount") 3908 return 3909 } 3910 z.AfterThresholdCount, err = dc.ReadUint64() 3911 if err != nil { 3912 err = msgp.WrapError(err, "AfterThresholdCount") 3913 return 3914 } 3915 return 3916 } 3917 3918 // EncodeMsg implements msgp.Encodable 3919 func (z *replicationStatsV1) EncodeMsg(en *msgp.Writer) (err error) { 3920 // array header, size 10 3921 err = en.Append(0x9a) 3922 if err != nil { 3923 return 3924 } 3925 err = en.WriteUint64(z.PendingSize) 3926 if err != nil { 3927 err = msgp.WrapError(err, "PendingSize") 3928 return 3929 } 3930 err = en.WriteUint64(z.ReplicatedSize) 3931 if err != nil { 3932 err = msgp.WrapError(err, "ReplicatedSize") 3933 return 3934 } 3935 err = en.WriteUint64(z.FailedSize) 3936 if err != nil { 3937 err = msgp.WrapError(err, "FailedSize") 3938 return 3939 } 3940 err = en.WriteUint64(z.ReplicaSize) 3941 if err != nil { 3942 err = msgp.WrapError(err, "ReplicaSize") 3943 return 3944 } 3945 err = en.WriteUint64(z.FailedCount) 3946 if err != nil { 3947 err = msgp.WrapError(err, "FailedCount") 3948 return 3949 } 3950 err = en.WriteUint64(z.PendingCount) 3951 if err != nil { 3952 err = msgp.WrapError(err, "PendingCount") 3953 return 3954 } 3955 err = en.WriteUint64(z.MissedThresholdSize) 3956 if err != nil { 3957 err = msgp.WrapError(err, "MissedThresholdSize") 3958 return 3959 } 3960 err = en.WriteUint64(z.AfterThresholdSize) 3961 if err != nil { 3962 err = msgp.WrapError(err, "AfterThresholdSize") 3963 return 3964 } 3965 err = en.WriteUint64(z.MissedThresholdCount) 3966 if err != nil { 3967 err = msgp.WrapError(err, "MissedThresholdCount") 3968 return 3969 } 3970 err = en.WriteUint64(z.AfterThresholdCount) 3971 if err != nil { 3972 err = msgp.WrapError(err, "AfterThresholdCount") 3973 return 3974 } 3975 return 3976 } 3977 3978 // MarshalMsg implements msgp.Marshaler 3979 func (z *replicationStatsV1) MarshalMsg(b []byte) (o []byte, err error) { 3980 o = msgp.Require(b, z.Msgsize()) 3981 // array header, size 10 3982 o = append(o, 0x9a) 3983 o = msgp.AppendUint64(o, z.PendingSize) 3984 o = msgp.AppendUint64(o, z.ReplicatedSize) 3985 o = msgp.AppendUint64(o, z.FailedSize) 3986 o = msgp.AppendUint64(o, z.ReplicaSize) 3987 o = msgp.AppendUint64(o, z.FailedCount) 3988 o = msgp.AppendUint64(o, z.PendingCount) 3989 o = msgp.AppendUint64(o, z.MissedThresholdSize) 3990 o = msgp.AppendUint64(o, z.AfterThresholdSize) 3991 o = msgp.AppendUint64(o, z.MissedThresholdCount) 3992 o = msgp.AppendUint64(o, z.AfterThresholdCount) 3993 return 3994 } 3995 3996 // UnmarshalMsg implements msgp.Unmarshaler 3997 func (z *replicationStatsV1) UnmarshalMsg(bts []byte) (o []byte, err error) { 3998 var zb0001 uint32 3999 zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts) 4000 if err != nil { 4001 err = msgp.WrapError(err) 4002 return 4003 } 4004 if zb0001 != 10 { 4005 err = msgp.ArrayError{Wanted: 10, Got: zb0001} 4006 return 4007 } 4008 z.PendingSize, bts, err = msgp.ReadUint64Bytes(bts) 4009 if err != nil { 4010 err = msgp.WrapError(err, "PendingSize") 4011 return 4012 } 4013 z.ReplicatedSize, bts, err = msgp.ReadUint64Bytes(bts) 4014 if err != nil { 4015 err = msgp.WrapError(err, "ReplicatedSize") 4016 return 4017 } 4018 z.FailedSize, bts, err = msgp.ReadUint64Bytes(bts) 4019 if err != nil { 4020 err = msgp.WrapError(err, "FailedSize") 4021 return 4022 } 4023 z.ReplicaSize, bts, err = msgp.ReadUint64Bytes(bts) 4024 if err != nil { 4025 err = msgp.WrapError(err, "ReplicaSize") 4026 return 4027 } 4028 z.FailedCount, bts, err = msgp.ReadUint64Bytes(bts) 4029 if err != nil { 4030 err = msgp.WrapError(err, "FailedCount") 4031 return 4032 } 4033 z.PendingCount, bts, err = msgp.ReadUint64Bytes(bts) 4034 if err != nil { 4035 err = msgp.WrapError(err, "PendingCount") 4036 return 4037 } 4038 z.MissedThresholdSize, bts, err = msgp.ReadUint64Bytes(bts) 4039 if err != nil { 4040 err = msgp.WrapError(err, "MissedThresholdSize") 4041 return 4042 } 4043 z.AfterThresholdSize, bts, err = msgp.ReadUint64Bytes(bts) 4044 if err != nil { 4045 err = msgp.WrapError(err, "AfterThresholdSize") 4046 return 4047 } 4048 z.MissedThresholdCount, bts, err = msgp.ReadUint64Bytes(bts) 4049 if err != nil { 4050 err = msgp.WrapError(err, "MissedThresholdCount") 4051 return 4052 } 4053 z.AfterThresholdCount, bts, err = msgp.ReadUint64Bytes(bts) 4054 if err != nil { 4055 err = msgp.WrapError(err, "AfterThresholdCount") 4056 return 4057 } 4058 o = bts 4059 return 4060 } 4061 4062 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 4063 func (z *replicationStatsV1) Msgsize() (s int) { 4064 s = 1 + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size 4065 return 4066 } 4067 4068 // DecodeMsg implements msgp.Decodable 4069 func (z *sizeHistogram) DecodeMsg(dc *msgp.Reader) (err error) { 4070 var zb0001 uint32 4071 zb0001, err = dc.ReadArrayHeader() 4072 if err != nil { 4073 err = msgp.WrapError(err) 4074 return 4075 } 4076 if zb0001 != uint32(dataUsageBucketLen) { 4077 err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0001} 4078 return 4079 } 4080 for za0001 := range z { 4081 z[za0001], err = dc.ReadUint64() 4082 if err != nil { 4083 err = msgp.WrapError(err, za0001) 4084 return 4085 } 4086 } 4087 return 4088 } 4089 4090 // EncodeMsg implements msgp.Encodable 4091 func (z *sizeHistogram) EncodeMsg(en *msgp.Writer) (err error) { 4092 err = en.WriteArrayHeader(uint32(dataUsageBucketLen)) 4093 if err != nil { 4094 err = msgp.WrapError(err) 4095 return 4096 } 4097 for za0001 := range z { 4098 err = en.WriteUint64(z[za0001]) 4099 if err != nil { 4100 err = msgp.WrapError(err, za0001) 4101 return 4102 } 4103 } 4104 return 4105 } 4106 4107 // MarshalMsg implements msgp.Marshaler 4108 func (z *sizeHistogram) MarshalMsg(b []byte) (o []byte, err error) { 4109 o = msgp.Require(b, z.Msgsize()) 4110 o = msgp.AppendArrayHeader(o, uint32(dataUsageBucketLen)) 4111 for za0001 := range z { 4112 o = msgp.AppendUint64(o, z[za0001]) 4113 } 4114 return 4115 } 4116 4117 // UnmarshalMsg implements msgp.Unmarshaler 4118 func (z *sizeHistogram) UnmarshalMsg(bts []byte) (o []byte, err error) { 4119 var zb0001 uint32 4120 zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts) 4121 if err != nil { 4122 err = msgp.WrapError(err) 4123 return 4124 } 4125 if zb0001 != uint32(dataUsageBucketLen) { 4126 err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0001} 4127 return 4128 } 4129 for za0001 := range z { 4130 z[za0001], bts, err = msgp.ReadUint64Bytes(bts) 4131 if err != nil { 4132 err = msgp.WrapError(err, za0001) 4133 return 4134 } 4135 } 4136 o = bts 4137 return 4138 } 4139 4140 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 4141 func (z *sizeHistogram) Msgsize() (s int) { 4142 s = msgp.ArrayHeaderSize + (dataUsageBucketLen * (msgp.Uint64Size)) 4143 return 4144 } 4145 4146 // DecodeMsg implements msgp.Decodable 4147 func (z *sizeHistogramV1) DecodeMsg(dc *msgp.Reader) (err error) { 4148 var zb0001 uint32 4149 zb0001, err = dc.ReadArrayHeader() 4150 if err != nil { 4151 err = msgp.WrapError(err) 4152 return 4153 } 4154 if zb0001 != uint32(dataUsageBucketLenV1) { 4155 err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLenV1), Got: zb0001} 4156 return 4157 } 4158 for za0001 := range z { 4159 z[za0001], err = dc.ReadUint64() 4160 if err != nil { 4161 err = msgp.WrapError(err, za0001) 4162 return 4163 } 4164 } 4165 return 4166 } 4167 4168 // EncodeMsg implements msgp.Encodable 4169 func (z *sizeHistogramV1) EncodeMsg(en *msgp.Writer) (err error) { 4170 err = en.WriteArrayHeader(uint32(dataUsageBucketLenV1)) 4171 if err != nil { 4172 err = msgp.WrapError(err) 4173 return 4174 } 4175 for za0001 := range z { 4176 err = en.WriteUint64(z[za0001]) 4177 if err != nil { 4178 err = msgp.WrapError(err, za0001) 4179 return 4180 } 4181 } 4182 return 4183 } 4184 4185 // MarshalMsg implements msgp.Marshaler 4186 func (z *sizeHistogramV1) MarshalMsg(b []byte) (o []byte, err error) { 4187 o = msgp.Require(b, z.Msgsize()) 4188 o = msgp.AppendArrayHeader(o, uint32(dataUsageBucketLenV1)) 4189 for za0001 := range z { 4190 o = msgp.AppendUint64(o, z[za0001]) 4191 } 4192 return 4193 } 4194 4195 // UnmarshalMsg implements msgp.Unmarshaler 4196 func (z *sizeHistogramV1) UnmarshalMsg(bts []byte) (o []byte, err error) { 4197 var zb0001 uint32 4198 zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts) 4199 if err != nil { 4200 err = msgp.WrapError(err) 4201 return 4202 } 4203 if zb0001 != uint32(dataUsageBucketLenV1) { 4204 err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLenV1), Got: zb0001} 4205 return 4206 } 4207 for za0001 := range z { 4208 z[za0001], bts, err = msgp.ReadUint64Bytes(bts) 4209 if err != nil { 4210 err = msgp.WrapError(err, za0001) 4211 return 4212 } 4213 } 4214 o = bts 4215 return 4216 } 4217 4218 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 4219 func (z *sizeHistogramV1) Msgsize() (s int) { 4220 s = msgp.ArrayHeaderSize + (dataUsageBucketLenV1 * (msgp.Uint64Size)) 4221 return 4222 } 4223 4224 // DecodeMsg implements msgp.Decodable 4225 func (z *tierStats) DecodeMsg(dc *msgp.Reader) (err error) { 4226 var field []byte 4227 _ = field 4228 var zb0001 uint32 4229 zb0001, err = dc.ReadMapHeader() 4230 if err != nil { 4231 err = msgp.WrapError(err) 4232 return 4233 } 4234 for zb0001 > 0 { 4235 zb0001-- 4236 field, err = dc.ReadMapKeyPtr() 4237 if err != nil { 4238 err = msgp.WrapError(err) 4239 return 4240 } 4241 switch msgp.UnsafeString(field) { 4242 case "ts": 4243 z.TotalSize, err = dc.ReadUint64() 4244 if err != nil { 4245 err = msgp.WrapError(err, "TotalSize") 4246 return 4247 } 4248 case "nv": 4249 z.NumVersions, err = dc.ReadInt() 4250 if err != nil { 4251 err = msgp.WrapError(err, "NumVersions") 4252 return 4253 } 4254 case "no": 4255 z.NumObjects, err = dc.ReadInt() 4256 if err != nil { 4257 err = msgp.WrapError(err, "NumObjects") 4258 return 4259 } 4260 default: 4261 err = dc.Skip() 4262 if err != nil { 4263 err = msgp.WrapError(err) 4264 return 4265 } 4266 } 4267 } 4268 return 4269 } 4270 4271 // EncodeMsg implements msgp.Encodable 4272 func (z tierStats) EncodeMsg(en *msgp.Writer) (err error) { 4273 // map header, size 3 4274 // write "ts" 4275 err = en.Append(0x83, 0xa2, 0x74, 0x73) 4276 if err != nil { 4277 return 4278 } 4279 err = en.WriteUint64(z.TotalSize) 4280 if err != nil { 4281 err = msgp.WrapError(err, "TotalSize") 4282 return 4283 } 4284 // write "nv" 4285 err = en.Append(0xa2, 0x6e, 0x76) 4286 if err != nil { 4287 return 4288 } 4289 err = en.WriteInt(z.NumVersions) 4290 if err != nil { 4291 err = msgp.WrapError(err, "NumVersions") 4292 return 4293 } 4294 // write "no" 4295 err = en.Append(0xa2, 0x6e, 0x6f) 4296 if err != nil { 4297 return 4298 } 4299 err = en.WriteInt(z.NumObjects) 4300 if err != nil { 4301 err = msgp.WrapError(err, "NumObjects") 4302 return 4303 } 4304 return 4305 } 4306 4307 // MarshalMsg implements msgp.Marshaler 4308 func (z tierStats) MarshalMsg(b []byte) (o []byte, err error) { 4309 o = msgp.Require(b, z.Msgsize()) 4310 // map header, size 3 4311 // string "ts" 4312 o = append(o, 0x83, 0xa2, 0x74, 0x73) 4313 o = msgp.AppendUint64(o, z.TotalSize) 4314 // string "nv" 4315 o = append(o, 0xa2, 0x6e, 0x76) 4316 o = msgp.AppendInt(o, z.NumVersions) 4317 // string "no" 4318 o = append(o, 0xa2, 0x6e, 0x6f) 4319 o = msgp.AppendInt(o, z.NumObjects) 4320 return 4321 } 4322 4323 // UnmarshalMsg implements msgp.Unmarshaler 4324 func (z *tierStats) UnmarshalMsg(bts []byte) (o []byte, err error) { 4325 var field []byte 4326 _ = field 4327 var zb0001 uint32 4328 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 4329 if err != nil { 4330 err = msgp.WrapError(err) 4331 return 4332 } 4333 for zb0001 > 0 { 4334 zb0001-- 4335 field, bts, err = msgp.ReadMapKeyZC(bts) 4336 if err != nil { 4337 err = msgp.WrapError(err) 4338 return 4339 } 4340 switch msgp.UnsafeString(field) { 4341 case "ts": 4342 z.TotalSize, bts, err = msgp.ReadUint64Bytes(bts) 4343 if err != nil { 4344 err = msgp.WrapError(err, "TotalSize") 4345 return 4346 } 4347 case "nv": 4348 z.NumVersions, bts, err = msgp.ReadIntBytes(bts) 4349 if err != nil { 4350 err = msgp.WrapError(err, "NumVersions") 4351 return 4352 } 4353 case "no": 4354 z.NumObjects, bts, err = msgp.ReadIntBytes(bts) 4355 if err != nil { 4356 err = msgp.WrapError(err, "NumObjects") 4357 return 4358 } 4359 default: 4360 bts, err = msgp.Skip(bts) 4361 if err != nil { 4362 err = msgp.WrapError(err) 4363 return 4364 } 4365 } 4366 } 4367 o = bts 4368 return 4369 } 4370 4371 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 4372 func (z tierStats) Msgsize() (s int) { 4373 s = 1 + 3 + msgp.Uint64Size + 3 + msgp.IntSize + 3 + msgp.IntSize 4374 return 4375 } 4376 4377 // DecodeMsg implements msgp.Decodable 4378 func (z *versionsHistogram) DecodeMsg(dc *msgp.Reader) (err error) { 4379 var zb0001 uint32 4380 zb0001, err = dc.ReadArrayHeader() 4381 if err != nil { 4382 err = msgp.WrapError(err) 4383 return 4384 } 4385 if zb0001 != uint32(dataUsageVersionLen) { 4386 err = msgp.ArrayError{Wanted: uint32(dataUsageVersionLen), Got: zb0001} 4387 return 4388 } 4389 for za0001 := range z { 4390 z[za0001], err = dc.ReadUint64() 4391 if err != nil { 4392 err = msgp.WrapError(err, za0001) 4393 return 4394 } 4395 } 4396 return 4397 } 4398 4399 // EncodeMsg implements msgp.Encodable 4400 func (z *versionsHistogram) EncodeMsg(en *msgp.Writer) (err error) { 4401 err = en.WriteArrayHeader(uint32(dataUsageVersionLen)) 4402 if err != nil { 4403 err = msgp.WrapError(err) 4404 return 4405 } 4406 for za0001 := range z { 4407 err = en.WriteUint64(z[za0001]) 4408 if err != nil { 4409 err = msgp.WrapError(err, za0001) 4410 return 4411 } 4412 } 4413 return 4414 } 4415 4416 // MarshalMsg implements msgp.Marshaler 4417 func (z *versionsHistogram) MarshalMsg(b []byte) (o []byte, err error) { 4418 o = msgp.Require(b, z.Msgsize()) 4419 o = msgp.AppendArrayHeader(o, uint32(dataUsageVersionLen)) 4420 for za0001 := range z { 4421 o = msgp.AppendUint64(o, z[za0001]) 4422 } 4423 return 4424 } 4425 4426 // UnmarshalMsg implements msgp.Unmarshaler 4427 func (z *versionsHistogram) UnmarshalMsg(bts []byte) (o []byte, err error) { 4428 var zb0001 uint32 4429 zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts) 4430 if err != nil { 4431 err = msgp.WrapError(err) 4432 return 4433 } 4434 if zb0001 != uint32(dataUsageVersionLen) { 4435 err = msgp.ArrayError{Wanted: uint32(dataUsageVersionLen), Got: zb0001} 4436 return 4437 } 4438 for za0001 := range z { 4439 z[za0001], bts, err = msgp.ReadUint64Bytes(bts) 4440 if err != nil { 4441 err = msgp.WrapError(err, za0001) 4442 return 4443 } 4444 } 4445 o = bts 4446 return 4447 } 4448 4449 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 4450 func (z *versionsHistogram) Msgsize() (s int) { 4451 s = msgp.ArrayHeaderSize + (dataUsageVersionLen * (msgp.Uint64Size)) 4452 return 4453 }