github.com/minio/minio@v0.0.0-20240328213742-3f72439b8a27/cmd/last-minute_gen.go (about) 1 package cmd 2 3 // Code generated by github.com/tinylib/msgp DO NOT EDIT. 4 5 import ( 6 "github.com/tinylib/msgp/msgp" 7 ) 8 9 // DecodeMsg implements msgp.Decodable 10 func (z *AccElem) DecodeMsg(dc *msgp.Reader) (err error) { 11 var field []byte 12 _ = field 13 var zb0001 uint32 14 zb0001, err = dc.ReadMapHeader() 15 if err != nil { 16 err = msgp.WrapError(err) 17 return 18 } 19 for zb0001 > 0 { 20 zb0001-- 21 field, err = dc.ReadMapKeyPtr() 22 if err != nil { 23 err = msgp.WrapError(err) 24 return 25 } 26 switch msgp.UnsafeString(field) { 27 case "Total": 28 z.Total, err = dc.ReadInt64() 29 if err != nil { 30 err = msgp.WrapError(err, "Total") 31 return 32 } 33 case "Size": 34 z.Size, err = dc.ReadInt64() 35 if err != nil { 36 err = msgp.WrapError(err, "Size") 37 return 38 } 39 case "N": 40 z.N, err = dc.ReadInt64() 41 if err != nil { 42 err = msgp.WrapError(err, "N") 43 return 44 } 45 default: 46 err = dc.Skip() 47 if err != nil { 48 err = msgp.WrapError(err) 49 return 50 } 51 } 52 } 53 return 54 } 55 56 // EncodeMsg implements msgp.Encodable 57 func (z AccElem) EncodeMsg(en *msgp.Writer) (err error) { 58 // map header, size 3 59 // write "Total" 60 err = en.Append(0x83, 0xa5, 0x54, 0x6f, 0x74, 0x61, 0x6c) 61 if err != nil { 62 return 63 } 64 err = en.WriteInt64(z.Total) 65 if err != nil { 66 err = msgp.WrapError(err, "Total") 67 return 68 } 69 // write "Size" 70 err = en.Append(0xa4, 0x53, 0x69, 0x7a, 0x65) 71 if err != nil { 72 return 73 } 74 err = en.WriteInt64(z.Size) 75 if err != nil { 76 err = msgp.WrapError(err, "Size") 77 return 78 } 79 // write "N" 80 err = en.Append(0xa1, 0x4e) 81 if err != nil { 82 return 83 } 84 err = en.WriteInt64(z.N) 85 if err != nil { 86 err = msgp.WrapError(err, "N") 87 return 88 } 89 return 90 } 91 92 // MarshalMsg implements msgp.Marshaler 93 func (z AccElem) MarshalMsg(b []byte) (o []byte, err error) { 94 o = msgp.Require(b, z.Msgsize()) 95 // map header, size 3 96 // string "Total" 97 o = append(o, 0x83, 0xa5, 0x54, 0x6f, 0x74, 0x61, 0x6c) 98 o = msgp.AppendInt64(o, z.Total) 99 // string "Size" 100 o = append(o, 0xa4, 0x53, 0x69, 0x7a, 0x65) 101 o = msgp.AppendInt64(o, z.Size) 102 // string "N" 103 o = append(o, 0xa1, 0x4e) 104 o = msgp.AppendInt64(o, z.N) 105 return 106 } 107 108 // UnmarshalMsg implements msgp.Unmarshaler 109 func (z *AccElem) UnmarshalMsg(bts []byte) (o []byte, err error) { 110 var field []byte 111 _ = field 112 var zb0001 uint32 113 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 114 if err != nil { 115 err = msgp.WrapError(err) 116 return 117 } 118 for zb0001 > 0 { 119 zb0001-- 120 field, bts, err = msgp.ReadMapKeyZC(bts) 121 if err != nil { 122 err = msgp.WrapError(err) 123 return 124 } 125 switch msgp.UnsafeString(field) { 126 case "Total": 127 z.Total, bts, err = msgp.ReadInt64Bytes(bts) 128 if err != nil { 129 err = msgp.WrapError(err, "Total") 130 return 131 } 132 case "Size": 133 z.Size, bts, err = msgp.ReadInt64Bytes(bts) 134 if err != nil { 135 err = msgp.WrapError(err, "Size") 136 return 137 } 138 case "N": 139 z.N, bts, err = msgp.ReadInt64Bytes(bts) 140 if err != nil { 141 err = msgp.WrapError(err, "N") 142 return 143 } 144 default: 145 bts, err = msgp.Skip(bts) 146 if err != nil { 147 err = msgp.WrapError(err) 148 return 149 } 150 } 151 } 152 o = bts 153 return 154 } 155 156 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 157 func (z AccElem) Msgsize() (s int) { 158 s = 1 + 6 + msgp.Int64Size + 5 + msgp.Int64Size + 2 + msgp.Int64Size 159 return 160 } 161 162 // DecodeMsg implements msgp.Decodable 163 func (z *LastMinuteHistogram) DecodeMsg(dc *msgp.Reader) (err error) { 164 var zb0001 uint32 165 zb0001, err = dc.ReadArrayHeader() 166 if err != nil { 167 err = msgp.WrapError(err) 168 return 169 } 170 if zb0001 != uint32(sizeLastElemMarker) { 171 err = msgp.ArrayError{Wanted: uint32(sizeLastElemMarker), Got: zb0001} 172 return 173 } 174 for za0001 := range z { 175 var field []byte 176 _ = field 177 var zb0002 uint32 178 zb0002, err = dc.ReadMapHeader() 179 if err != nil { 180 err = msgp.WrapError(err, za0001) 181 return 182 } 183 for zb0002 > 0 { 184 zb0002-- 185 field, err = dc.ReadMapKeyPtr() 186 if err != nil { 187 err = msgp.WrapError(err, za0001) 188 return 189 } 190 switch msgp.UnsafeString(field) { 191 case "Totals": 192 var zb0003 uint32 193 zb0003, err = dc.ReadArrayHeader() 194 if err != nil { 195 err = msgp.WrapError(err, za0001, "Totals") 196 return 197 } 198 if zb0003 != uint32(60) { 199 err = msgp.ArrayError{Wanted: uint32(60), Got: zb0003} 200 return 201 } 202 for za0002 := range z[za0001].Totals { 203 var zb0004 uint32 204 zb0004, err = dc.ReadMapHeader() 205 if err != nil { 206 err = msgp.WrapError(err, za0001, "Totals", za0002) 207 return 208 } 209 for zb0004 > 0 { 210 zb0004-- 211 field, err = dc.ReadMapKeyPtr() 212 if err != nil { 213 err = msgp.WrapError(err, za0001, "Totals", za0002) 214 return 215 } 216 switch msgp.UnsafeString(field) { 217 case "Total": 218 z[za0001].Totals[za0002].Total, err = dc.ReadInt64() 219 if err != nil { 220 err = msgp.WrapError(err, za0001, "Totals", za0002, "Total") 221 return 222 } 223 case "Size": 224 z[za0001].Totals[za0002].Size, err = dc.ReadInt64() 225 if err != nil { 226 err = msgp.WrapError(err, za0001, "Totals", za0002, "Size") 227 return 228 } 229 case "N": 230 z[za0001].Totals[za0002].N, err = dc.ReadInt64() 231 if err != nil { 232 err = msgp.WrapError(err, za0001, "Totals", za0002, "N") 233 return 234 } 235 default: 236 err = dc.Skip() 237 if err != nil { 238 err = msgp.WrapError(err, za0001, "Totals", za0002) 239 return 240 } 241 } 242 } 243 } 244 case "LastSec": 245 z[za0001].LastSec, err = dc.ReadInt64() 246 if err != nil { 247 err = msgp.WrapError(err, za0001, "LastSec") 248 return 249 } 250 default: 251 err = dc.Skip() 252 if err != nil { 253 err = msgp.WrapError(err, za0001) 254 return 255 } 256 } 257 } 258 } 259 return 260 } 261 262 // EncodeMsg implements msgp.Encodable 263 func (z *LastMinuteHistogram) EncodeMsg(en *msgp.Writer) (err error) { 264 err = en.WriteArrayHeader(uint32(sizeLastElemMarker)) 265 if err != nil { 266 err = msgp.WrapError(err) 267 return 268 } 269 for za0001 := range z { 270 // map header, size 2 271 // write "Totals" 272 err = en.Append(0x82, 0xa6, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x73) 273 if err != nil { 274 return 275 } 276 err = en.WriteArrayHeader(uint32(60)) 277 if err != nil { 278 err = msgp.WrapError(err, za0001, "Totals") 279 return 280 } 281 for za0002 := range z[za0001].Totals { 282 // map header, size 3 283 // write "Total" 284 err = en.Append(0x83, 0xa5, 0x54, 0x6f, 0x74, 0x61, 0x6c) 285 if err != nil { 286 return 287 } 288 err = en.WriteInt64(z[za0001].Totals[za0002].Total) 289 if err != nil { 290 err = msgp.WrapError(err, za0001, "Totals", za0002, "Total") 291 return 292 } 293 // write "Size" 294 err = en.Append(0xa4, 0x53, 0x69, 0x7a, 0x65) 295 if err != nil { 296 return 297 } 298 err = en.WriteInt64(z[za0001].Totals[za0002].Size) 299 if err != nil { 300 err = msgp.WrapError(err, za0001, "Totals", za0002, "Size") 301 return 302 } 303 // write "N" 304 err = en.Append(0xa1, 0x4e) 305 if err != nil { 306 return 307 } 308 err = en.WriteInt64(z[za0001].Totals[za0002].N) 309 if err != nil { 310 err = msgp.WrapError(err, za0001, "Totals", za0002, "N") 311 return 312 } 313 } 314 // write "LastSec" 315 err = en.Append(0xa7, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x63) 316 if err != nil { 317 return 318 } 319 err = en.WriteInt64(z[za0001].LastSec) 320 if err != nil { 321 err = msgp.WrapError(err, za0001, "LastSec") 322 return 323 } 324 } 325 return 326 } 327 328 // MarshalMsg implements msgp.Marshaler 329 func (z *LastMinuteHistogram) MarshalMsg(b []byte) (o []byte, err error) { 330 o = msgp.Require(b, z.Msgsize()) 331 o = msgp.AppendArrayHeader(o, uint32(sizeLastElemMarker)) 332 for za0001 := range z { 333 // map header, size 2 334 // string "Totals" 335 o = append(o, 0x82, 0xa6, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x73) 336 o = msgp.AppendArrayHeader(o, uint32(60)) 337 for za0002 := range z[za0001].Totals { 338 // map header, size 3 339 // string "Total" 340 o = append(o, 0x83, 0xa5, 0x54, 0x6f, 0x74, 0x61, 0x6c) 341 o = msgp.AppendInt64(o, z[za0001].Totals[za0002].Total) 342 // string "Size" 343 o = append(o, 0xa4, 0x53, 0x69, 0x7a, 0x65) 344 o = msgp.AppendInt64(o, z[za0001].Totals[za0002].Size) 345 // string "N" 346 o = append(o, 0xa1, 0x4e) 347 o = msgp.AppendInt64(o, z[za0001].Totals[za0002].N) 348 } 349 // string "LastSec" 350 o = append(o, 0xa7, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x63) 351 o = msgp.AppendInt64(o, z[za0001].LastSec) 352 } 353 return 354 } 355 356 // UnmarshalMsg implements msgp.Unmarshaler 357 func (z *LastMinuteHistogram) UnmarshalMsg(bts []byte) (o []byte, err error) { 358 var zb0001 uint32 359 zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts) 360 if err != nil { 361 err = msgp.WrapError(err) 362 return 363 } 364 if zb0001 != uint32(sizeLastElemMarker) { 365 err = msgp.ArrayError{Wanted: uint32(sizeLastElemMarker), Got: zb0001} 366 return 367 } 368 for za0001 := range z { 369 var field []byte 370 _ = field 371 var zb0002 uint32 372 zb0002, bts, err = msgp.ReadMapHeaderBytes(bts) 373 if err != nil { 374 err = msgp.WrapError(err, za0001) 375 return 376 } 377 for zb0002 > 0 { 378 zb0002-- 379 field, bts, err = msgp.ReadMapKeyZC(bts) 380 if err != nil { 381 err = msgp.WrapError(err, za0001) 382 return 383 } 384 switch msgp.UnsafeString(field) { 385 case "Totals": 386 var zb0003 uint32 387 zb0003, bts, err = msgp.ReadArrayHeaderBytes(bts) 388 if err != nil { 389 err = msgp.WrapError(err, za0001, "Totals") 390 return 391 } 392 if zb0003 != uint32(60) { 393 err = msgp.ArrayError{Wanted: uint32(60), Got: zb0003} 394 return 395 } 396 for za0002 := range z[za0001].Totals { 397 var zb0004 uint32 398 zb0004, bts, err = msgp.ReadMapHeaderBytes(bts) 399 if err != nil { 400 err = msgp.WrapError(err, za0001, "Totals", za0002) 401 return 402 } 403 for zb0004 > 0 { 404 zb0004-- 405 field, bts, err = msgp.ReadMapKeyZC(bts) 406 if err != nil { 407 err = msgp.WrapError(err, za0001, "Totals", za0002) 408 return 409 } 410 switch msgp.UnsafeString(field) { 411 case "Total": 412 z[za0001].Totals[za0002].Total, bts, err = msgp.ReadInt64Bytes(bts) 413 if err != nil { 414 err = msgp.WrapError(err, za0001, "Totals", za0002, "Total") 415 return 416 } 417 case "Size": 418 z[za0001].Totals[za0002].Size, bts, err = msgp.ReadInt64Bytes(bts) 419 if err != nil { 420 err = msgp.WrapError(err, za0001, "Totals", za0002, "Size") 421 return 422 } 423 case "N": 424 z[za0001].Totals[za0002].N, bts, err = msgp.ReadInt64Bytes(bts) 425 if err != nil { 426 err = msgp.WrapError(err, za0001, "Totals", za0002, "N") 427 return 428 } 429 default: 430 bts, err = msgp.Skip(bts) 431 if err != nil { 432 err = msgp.WrapError(err, za0001, "Totals", za0002) 433 return 434 } 435 } 436 } 437 } 438 case "LastSec": 439 z[za0001].LastSec, bts, err = msgp.ReadInt64Bytes(bts) 440 if err != nil { 441 err = msgp.WrapError(err, za0001, "LastSec") 442 return 443 } 444 default: 445 bts, err = msgp.Skip(bts) 446 if err != nil { 447 err = msgp.WrapError(err, za0001) 448 return 449 } 450 } 451 } 452 } 453 o = bts 454 return 455 } 456 457 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 458 func (z *LastMinuteHistogram) Msgsize() (s int) { 459 s = msgp.ArrayHeaderSize + (sizeLastElemMarker * (16 + (60 * (14 + msgp.Int64Size + msgp.Int64Size + msgp.Int64Size)) + msgp.Int64Size)) 460 return 461 } 462 463 // DecodeMsg implements msgp.Decodable 464 func (z *lastMinuteLatency) DecodeMsg(dc *msgp.Reader) (err error) { 465 var field []byte 466 _ = field 467 var zb0001 uint32 468 zb0001, err = dc.ReadMapHeader() 469 if err != nil { 470 err = msgp.WrapError(err) 471 return 472 } 473 for zb0001 > 0 { 474 zb0001-- 475 field, err = dc.ReadMapKeyPtr() 476 if err != nil { 477 err = msgp.WrapError(err) 478 return 479 } 480 switch msgp.UnsafeString(field) { 481 case "Totals": 482 var zb0002 uint32 483 zb0002, err = dc.ReadArrayHeader() 484 if err != nil { 485 err = msgp.WrapError(err, "Totals") 486 return 487 } 488 if zb0002 != uint32(60) { 489 err = msgp.ArrayError{Wanted: uint32(60), Got: zb0002} 490 return 491 } 492 for za0001 := range z.Totals { 493 var zb0003 uint32 494 zb0003, err = dc.ReadMapHeader() 495 if err != nil { 496 err = msgp.WrapError(err, "Totals", za0001) 497 return 498 } 499 for zb0003 > 0 { 500 zb0003-- 501 field, err = dc.ReadMapKeyPtr() 502 if err != nil { 503 err = msgp.WrapError(err, "Totals", za0001) 504 return 505 } 506 switch msgp.UnsafeString(field) { 507 case "Total": 508 z.Totals[za0001].Total, err = dc.ReadInt64() 509 if err != nil { 510 err = msgp.WrapError(err, "Totals", za0001, "Total") 511 return 512 } 513 case "Size": 514 z.Totals[za0001].Size, err = dc.ReadInt64() 515 if err != nil { 516 err = msgp.WrapError(err, "Totals", za0001, "Size") 517 return 518 } 519 case "N": 520 z.Totals[za0001].N, err = dc.ReadInt64() 521 if err != nil { 522 err = msgp.WrapError(err, "Totals", za0001, "N") 523 return 524 } 525 default: 526 err = dc.Skip() 527 if err != nil { 528 err = msgp.WrapError(err, "Totals", za0001) 529 return 530 } 531 } 532 } 533 } 534 case "LastSec": 535 z.LastSec, err = dc.ReadInt64() 536 if err != nil { 537 err = msgp.WrapError(err, "LastSec") 538 return 539 } 540 default: 541 err = dc.Skip() 542 if err != nil { 543 err = msgp.WrapError(err) 544 return 545 } 546 } 547 } 548 return 549 } 550 551 // EncodeMsg implements msgp.Encodable 552 func (z *lastMinuteLatency) EncodeMsg(en *msgp.Writer) (err error) { 553 // map header, size 2 554 // write "Totals" 555 err = en.Append(0x82, 0xa6, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x73) 556 if err != nil { 557 return 558 } 559 err = en.WriteArrayHeader(uint32(60)) 560 if err != nil { 561 err = msgp.WrapError(err, "Totals") 562 return 563 } 564 for za0001 := range z.Totals { 565 // map header, size 3 566 // write "Total" 567 err = en.Append(0x83, 0xa5, 0x54, 0x6f, 0x74, 0x61, 0x6c) 568 if err != nil { 569 return 570 } 571 err = en.WriteInt64(z.Totals[za0001].Total) 572 if err != nil { 573 err = msgp.WrapError(err, "Totals", za0001, "Total") 574 return 575 } 576 // write "Size" 577 err = en.Append(0xa4, 0x53, 0x69, 0x7a, 0x65) 578 if err != nil { 579 return 580 } 581 err = en.WriteInt64(z.Totals[za0001].Size) 582 if err != nil { 583 err = msgp.WrapError(err, "Totals", za0001, "Size") 584 return 585 } 586 // write "N" 587 err = en.Append(0xa1, 0x4e) 588 if err != nil { 589 return 590 } 591 err = en.WriteInt64(z.Totals[za0001].N) 592 if err != nil { 593 err = msgp.WrapError(err, "Totals", za0001, "N") 594 return 595 } 596 } 597 // write "LastSec" 598 err = en.Append(0xa7, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x63) 599 if err != nil { 600 return 601 } 602 err = en.WriteInt64(z.LastSec) 603 if err != nil { 604 err = msgp.WrapError(err, "LastSec") 605 return 606 } 607 return 608 } 609 610 // MarshalMsg implements msgp.Marshaler 611 func (z *lastMinuteLatency) MarshalMsg(b []byte) (o []byte, err error) { 612 o = msgp.Require(b, z.Msgsize()) 613 // map header, size 2 614 // string "Totals" 615 o = append(o, 0x82, 0xa6, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x73) 616 o = msgp.AppendArrayHeader(o, uint32(60)) 617 for za0001 := range z.Totals { 618 // map header, size 3 619 // string "Total" 620 o = append(o, 0x83, 0xa5, 0x54, 0x6f, 0x74, 0x61, 0x6c) 621 o = msgp.AppendInt64(o, z.Totals[za0001].Total) 622 // string "Size" 623 o = append(o, 0xa4, 0x53, 0x69, 0x7a, 0x65) 624 o = msgp.AppendInt64(o, z.Totals[za0001].Size) 625 // string "N" 626 o = append(o, 0xa1, 0x4e) 627 o = msgp.AppendInt64(o, z.Totals[za0001].N) 628 } 629 // string "LastSec" 630 o = append(o, 0xa7, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x63) 631 o = msgp.AppendInt64(o, z.LastSec) 632 return 633 } 634 635 // UnmarshalMsg implements msgp.Unmarshaler 636 func (z *lastMinuteLatency) UnmarshalMsg(bts []byte) (o []byte, err error) { 637 var field []byte 638 _ = field 639 var zb0001 uint32 640 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 641 if err != nil { 642 err = msgp.WrapError(err) 643 return 644 } 645 for zb0001 > 0 { 646 zb0001-- 647 field, bts, err = msgp.ReadMapKeyZC(bts) 648 if err != nil { 649 err = msgp.WrapError(err) 650 return 651 } 652 switch msgp.UnsafeString(field) { 653 case "Totals": 654 var zb0002 uint32 655 zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) 656 if err != nil { 657 err = msgp.WrapError(err, "Totals") 658 return 659 } 660 if zb0002 != uint32(60) { 661 err = msgp.ArrayError{Wanted: uint32(60), Got: zb0002} 662 return 663 } 664 for za0001 := range z.Totals { 665 var zb0003 uint32 666 zb0003, bts, err = msgp.ReadMapHeaderBytes(bts) 667 if err != nil { 668 err = msgp.WrapError(err, "Totals", za0001) 669 return 670 } 671 for zb0003 > 0 { 672 zb0003-- 673 field, bts, err = msgp.ReadMapKeyZC(bts) 674 if err != nil { 675 err = msgp.WrapError(err, "Totals", za0001) 676 return 677 } 678 switch msgp.UnsafeString(field) { 679 case "Total": 680 z.Totals[za0001].Total, bts, err = msgp.ReadInt64Bytes(bts) 681 if err != nil { 682 err = msgp.WrapError(err, "Totals", za0001, "Total") 683 return 684 } 685 case "Size": 686 z.Totals[za0001].Size, bts, err = msgp.ReadInt64Bytes(bts) 687 if err != nil { 688 err = msgp.WrapError(err, "Totals", za0001, "Size") 689 return 690 } 691 case "N": 692 z.Totals[za0001].N, bts, err = msgp.ReadInt64Bytes(bts) 693 if err != nil { 694 err = msgp.WrapError(err, "Totals", za0001, "N") 695 return 696 } 697 default: 698 bts, err = msgp.Skip(bts) 699 if err != nil { 700 err = msgp.WrapError(err, "Totals", za0001) 701 return 702 } 703 } 704 } 705 } 706 case "LastSec": 707 z.LastSec, bts, err = msgp.ReadInt64Bytes(bts) 708 if err != nil { 709 err = msgp.WrapError(err, "LastSec") 710 return 711 } 712 default: 713 bts, err = msgp.Skip(bts) 714 if err != nil { 715 err = msgp.WrapError(err) 716 return 717 } 718 } 719 } 720 o = bts 721 return 722 } 723 724 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 725 func (z *lastMinuteLatency) Msgsize() (s int) { 726 s = 1 + 7 + msgp.ArrayHeaderSize + (60 * (14 + msgp.Int64Size + msgp.Int64Size + msgp.Int64Size)) + 8 + msgp.Int64Size 727 return 728 }