github.com/minio/minio@v0.0.0-20240328213742-3f72439b8a27/cmd/bucket-stats_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 *BucketReplicationStat) 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 "ReplicatedSize": 28 z.ReplicatedSize, err = dc.ReadInt64() 29 if err != nil { 30 err = msgp.WrapError(err, "ReplicatedSize") 31 return 32 } 33 case "ReplicaSize": 34 z.ReplicaSize, err = dc.ReadInt64() 35 if err != nil { 36 err = msgp.WrapError(err, "ReplicaSize") 37 return 38 } 39 case "FailStats": 40 err = z.FailStats.DecodeMsg(dc) 41 if err != nil { 42 err = msgp.WrapError(err, "FailStats") 43 return 44 } 45 case "Failed": 46 err = z.Failed.DecodeMsg(dc) 47 if err != nil { 48 err = msgp.WrapError(err, "Failed") 49 return 50 } 51 case "ReplicatedCount": 52 z.ReplicatedCount, err = dc.ReadInt64() 53 if err != nil { 54 err = msgp.WrapError(err, "ReplicatedCount") 55 return 56 } 57 case "Latency": 58 var zb0002 uint32 59 zb0002, err = dc.ReadMapHeader() 60 if err != nil { 61 err = msgp.WrapError(err, "Latency") 62 return 63 } 64 for zb0002 > 0 { 65 zb0002-- 66 field, err = dc.ReadMapKeyPtr() 67 if err != nil { 68 err = msgp.WrapError(err, "Latency") 69 return 70 } 71 switch msgp.UnsafeString(field) { 72 case "UploadHistogram": 73 err = z.Latency.UploadHistogram.DecodeMsg(dc) 74 if err != nil { 75 err = msgp.WrapError(err, "Latency", "UploadHistogram") 76 return 77 } 78 default: 79 err = dc.Skip() 80 if err != nil { 81 err = msgp.WrapError(err, "Latency") 82 return 83 } 84 } 85 } 86 case "BandWidthLimitInBytesPerSecond": 87 z.BandWidthLimitInBytesPerSecond, err = dc.ReadInt64() 88 if err != nil { 89 err = msgp.WrapError(err, "BandWidthLimitInBytesPerSecond") 90 return 91 } 92 case "CurrentBandwidthInBytesPerSecond": 93 z.CurrentBandwidthInBytesPerSecond, err = dc.ReadFloat64() 94 if err != nil { 95 err = msgp.WrapError(err, "CurrentBandwidthInBytesPerSecond") 96 return 97 } 98 case "lt": 99 if dc.IsNil() { 100 err = dc.ReadNil() 101 if err != nil { 102 err = msgp.WrapError(err, "XferRateLrg") 103 return 104 } 105 z.XferRateLrg = nil 106 } else { 107 if z.XferRateLrg == nil { 108 z.XferRateLrg = new(XferStats) 109 } 110 err = z.XferRateLrg.DecodeMsg(dc) 111 if err != nil { 112 err = msgp.WrapError(err, "XferRateLrg") 113 return 114 } 115 } 116 case "st": 117 if dc.IsNil() { 118 err = dc.ReadNil() 119 if err != nil { 120 err = msgp.WrapError(err, "XferRateSml") 121 return 122 } 123 z.XferRateSml = nil 124 } else { 125 if z.XferRateSml == nil { 126 z.XferRateSml = new(XferStats) 127 } 128 err = z.XferRateSml.DecodeMsg(dc) 129 if err != nil { 130 err = msgp.WrapError(err, "XferRateSml") 131 return 132 } 133 } 134 case "PendingSize": 135 z.PendingSize, err = dc.ReadInt64() 136 if err != nil { 137 err = msgp.WrapError(err, "PendingSize") 138 return 139 } 140 case "FailedSize": 141 z.FailedSize, err = dc.ReadInt64() 142 if err != nil { 143 err = msgp.WrapError(err, "FailedSize") 144 return 145 } 146 case "PendingCount": 147 z.PendingCount, err = dc.ReadInt64() 148 if err != nil { 149 err = msgp.WrapError(err, "PendingCount") 150 return 151 } 152 case "FailedCount": 153 z.FailedCount, err = dc.ReadInt64() 154 if err != nil { 155 err = msgp.WrapError(err, "FailedCount") 156 return 157 } 158 default: 159 err = dc.Skip() 160 if err != nil { 161 err = msgp.WrapError(err) 162 return 163 } 164 } 165 } 166 return 167 } 168 169 // EncodeMsg implements msgp.Encodable 170 func (z *BucketReplicationStat) EncodeMsg(en *msgp.Writer) (err error) { 171 // map header, size 14 172 // write "ReplicatedSize" 173 err = en.Append(0x8e, 0xae, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65) 174 if err != nil { 175 return 176 } 177 err = en.WriteInt64(z.ReplicatedSize) 178 if err != nil { 179 err = msgp.WrapError(err, "ReplicatedSize") 180 return 181 } 182 // write "ReplicaSize" 183 err = en.Append(0xab, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x69, 0x7a, 0x65) 184 if err != nil { 185 return 186 } 187 err = en.WriteInt64(z.ReplicaSize) 188 if err != nil { 189 err = msgp.WrapError(err, "ReplicaSize") 190 return 191 } 192 // write "FailStats" 193 err = en.Append(0xa9, 0x46, 0x61, 0x69, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x73) 194 if err != nil { 195 return 196 } 197 err = z.FailStats.EncodeMsg(en) 198 if err != nil { 199 err = msgp.WrapError(err, "FailStats") 200 return 201 } 202 // write "Failed" 203 err = en.Append(0xa6, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64) 204 if err != nil { 205 return 206 } 207 err = z.Failed.EncodeMsg(en) 208 if err != nil { 209 err = msgp.WrapError(err, "Failed") 210 return 211 } 212 // write "ReplicatedCount" 213 err = en.Append(0xaf, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74) 214 if err != nil { 215 return 216 } 217 err = en.WriteInt64(z.ReplicatedCount) 218 if err != nil { 219 err = msgp.WrapError(err, "ReplicatedCount") 220 return 221 } 222 // write "Latency" 223 err = en.Append(0xa7, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79) 224 if err != nil { 225 return 226 } 227 // map header, size 1 228 // write "UploadHistogram" 229 err = en.Append(0x81, 0xaf, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d) 230 if err != nil { 231 return 232 } 233 err = z.Latency.UploadHistogram.EncodeMsg(en) 234 if err != nil { 235 err = msgp.WrapError(err, "Latency", "UploadHistogram") 236 return 237 } 238 // write "BandWidthLimitInBytesPerSecond" 239 err = en.Append(0xbe, 0x42, 0x61, 0x6e, 0x64, 0x57, 0x69, 0x64, 0x74, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x50, 0x65, 0x72, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64) 240 if err != nil { 241 return 242 } 243 err = en.WriteInt64(z.BandWidthLimitInBytesPerSecond) 244 if err != nil { 245 err = msgp.WrapError(err, "BandWidthLimitInBytesPerSecond") 246 return 247 } 248 // write "CurrentBandwidthInBytesPerSecond" 249 err = en.Append(0xd9, 0x20, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x49, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x50, 0x65, 0x72, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64) 250 if err != nil { 251 return 252 } 253 err = en.WriteFloat64(z.CurrentBandwidthInBytesPerSecond) 254 if err != nil { 255 err = msgp.WrapError(err, "CurrentBandwidthInBytesPerSecond") 256 return 257 } 258 // write "lt" 259 err = en.Append(0xa2, 0x6c, 0x74) 260 if err != nil { 261 return 262 } 263 if z.XferRateLrg == nil { 264 err = en.WriteNil() 265 if err != nil { 266 return 267 } 268 } else { 269 err = z.XferRateLrg.EncodeMsg(en) 270 if err != nil { 271 err = msgp.WrapError(err, "XferRateLrg") 272 return 273 } 274 } 275 // write "st" 276 err = en.Append(0xa2, 0x73, 0x74) 277 if err != nil { 278 return 279 } 280 if z.XferRateSml == nil { 281 err = en.WriteNil() 282 if err != nil { 283 return 284 } 285 } else { 286 err = z.XferRateSml.EncodeMsg(en) 287 if err != nil { 288 err = msgp.WrapError(err, "XferRateSml") 289 return 290 } 291 } 292 // write "PendingSize" 293 err = en.Append(0xab, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65) 294 if err != nil { 295 return 296 } 297 err = en.WriteInt64(z.PendingSize) 298 if err != nil { 299 err = msgp.WrapError(err, "PendingSize") 300 return 301 } 302 // write "FailedSize" 303 err = en.Append(0xaa, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65) 304 if err != nil { 305 return 306 } 307 err = en.WriteInt64(z.FailedSize) 308 if err != nil { 309 err = msgp.WrapError(err, "FailedSize") 310 return 311 } 312 // write "PendingCount" 313 err = en.Append(0xac, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74) 314 if err != nil { 315 return 316 } 317 err = en.WriteInt64(z.PendingCount) 318 if err != nil { 319 err = msgp.WrapError(err, "PendingCount") 320 return 321 } 322 // write "FailedCount" 323 err = en.Append(0xab, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74) 324 if err != nil { 325 return 326 } 327 err = en.WriteInt64(z.FailedCount) 328 if err != nil { 329 err = msgp.WrapError(err, "FailedCount") 330 return 331 } 332 return 333 } 334 335 // MarshalMsg implements msgp.Marshaler 336 func (z *BucketReplicationStat) MarshalMsg(b []byte) (o []byte, err error) { 337 o = msgp.Require(b, z.Msgsize()) 338 // map header, size 14 339 // string "ReplicatedSize" 340 o = append(o, 0x8e, 0xae, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65) 341 o = msgp.AppendInt64(o, z.ReplicatedSize) 342 // string "ReplicaSize" 343 o = append(o, 0xab, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x69, 0x7a, 0x65) 344 o = msgp.AppendInt64(o, z.ReplicaSize) 345 // string "FailStats" 346 o = append(o, 0xa9, 0x46, 0x61, 0x69, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x73) 347 o, err = z.FailStats.MarshalMsg(o) 348 if err != nil { 349 err = msgp.WrapError(err, "FailStats") 350 return 351 } 352 // string "Failed" 353 o = append(o, 0xa6, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64) 354 o, err = z.Failed.MarshalMsg(o) 355 if err != nil { 356 err = msgp.WrapError(err, "Failed") 357 return 358 } 359 // string "ReplicatedCount" 360 o = append(o, 0xaf, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74) 361 o = msgp.AppendInt64(o, z.ReplicatedCount) 362 // string "Latency" 363 o = append(o, 0xa7, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79) 364 // map header, size 1 365 // string "UploadHistogram" 366 o = append(o, 0x81, 0xaf, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d) 367 o, err = z.Latency.UploadHistogram.MarshalMsg(o) 368 if err != nil { 369 err = msgp.WrapError(err, "Latency", "UploadHistogram") 370 return 371 } 372 // string "BandWidthLimitInBytesPerSecond" 373 o = append(o, 0xbe, 0x42, 0x61, 0x6e, 0x64, 0x57, 0x69, 0x64, 0x74, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x50, 0x65, 0x72, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64) 374 o = msgp.AppendInt64(o, z.BandWidthLimitInBytesPerSecond) 375 // string "CurrentBandwidthInBytesPerSecond" 376 o = append(o, 0xd9, 0x20, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x6e, 0x64, 0x77, 0x69, 0x64, 0x74, 0x68, 0x49, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x50, 0x65, 0x72, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64) 377 o = msgp.AppendFloat64(o, z.CurrentBandwidthInBytesPerSecond) 378 // string "lt" 379 o = append(o, 0xa2, 0x6c, 0x74) 380 if z.XferRateLrg == nil { 381 o = msgp.AppendNil(o) 382 } else { 383 o, err = z.XferRateLrg.MarshalMsg(o) 384 if err != nil { 385 err = msgp.WrapError(err, "XferRateLrg") 386 return 387 } 388 } 389 // string "st" 390 o = append(o, 0xa2, 0x73, 0x74) 391 if z.XferRateSml == nil { 392 o = msgp.AppendNil(o) 393 } else { 394 o, err = z.XferRateSml.MarshalMsg(o) 395 if err != nil { 396 err = msgp.WrapError(err, "XferRateSml") 397 return 398 } 399 } 400 // string "PendingSize" 401 o = append(o, 0xab, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65) 402 o = msgp.AppendInt64(o, z.PendingSize) 403 // string "FailedSize" 404 o = append(o, 0xaa, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65) 405 o = msgp.AppendInt64(o, z.FailedSize) 406 // string "PendingCount" 407 o = append(o, 0xac, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74) 408 o = msgp.AppendInt64(o, z.PendingCount) 409 // string "FailedCount" 410 o = append(o, 0xab, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74) 411 o = msgp.AppendInt64(o, z.FailedCount) 412 return 413 } 414 415 // UnmarshalMsg implements msgp.Unmarshaler 416 func (z *BucketReplicationStat) UnmarshalMsg(bts []byte) (o []byte, err error) { 417 var field []byte 418 _ = field 419 var zb0001 uint32 420 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 421 if err != nil { 422 err = msgp.WrapError(err) 423 return 424 } 425 for zb0001 > 0 { 426 zb0001-- 427 field, bts, err = msgp.ReadMapKeyZC(bts) 428 if err != nil { 429 err = msgp.WrapError(err) 430 return 431 } 432 switch msgp.UnsafeString(field) { 433 case "ReplicatedSize": 434 z.ReplicatedSize, bts, err = msgp.ReadInt64Bytes(bts) 435 if err != nil { 436 err = msgp.WrapError(err, "ReplicatedSize") 437 return 438 } 439 case "ReplicaSize": 440 z.ReplicaSize, bts, err = msgp.ReadInt64Bytes(bts) 441 if err != nil { 442 err = msgp.WrapError(err, "ReplicaSize") 443 return 444 } 445 case "FailStats": 446 bts, err = z.FailStats.UnmarshalMsg(bts) 447 if err != nil { 448 err = msgp.WrapError(err, "FailStats") 449 return 450 } 451 case "Failed": 452 bts, err = z.Failed.UnmarshalMsg(bts) 453 if err != nil { 454 err = msgp.WrapError(err, "Failed") 455 return 456 } 457 case "ReplicatedCount": 458 z.ReplicatedCount, bts, err = msgp.ReadInt64Bytes(bts) 459 if err != nil { 460 err = msgp.WrapError(err, "ReplicatedCount") 461 return 462 } 463 case "Latency": 464 var zb0002 uint32 465 zb0002, bts, err = msgp.ReadMapHeaderBytes(bts) 466 if err != nil { 467 err = msgp.WrapError(err, "Latency") 468 return 469 } 470 for zb0002 > 0 { 471 zb0002-- 472 field, bts, err = msgp.ReadMapKeyZC(bts) 473 if err != nil { 474 err = msgp.WrapError(err, "Latency") 475 return 476 } 477 switch msgp.UnsafeString(field) { 478 case "UploadHistogram": 479 bts, err = z.Latency.UploadHistogram.UnmarshalMsg(bts) 480 if err != nil { 481 err = msgp.WrapError(err, "Latency", "UploadHistogram") 482 return 483 } 484 default: 485 bts, err = msgp.Skip(bts) 486 if err != nil { 487 err = msgp.WrapError(err, "Latency") 488 return 489 } 490 } 491 } 492 case "BandWidthLimitInBytesPerSecond": 493 z.BandWidthLimitInBytesPerSecond, bts, err = msgp.ReadInt64Bytes(bts) 494 if err != nil { 495 err = msgp.WrapError(err, "BandWidthLimitInBytesPerSecond") 496 return 497 } 498 case "CurrentBandwidthInBytesPerSecond": 499 z.CurrentBandwidthInBytesPerSecond, bts, err = msgp.ReadFloat64Bytes(bts) 500 if err != nil { 501 err = msgp.WrapError(err, "CurrentBandwidthInBytesPerSecond") 502 return 503 } 504 case "lt": 505 if msgp.IsNil(bts) { 506 bts, err = msgp.ReadNilBytes(bts) 507 if err != nil { 508 return 509 } 510 z.XferRateLrg = nil 511 } else { 512 if z.XferRateLrg == nil { 513 z.XferRateLrg = new(XferStats) 514 } 515 bts, err = z.XferRateLrg.UnmarshalMsg(bts) 516 if err != nil { 517 err = msgp.WrapError(err, "XferRateLrg") 518 return 519 } 520 } 521 case "st": 522 if msgp.IsNil(bts) { 523 bts, err = msgp.ReadNilBytes(bts) 524 if err != nil { 525 return 526 } 527 z.XferRateSml = nil 528 } else { 529 if z.XferRateSml == nil { 530 z.XferRateSml = new(XferStats) 531 } 532 bts, err = z.XferRateSml.UnmarshalMsg(bts) 533 if err != nil { 534 err = msgp.WrapError(err, "XferRateSml") 535 return 536 } 537 } 538 case "PendingSize": 539 z.PendingSize, bts, err = msgp.ReadInt64Bytes(bts) 540 if err != nil { 541 err = msgp.WrapError(err, "PendingSize") 542 return 543 } 544 case "FailedSize": 545 z.FailedSize, bts, err = msgp.ReadInt64Bytes(bts) 546 if err != nil { 547 err = msgp.WrapError(err, "FailedSize") 548 return 549 } 550 case "PendingCount": 551 z.PendingCount, bts, err = msgp.ReadInt64Bytes(bts) 552 if err != nil { 553 err = msgp.WrapError(err, "PendingCount") 554 return 555 } 556 case "FailedCount": 557 z.FailedCount, bts, err = msgp.ReadInt64Bytes(bts) 558 if err != nil { 559 err = msgp.WrapError(err, "FailedCount") 560 return 561 } 562 default: 563 bts, err = msgp.Skip(bts) 564 if err != nil { 565 err = msgp.WrapError(err) 566 return 567 } 568 } 569 } 570 o = bts 571 return 572 } 573 574 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 575 func (z *BucketReplicationStat) Msgsize() (s int) { 576 s = 1 + 15 + msgp.Int64Size + 12 + msgp.Int64Size + 10 + z.FailStats.Msgsize() + 7 + z.Failed.Msgsize() + 16 + msgp.Int64Size + 8 + 1 + 16 + z.Latency.UploadHistogram.Msgsize() + 31 + msgp.Int64Size + 34 + msgp.Float64Size + 3 577 if z.XferRateLrg == nil { 578 s += msgp.NilSize 579 } else { 580 s += z.XferRateLrg.Msgsize() 581 } 582 s += 3 583 if z.XferRateSml == nil { 584 s += msgp.NilSize 585 } else { 586 s += z.XferRateSml.Msgsize() 587 } 588 s += 12 + msgp.Int64Size + 11 + msgp.Int64Size + 13 + msgp.Int64Size + 12 + msgp.Int64Size 589 return 590 } 591 592 // DecodeMsg implements msgp.Decodable 593 func (z *BucketReplicationStats) DecodeMsg(dc *msgp.Reader) (err error) { 594 var field []byte 595 _ = field 596 var zb0001 uint32 597 zb0001, err = dc.ReadMapHeader() 598 if err != nil { 599 err = msgp.WrapError(err) 600 return 601 } 602 for zb0001 > 0 { 603 zb0001-- 604 field, err = dc.ReadMapKeyPtr() 605 if err != nil { 606 err = msgp.WrapError(err) 607 return 608 } 609 switch msgp.UnsafeString(field) { 610 case "Stats": 611 var zb0002 uint32 612 zb0002, err = dc.ReadMapHeader() 613 if err != nil { 614 err = msgp.WrapError(err, "Stats") 615 return 616 } 617 if z.Stats == nil { 618 z.Stats = make(map[string]*BucketReplicationStat, zb0002) 619 } else if len(z.Stats) > 0 { 620 for key := range z.Stats { 621 delete(z.Stats, key) 622 } 623 } 624 for zb0002 > 0 { 625 zb0002-- 626 var za0001 string 627 var za0002 *BucketReplicationStat 628 za0001, err = dc.ReadString() 629 if err != nil { 630 err = msgp.WrapError(err, "Stats") 631 return 632 } 633 if dc.IsNil() { 634 err = dc.ReadNil() 635 if err != nil { 636 err = msgp.WrapError(err, "Stats", za0001) 637 return 638 } 639 za0002 = nil 640 } else { 641 if za0002 == nil { 642 za0002 = new(BucketReplicationStat) 643 } 644 err = za0002.DecodeMsg(dc) 645 if err != nil { 646 err = msgp.WrapError(err, "Stats", za0001) 647 return 648 } 649 } 650 z.Stats[za0001] = za0002 651 } 652 case "ReplicatedSize": 653 z.ReplicatedSize, err = dc.ReadInt64() 654 if err != nil { 655 err = msgp.WrapError(err, "ReplicatedSize") 656 return 657 } 658 case "ReplicaSize": 659 z.ReplicaSize, err = dc.ReadInt64() 660 if err != nil { 661 err = msgp.WrapError(err, "ReplicaSize") 662 return 663 } 664 case "Failed": 665 err = z.Failed.DecodeMsg(dc) 666 if err != nil { 667 err = msgp.WrapError(err, "Failed") 668 return 669 } 670 case "ReplicatedCount": 671 z.ReplicatedCount, err = dc.ReadInt64() 672 if err != nil { 673 err = msgp.WrapError(err, "ReplicatedCount") 674 return 675 } 676 case "ReplicaCount": 677 z.ReplicaCount, err = dc.ReadInt64() 678 if err != nil { 679 err = msgp.WrapError(err, "ReplicaCount") 680 return 681 } 682 case "QStat": 683 err = z.QStat.DecodeMsg(dc) 684 if err != nil { 685 err = msgp.WrapError(err, "QStat") 686 return 687 } 688 case "PendingSize": 689 z.PendingSize, err = dc.ReadInt64() 690 if err != nil { 691 err = msgp.WrapError(err, "PendingSize") 692 return 693 } 694 case "FailedSize": 695 z.FailedSize, err = dc.ReadInt64() 696 if err != nil { 697 err = msgp.WrapError(err, "FailedSize") 698 return 699 } 700 case "PendingCount": 701 z.PendingCount, err = dc.ReadInt64() 702 if err != nil { 703 err = msgp.WrapError(err, "PendingCount") 704 return 705 } 706 case "FailedCount": 707 z.FailedCount, err = dc.ReadInt64() 708 if err != nil { 709 err = msgp.WrapError(err, "FailedCount") 710 return 711 } 712 default: 713 err = dc.Skip() 714 if err != nil { 715 err = msgp.WrapError(err) 716 return 717 } 718 } 719 } 720 return 721 } 722 723 // EncodeMsg implements msgp.Encodable 724 func (z *BucketReplicationStats) EncodeMsg(en *msgp.Writer) (err error) { 725 // map header, size 11 726 // write "Stats" 727 err = en.Append(0x8b, 0xa5, 0x53, 0x74, 0x61, 0x74, 0x73) 728 if err != nil { 729 return 730 } 731 err = en.WriteMapHeader(uint32(len(z.Stats))) 732 if err != nil { 733 err = msgp.WrapError(err, "Stats") 734 return 735 } 736 for za0001, za0002 := range z.Stats { 737 err = en.WriteString(za0001) 738 if err != nil { 739 err = msgp.WrapError(err, "Stats") 740 return 741 } 742 if za0002 == nil { 743 err = en.WriteNil() 744 if err != nil { 745 return 746 } 747 } else { 748 err = za0002.EncodeMsg(en) 749 if err != nil { 750 err = msgp.WrapError(err, "Stats", za0001) 751 return 752 } 753 } 754 } 755 // write "ReplicatedSize" 756 err = en.Append(0xae, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65) 757 if err != nil { 758 return 759 } 760 err = en.WriteInt64(z.ReplicatedSize) 761 if err != nil { 762 err = msgp.WrapError(err, "ReplicatedSize") 763 return 764 } 765 // write "ReplicaSize" 766 err = en.Append(0xab, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x69, 0x7a, 0x65) 767 if err != nil { 768 return 769 } 770 err = en.WriteInt64(z.ReplicaSize) 771 if err != nil { 772 err = msgp.WrapError(err, "ReplicaSize") 773 return 774 } 775 // write "Failed" 776 err = en.Append(0xa6, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64) 777 if err != nil { 778 return 779 } 780 err = z.Failed.EncodeMsg(en) 781 if err != nil { 782 err = msgp.WrapError(err, "Failed") 783 return 784 } 785 // write "ReplicatedCount" 786 err = en.Append(0xaf, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74) 787 if err != nil { 788 return 789 } 790 err = en.WriteInt64(z.ReplicatedCount) 791 if err != nil { 792 err = msgp.WrapError(err, "ReplicatedCount") 793 return 794 } 795 // write "ReplicaCount" 796 err = en.Append(0xac, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x43, 0x6f, 0x75, 0x6e, 0x74) 797 if err != nil { 798 return 799 } 800 err = en.WriteInt64(z.ReplicaCount) 801 if err != nil { 802 err = msgp.WrapError(err, "ReplicaCount") 803 return 804 } 805 // write "QStat" 806 err = en.Append(0xa5, 0x51, 0x53, 0x74, 0x61, 0x74) 807 if err != nil { 808 return 809 } 810 err = z.QStat.EncodeMsg(en) 811 if err != nil { 812 err = msgp.WrapError(err, "QStat") 813 return 814 } 815 // write "PendingSize" 816 err = en.Append(0xab, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65) 817 if err != nil { 818 return 819 } 820 err = en.WriteInt64(z.PendingSize) 821 if err != nil { 822 err = msgp.WrapError(err, "PendingSize") 823 return 824 } 825 // write "FailedSize" 826 err = en.Append(0xaa, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65) 827 if err != nil { 828 return 829 } 830 err = en.WriteInt64(z.FailedSize) 831 if err != nil { 832 err = msgp.WrapError(err, "FailedSize") 833 return 834 } 835 // write "PendingCount" 836 err = en.Append(0xac, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74) 837 if err != nil { 838 return 839 } 840 err = en.WriteInt64(z.PendingCount) 841 if err != nil { 842 err = msgp.WrapError(err, "PendingCount") 843 return 844 } 845 // write "FailedCount" 846 err = en.Append(0xab, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74) 847 if err != nil { 848 return 849 } 850 err = en.WriteInt64(z.FailedCount) 851 if err != nil { 852 err = msgp.WrapError(err, "FailedCount") 853 return 854 } 855 return 856 } 857 858 // MarshalMsg implements msgp.Marshaler 859 func (z *BucketReplicationStats) MarshalMsg(b []byte) (o []byte, err error) { 860 o = msgp.Require(b, z.Msgsize()) 861 // map header, size 11 862 // string "Stats" 863 o = append(o, 0x8b, 0xa5, 0x53, 0x74, 0x61, 0x74, 0x73) 864 o = msgp.AppendMapHeader(o, uint32(len(z.Stats))) 865 for za0001, za0002 := range z.Stats { 866 o = msgp.AppendString(o, za0001) 867 if za0002 == nil { 868 o = msgp.AppendNil(o) 869 } else { 870 o, err = za0002.MarshalMsg(o) 871 if err != nil { 872 err = msgp.WrapError(err, "Stats", za0001) 873 return 874 } 875 } 876 } 877 // string "ReplicatedSize" 878 o = append(o, 0xae, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65) 879 o = msgp.AppendInt64(o, z.ReplicatedSize) 880 // string "ReplicaSize" 881 o = append(o, 0xab, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x69, 0x7a, 0x65) 882 o = msgp.AppendInt64(o, z.ReplicaSize) 883 // string "Failed" 884 o = append(o, 0xa6, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64) 885 o, err = z.Failed.MarshalMsg(o) 886 if err != nil { 887 err = msgp.WrapError(err, "Failed") 888 return 889 } 890 // string "ReplicatedCount" 891 o = append(o, 0xaf, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74) 892 o = msgp.AppendInt64(o, z.ReplicatedCount) 893 // string "ReplicaCount" 894 o = append(o, 0xac, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x43, 0x6f, 0x75, 0x6e, 0x74) 895 o = msgp.AppendInt64(o, z.ReplicaCount) 896 // string "QStat" 897 o = append(o, 0xa5, 0x51, 0x53, 0x74, 0x61, 0x74) 898 o, err = z.QStat.MarshalMsg(o) 899 if err != nil { 900 err = msgp.WrapError(err, "QStat") 901 return 902 } 903 // string "PendingSize" 904 o = append(o, 0xab, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65) 905 o = msgp.AppendInt64(o, z.PendingSize) 906 // string "FailedSize" 907 o = append(o, 0xaa, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65) 908 o = msgp.AppendInt64(o, z.FailedSize) 909 // string "PendingCount" 910 o = append(o, 0xac, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74) 911 o = msgp.AppendInt64(o, z.PendingCount) 912 // string "FailedCount" 913 o = append(o, 0xab, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74) 914 o = msgp.AppendInt64(o, z.FailedCount) 915 return 916 } 917 918 // UnmarshalMsg implements msgp.Unmarshaler 919 func (z *BucketReplicationStats) UnmarshalMsg(bts []byte) (o []byte, err error) { 920 var field []byte 921 _ = field 922 var zb0001 uint32 923 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 924 if err != nil { 925 err = msgp.WrapError(err) 926 return 927 } 928 for zb0001 > 0 { 929 zb0001-- 930 field, bts, err = msgp.ReadMapKeyZC(bts) 931 if err != nil { 932 err = msgp.WrapError(err) 933 return 934 } 935 switch msgp.UnsafeString(field) { 936 case "Stats": 937 var zb0002 uint32 938 zb0002, bts, err = msgp.ReadMapHeaderBytes(bts) 939 if err != nil { 940 err = msgp.WrapError(err, "Stats") 941 return 942 } 943 if z.Stats == nil { 944 z.Stats = make(map[string]*BucketReplicationStat, zb0002) 945 } else if len(z.Stats) > 0 { 946 for key := range z.Stats { 947 delete(z.Stats, key) 948 } 949 } 950 for zb0002 > 0 { 951 var za0001 string 952 var za0002 *BucketReplicationStat 953 zb0002-- 954 za0001, bts, err = msgp.ReadStringBytes(bts) 955 if err != nil { 956 err = msgp.WrapError(err, "Stats") 957 return 958 } 959 if msgp.IsNil(bts) { 960 bts, err = msgp.ReadNilBytes(bts) 961 if err != nil { 962 return 963 } 964 za0002 = nil 965 } else { 966 if za0002 == nil { 967 za0002 = new(BucketReplicationStat) 968 } 969 bts, err = za0002.UnmarshalMsg(bts) 970 if err != nil { 971 err = msgp.WrapError(err, "Stats", za0001) 972 return 973 } 974 } 975 z.Stats[za0001] = za0002 976 } 977 case "ReplicatedSize": 978 z.ReplicatedSize, bts, err = msgp.ReadInt64Bytes(bts) 979 if err != nil { 980 err = msgp.WrapError(err, "ReplicatedSize") 981 return 982 } 983 case "ReplicaSize": 984 z.ReplicaSize, bts, err = msgp.ReadInt64Bytes(bts) 985 if err != nil { 986 err = msgp.WrapError(err, "ReplicaSize") 987 return 988 } 989 case "Failed": 990 bts, err = z.Failed.UnmarshalMsg(bts) 991 if err != nil { 992 err = msgp.WrapError(err, "Failed") 993 return 994 } 995 case "ReplicatedCount": 996 z.ReplicatedCount, bts, err = msgp.ReadInt64Bytes(bts) 997 if err != nil { 998 err = msgp.WrapError(err, "ReplicatedCount") 999 return 1000 } 1001 case "ReplicaCount": 1002 z.ReplicaCount, bts, err = msgp.ReadInt64Bytes(bts) 1003 if err != nil { 1004 err = msgp.WrapError(err, "ReplicaCount") 1005 return 1006 } 1007 case "QStat": 1008 bts, err = z.QStat.UnmarshalMsg(bts) 1009 if err != nil { 1010 err = msgp.WrapError(err, "QStat") 1011 return 1012 } 1013 case "PendingSize": 1014 z.PendingSize, bts, err = msgp.ReadInt64Bytes(bts) 1015 if err != nil { 1016 err = msgp.WrapError(err, "PendingSize") 1017 return 1018 } 1019 case "FailedSize": 1020 z.FailedSize, bts, err = msgp.ReadInt64Bytes(bts) 1021 if err != nil { 1022 err = msgp.WrapError(err, "FailedSize") 1023 return 1024 } 1025 case "PendingCount": 1026 z.PendingCount, bts, err = msgp.ReadInt64Bytes(bts) 1027 if err != nil { 1028 err = msgp.WrapError(err, "PendingCount") 1029 return 1030 } 1031 case "FailedCount": 1032 z.FailedCount, bts, err = msgp.ReadInt64Bytes(bts) 1033 if err != nil { 1034 err = msgp.WrapError(err, "FailedCount") 1035 return 1036 } 1037 default: 1038 bts, err = msgp.Skip(bts) 1039 if err != nil { 1040 err = msgp.WrapError(err) 1041 return 1042 } 1043 } 1044 } 1045 o = bts 1046 return 1047 } 1048 1049 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 1050 func (z *BucketReplicationStats) Msgsize() (s int) { 1051 s = 1 + 6 + msgp.MapHeaderSize 1052 if z.Stats != nil { 1053 for za0001, za0002 := range z.Stats { 1054 _ = za0002 1055 s += msgp.StringPrefixSize + len(za0001) 1056 if za0002 == nil { 1057 s += msgp.NilSize 1058 } else { 1059 s += za0002.Msgsize() 1060 } 1061 } 1062 } 1063 s += 15 + msgp.Int64Size + 12 + msgp.Int64Size + 7 + z.Failed.Msgsize() + 16 + msgp.Int64Size + 13 + msgp.Int64Size + 6 + z.QStat.Msgsize() + 12 + msgp.Int64Size + 11 + msgp.Int64Size + 13 + msgp.Int64Size + 12 + msgp.Int64Size 1064 return 1065 } 1066 1067 // DecodeMsg implements msgp.Decodable 1068 func (z *BucketStats) DecodeMsg(dc *msgp.Reader) (err error) { 1069 var field []byte 1070 _ = field 1071 var zb0001 uint32 1072 zb0001, err = dc.ReadMapHeader() 1073 if err != nil { 1074 err = msgp.WrapError(err) 1075 return 1076 } 1077 for zb0001 > 0 { 1078 zb0001-- 1079 field, err = dc.ReadMapKeyPtr() 1080 if err != nil { 1081 err = msgp.WrapError(err) 1082 return 1083 } 1084 switch msgp.UnsafeString(field) { 1085 case "Uptime": 1086 z.Uptime, err = dc.ReadInt64() 1087 if err != nil { 1088 err = msgp.WrapError(err, "Uptime") 1089 return 1090 } 1091 case "ReplicationStats": 1092 err = z.ReplicationStats.DecodeMsg(dc) 1093 if err != nil { 1094 err = msgp.WrapError(err, "ReplicationStats") 1095 return 1096 } 1097 case "QueueStats": 1098 var zb0002 uint32 1099 zb0002, err = dc.ReadMapHeader() 1100 if err != nil { 1101 err = msgp.WrapError(err, "QueueStats") 1102 return 1103 } 1104 for zb0002 > 0 { 1105 zb0002-- 1106 field, err = dc.ReadMapKeyPtr() 1107 if err != nil { 1108 err = msgp.WrapError(err, "QueueStats") 1109 return 1110 } 1111 switch msgp.UnsafeString(field) { 1112 case "Nodes": 1113 var zb0003 uint32 1114 zb0003, err = dc.ReadArrayHeader() 1115 if err != nil { 1116 err = msgp.WrapError(err, "QueueStats", "Nodes") 1117 return 1118 } 1119 if cap(z.QueueStats.Nodes) >= int(zb0003) { 1120 z.QueueStats.Nodes = (z.QueueStats.Nodes)[:zb0003] 1121 } else { 1122 z.QueueStats.Nodes = make([]ReplQNodeStats, zb0003) 1123 } 1124 for za0001 := range z.QueueStats.Nodes { 1125 err = z.QueueStats.Nodes[za0001].DecodeMsg(dc) 1126 if err != nil { 1127 err = msgp.WrapError(err, "QueueStats", "Nodes", za0001) 1128 return 1129 } 1130 } 1131 case "Uptime": 1132 z.QueueStats.Uptime, err = dc.ReadInt64() 1133 if err != nil { 1134 err = msgp.WrapError(err, "QueueStats", "Uptime") 1135 return 1136 } 1137 default: 1138 err = dc.Skip() 1139 if err != nil { 1140 err = msgp.WrapError(err, "QueueStats") 1141 return 1142 } 1143 } 1144 } 1145 case "ProxyStats": 1146 err = z.ProxyStats.DecodeMsg(dc) 1147 if err != nil { 1148 err = msgp.WrapError(err, "ProxyStats") 1149 return 1150 } 1151 default: 1152 err = dc.Skip() 1153 if err != nil { 1154 err = msgp.WrapError(err) 1155 return 1156 } 1157 } 1158 } 1159 return 1160 } 1161 1162 // EncodeMsg implements msgp.Encodable 1163 func (z *BucketStats) EncodeMsg(en *msgp.Writer) (err error) { 1164 // map header, size 4 1165 // write "Uptime" 1166 err = en.Append(0x84, 0xa6, 0x55, 0x70, 0x74, 0x69, 0x6d, 0x65) 1167 if err != nil { 1168 return 1169 } 1170 err = en.WriteInt64(z.Uptime) 1171 if err != nil { 1172 err = msgp.WrapError(err, "Uptime") 1173 return 1174 } 1175 // write "ReplicationStats" 1176 err = en.Append(0xb0, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73) 1177 if err != nil { 1178 return 1179 } 1180 err = z.ReplicationStats.EncodeMsg(en) 1181 if err != nil { 1182 err = msgp.WrapError(err, "ReplicationStats") 1183 return 1184 } 1185 // write "QueueStats" 1186 err = en.Append(0xaa, 0x51, 0x75, 0x65, 0x75, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73) 1187 if err != nil { 1188 return 1189 } 1190 // map header, size 2 1191 // write "Nodes" 1192 err = en.Append(0x82, 0xa5, 0x4e, 0x6f, 0x64, 0x65, 0x73) 1193 if err != nil { 1194 return 1195 } 1196 err = en.WriteArrayHeader(uint32(len(z.QueueStats.Nodes))) 1197 if err != nil { 1198 err = msgp.WrapError(err, "QueueStats", "Nodes") 1199 return 1200 } 1201 for za0001 := range z.QueueStats.Nodes { 1202 err = z.QueueStats.Nodes[za0001].EncodeMsg(en) 1203 if err != nil { 1204 err = msgp.WrapError(err, "QueueStats", "Nodes", za0001) 1205 return 1206 } 1207 } 1208 // write "Uptime" 1209 err = en.Append(0xa6, 0x55, 0x70, 0x74, 0x69, 0x6d, 0x65) 1210 if err != nil { 1211 return 1212 } 1213 err = en.WriteInt64(z.QueueStats.Uptime) 1214 if err != nil { 1215 err = msgp.WrapError(err, "QueueStats", "Uptime") 1216 return 1217 } 1218 // write "ProxyStats" 1219 err = en.Append(0xaa, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73) 1220 if err != nil { 1221 return 1222 } 1223 err = z.ProxyStats.EncodeMsg(en) 1224 if err != nil { 1225 err = msgp.WrapError(err, "ProxyStats") 1226 return 1227 } 1228 return 1229 } 1230 1231 // MarshalMsg implements msgp.Marshaler 1232 func (z *BucketStats) MarshalMsg(b []byte) (o []byte, err error) { 1233 o = msgp.Require(b, z.Msgsize()) 1234 // map header, size 4 1235 // string "Uptime" 1236 o = append(o, 0x84, 0xa6, 0x55, 0x70, 0x74, 0x69, 0x6d, 0x65) 1237 o = msgp.AppendInt64(o, z.Uptime) 1238 // string "ReplicationStats" 1239 o = append(o, 0xb0, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73) 1240 o, err = z.ReplicationStats.MarshalMsg(o) 1241 if err != nil { 1242 err = msgp.WrapError(err, "ReplicationStats") 1243 return 1244 } 1245 // string "QueueStats" 1246 o = append(o, 0xaa, 0x51, 0x75, 0x65, 0x75, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73) 1247 // map header, size 2 1248 // string "Nodes" 1249 o = append(o, 0x82, 0xa5, 0x4e, 0x6f, 0x64, 0x65, 0x73) 1250 o = msgp.AppendArrayHeader(o, uint32(len(z.QueueStats.Nodes))) 1251 for za0001 := range z.QueueStats.Nodes { 1252 o, err = z.QueueStats.Nodes[za0001].MarshalMsg(o) 1253 if err != nil { 1254 err = msgp.WrapError(err, "QueueStats", "Nodes", za0001) 1255 return 1256 } 1257 } 1258 // string "Uptime" 1259 o = append(o, 0xa6, 0x55, 0x70, 0x74, 0x69, 0x6d, 0x65) 1260 o = msgp.AppendInt64(o, z.QueueStats.Uptime) 1261 // string "ProxyStats" 1262 o = append(o, 0xaa, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73) 1263 o, err = z.ProxyStats.MarshalMsg(o) 1264 if err != nil { 1265 err = msgp.WrapError(err, "ProxyStats") 1266 return 1267 } 1268 return 1269 } 1270 1271 // UnmarshalMsg implements msgp.Unmarshaler 1272 func (z *BucketStats) UnmarshalMsg(bts []byte) (o []byte, err error) { 1273 var field []byte 1274 _ = field 1275 var zb0001 uint32 1276 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 1277 if err != nil { 1278 err = msgp.WrapError(err) 1279 return 1280 } 1281 for zb0001 > 0 { 1282 zb0001-- 1283 field, bts, err = msgp.ReadMapKeyZC(bts) 1284 if err != nil { 1285 err = msgp.WrapError(err) 1286 return 1287 } 1288 switch msgp.UnsafeString(field) { 1289 case "Uptime": 1290 z.Uptime, bts, err = msgp.ReadInt64Bytes(bts) 1291 if err != nil { 1292 err = msgp.WrapError(err, "Uptime") 1293 return 1294 } 1295 case "ReplicationStats": 1296 bts, err = z.ReplicationStats.UnmarshalMsg(bts) 1297 if err != nil { 1298 err = msgp.WrapError(err, "ReplicationStats") 1299 return 1300 } 1301 case "QueueStats": 1302 var zb0002 uint32 1303 zb0002, bts, err = msgp.ReadMapHeaderBytes(bts) 1304 if err != nil { 1305 err = msgp.WrapError(err, "QueueStats") 1306 return 1307 } 1308 for zb0002 > 0 { 1309 zb0002-- 1310 field, bts, err = msgp.ReadMapKeyZC(bts) 1311 if err != nil { 1312 err = msgp.WrapError(err, "QueueStats") 1313 return 1314 } 1315 switch msgp.UnsafeString(field) { 1316 case "Nodes": 1317 var zb0003 uint32 1318 zb0003, bts, err = msgp.ReadArrayHeaderBytes(bts) 1319 if err != nil { 1320 err = msgp.WrapError(err, "QueueStats", "Nodes") 1321 return 1322 } 1323 if cap(z.QueueStats.Nodes) >= int(zb0003) { 1324 z.QueueStats.Nodes = (z.QueueStats.Nodes)[:zb0003] 1325 } else { 1326 z.QueueStats.Nodes = make([]ReplQNodeStats, zb0003) 1327 } 1328 for za0001 := range z.QueueStats.Nodes { 1329 bts, err = z.QueueStats.Nodes[za0001].UnmarshalMsg(bts) 1330 if err != nil { 1331 err = msgp.WrapError(err, "QueueStats", "Nodes", za0001) 1332 return 1333 } 1334 } 1335 case "Uptime": 1336 z.QueueStats.Uptime, bts, err = msgp.ReadInt64Bytes(bts) 1337 if err != nil { 1338 err = msgp.WrapError(err, "QueueStats", "Uptime") 1339 return 1340 } 1341 default: 1342 bts, err = msgp.Skip(bts) 1343 if err != nil { 1344 err = msgp.WrapError(err, "QueueStats") 1345 return 1346 } 1347 } 1348 } 1349 case "ProxyStats": 1350 bts, err = z.ProxyStats.UnmarshalMsg(bts) 1351 if err != nil { 1352 err = msgp.WrapError(err, "ProxyStats") 1353 return 1354 } 1355 default: 1356 bts, err = msgp.Skip(bts) 1357 if err != nil { 1358 err = msgp.WrapError(err) 1359 return 1360 } 1361 } 1362 } 1363 o = bts 1364 return 1365 } 1366 1367 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 1368 func (z *BucketStats) Msgsize() (s int) { 1369 s = 1 + 7 + msgp.Int64Size + 17 + z.ReplicationStats.Msgsize() + 11 + 1 + 6 + msgp.ArrayHeaderSize 1370 for za0001 := range z.QueueStats.Nodes { 1371 s += z.QueueStats.Nodes[za0001].Msgsize() 1372 } 1373 s += 7 + msgp.Int64Size + 11 + z.ProxyStats.Msgsize() 1374 return 1375 } 1376 1377 // DecodeMsg implements msgp.Decodable 1378 func (z *BucketStatsMap) DecodeMsg(dc *msgp.Reader) (err error) { 1379 var field []byte 1380 _ = field 1381 var zb0001 uint32 1382 zb0001, err = dc.ReadMapHeader() 1383 if err != nil { 1384 err = msgp.WrapError(err) 1385 return 1386 } 1387 for zb0001 > 0 { 1388 zb0001-- 1389 field, err = dc.ReadMapKeyPtr() 1390 if err != nil { 1391 err = msgp.WrapError(err) 1392 return 1393 } 1394 switch msgp.UnsafeString(field) { 1395 case "Stats": 1396 var zb0002 uint32 1397 zb0002, err = dc.ReadMapHeader() 1398 if err != nil { 1399 err = msgp.WrapError(err, "Stats") 1400 return 1401 } 1402 if z.Stats == nil { 1403 z.Stats = make(map[string]BucketStats, zb0002) 1404 } else if len(z.Stats) > 0 { 1405 for key := range z.Stats { 1406 delete(z.Stats, key) 1407 } 1408 } 1409 for zb0002 > 0 { 1410 zb0002-- 1411 var za0001 string 1412 var za0002 BucketStats 1413 za0001, err = dc.ReadString() 1414 if err != nil { 1415 err = msgp.WrapError(err, "Stats") 1416 return 1417 } 1418 err = za0002.DecodeMsg(dc) 1419 if err != nil { 1420 err = msgp.WrapError(err, "Stats", za0001) 1421 return 1422 } 1423 z.Stats[za0001] = za0002 1424 } 1425 case "Timestamp": 1426 z.Timestamp, err = dc.ReadTime() 1427 if err != nil { 1428 err = msgp.WrapError(err, "Timestamp") 1429 return 1430 } 1431 default: 1432 err = dc.Skip() 1433 if err != nil { 1434 err = msgp.WrapError(err) 1435 return 1436 } 1437 } 1438 } 1439 return 1440 } 1441 1442 // EncodeMsg implements msgp.Encodable 1443 func (z *BucketStatsMap) EncodeMsg(en *msgp.Writer) (err error) { 1444 // map header, size 2 1445 // write "Stats" 1446 err = en.Append(0x82, 0xa5, 0x53, 0x74, 0x61, 0x74, 0x73) 1447 if err != nil { 1448 return 1449 } 1450 err = en.WriteMapHeader(uint32(len(z.Stats))) 1451 if err != nil { 1452 err = msgp.WrapError(err, "Stats") 1453 return 1454 } 1455 for za0001, za0002 := range z.Stats { 1456 err = en.WriteString(za0001) 1457 if err != nil { 1458 err = msgp.WrapError(err, "Stats") 1459 return 1460 } 1461 err = za0002.EncodeMsg(en) 1462 if err != nil { 1463 err = msgp.WrapError(err, "Stats", za0001) 1464 return 1465 } 1466 } 1467 // write "Timestamp" 1468 err = en.Append(0xa9, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70) 1469 if err != nil { 1470 return 1471 } 1472 err = en.WriteTime(z.Timestamp) 1473 if err != nil { 1474 err = msgp.WrapError(err, "Timestamp") 1475 return 1476 } 1477 return 1478 } 1479 1480 // MarshalMsg implements msgp.Marshaler 1481 func (z *BucketStatsMap) MarshalMsg(b []byte) (o []byte, err error) { 1482 o = msgp.Require(b, z.Msgsize()) 1483 // map header, size 2 1484 // string "Stats" 1485 o = append(o, 0x82, 0xa5, 0x53, 0x74, 0x61, 0x74, 0x73) 1486 o = msgp.AppendMapHeader(o, uint32(len(z.Stats))) 1487 for za0001, za0002 := range z.Stats { 1488 o = msgp.AppendString(o, za0001) 1489 o, err = za0002.MarshalMsg(o) 1490 if err != nil { 1491 err = msgp.WrapError(err, "Stats", za0001) 1492 return 1493 } 1494 } 1495 // string "Timestamp" 1496 o = append(o, 0xa9, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70) 1497 o = msgp.AppendTime(o, z.Timestamp) 1498 return 1499 } 1500 1501 // UnmarshalMsg implements msgp.Unmarshaler 1502 func (z *BucketStatsMap) UnmarshalMsg(bts []byte) (o []byte, err error) { 1503 var field []byte 1504 _ = field 1505 var zb0001 uint32 1506 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 1507 if err != nil { 1508 err = msgp.WrapError(err) 1509 return 1510 } 1511 for zb0001 > 0 { 1512 zb0001-- 1513 field, bts, err = msgp.ReadMapKeyZC(bts) 1514 if err != nil { 1515 err = msgp.WrapError(err) 1516 return 1517 } 1518 switch msgp.UnsafeString(field) { 1519 case "Stats": 1520 var zb0002 uint32 1521 zb0002, bts, err = msgp.ReadMapHeaderBytes(bts) 1522 if err != nil { 1523 err = msgp.WrapError(err, "Stats") 1524 return 1525 } 1526 if z.Stats == nil { 1527 z.Stats = make(map[string]BucketStats, zb0002) 1528 } else if len(z.Stats) > 0 { 1529 for key := range z.Stats { 1530 delete(z.Stats, key) 1531 } 1532 } 1533 for zb0002 > 0 { 1534 var za0001 string 1535 var za0002 BucketStats 1536 zb0002-- 1537 za0001, bts, err = msgp.ReadStringBytes(bts) 1538 if err != nil { 1539 err = msgp.WrapError(err, "Stats") 1540 return 1541 } 1542 bts, err = za0002.UnmarshalMsg(bts) 1543 if err != nil { 1544 err = msgp.WrapError(err, "Stats", za0001) 1545 return 1546 } 1547 z.Stats[za0001] = za0002 1548 } 1549 case "Timestamp": 1550 z.Timestamp, bts, err = msgp.ReadTimeBytes(bts) 1551 if err != nil { 1552 err = msgp.WrapError(err, "Timestamp") 1553 return 1554 } 1555 default: 1556 bts, err = msgp.Skip(bts) 1557 if err != nil { 1558 err = msgp.WrapError(err) 1559 return 1560 } 1561 } 1562 } 1563 o = bts 1564 return 1565 } 1566 1567 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 1568 func (z *BucketStatsMap) Msgsize() (s int) { 1569 s = 1 + 6 + msgp.MapHeaderSize 1570 if z.Stats != nil { 1571 for za0001, za0002 := range z.Stats { 1572 _ = za0002 1573 s += msgp.StringPrefixSize + len(za0001) + za0002.Msgsize() 1574 } 1575 } 1576 s += 10 + msgp.TimeSize 1577 return 1578 } 1579 1580 // DecodeMsg implements msgp.Decodable 1581 func (z *RMetricName) DecodeMsg(dc *msgp.Reader) (err error) { 1582 { 1583 var zb0001 string 1584 zb0001, err = dc.ReadString() 1585 if err != nil { 1586 err = msgp.WrapError(err) 1587 return 1588 } 1589 (*z) = RMetricName(zb0001) 1590 } 1591 return 1592 } 1593 1594 // EncodeMsg implements msgp.Encodable 1595 func (z RMetricName) EncodeMsg(en *msgp.Writer) (err error) { 1596 err = en.WriteString(string(z)) 1597 if err != nil { 1598 err = msgp.WrapError(err) 1599 return 1600 } 1601 return 1602 } 1603 1604 // MarshalMsg implements msgp.Marshaler 1605 func (z RMetricName) MarshalMsg(b []byte) (o []byte, err error) { 1606 o = msgp.Require(b, z.Msgsize()) 1607 o = msgp.AppendString(o, string(z)) 1608 return 1609 } 1610 1611 // UnmarshalMsg implements msgp.Unmarshaler 1612 func (z *RMetricName) UnmarshalMsg(bts []byte) (o []byte, err error) { 1613 { 1614 var zb0001 string 1615 zb0001, bts, err = msgp.ReadStringBytes(bts) 1616 if err != nil { 1617 err = msgp.WrapError(err) 1618 return 1619 } 1620 (*z) = RMetricName(zb0001) 1621 } 1622 o = bts 1623 return 1624 } 1625 1626 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 1627 func (z RMetricName) Msgsize() (s int) { 1628 s = msgp.StringPrefixSize + len(string(z)) 1629 return 1630 } 1631 1632 // DecodeMsg implements msgp.Decodable 1633 func (z *ReplQNodeStats) DecodeMsg(dc *msgp.Reader) (err error) { 1634 var field []byte 1635 _ = field 1636 var zb0001 uint32 1637 zb0001, err = dc.ReadMapHeader() 1638 if err != nil { 1639 err = msgp.WrapError(err) 1640 return 1641 } 1642 for zb0001 > 0 { 1643 zb0001-- 1644 field, err = dc.ReadMapKeyPtr() 1645 if err != nil { 1646 err = msgp.WrapError(err) 1647 return 1648 } 1649 switch msgp.UnsafeString(field) { 1650 case "NodeName": 1651 z.NodeName, err = dc.ReadString() 1652 if err != nil { 1653 err = msgp.WrapError(err, "NodeName") 1654 return 1655 } 1656 case "Uptime": 1657 z.Uptime, err = dc.ReadInt64() 1658 if err != nil { 1659 err = msgp.WrapError(err, "Uptime") 1660 return 1661 } 1662 case "ActiveWorkers": 1663 err = z.ActiveWorkers.DecodeMsg(dc) 1664 if err != nil { 1665 err = msgp.WrapError(err, "ActiveWorkers") 1666 return 1667 } 1668 case "QStats": 1669 err = z.QStats.DecodeMsg(dc) 1670 if err != nil { 1671 err = msgp.WrapError(err, "QStats") 1672 return 1673 } 1674 case "MRFStats": 1675 err = z.MRFStats.DecodeMsg(dc) 1676 if err != nil { 1677 err = msgp.WrapError(err, "MRFStats") 1678 return 1679 } 1680 default: 1681 err = dc.Skip() 1682 if err != nil { 1683 err = msgp.WrapError(err) 1684 return 1685 } 1686 } 1687 } 1688 return 1689 } 1690 1691 // EncodeMsg implements msgp.Encodable 1692 func (z *ReplQNodeStats) EncodeMsg(en *msgp.Writer) (err error) { 1693 // map header, size 5 1694 // write "NodeName" 1695 err = en.Append(0x85, 0xa8, 0x4e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65) 1696 if err != nil { 1697 return 1698 } 1699 err = en.WriteString(z.NodeName) 1700 if err != nil { 1701 err = msgp.WrapError(err, "NodeName") 1702 return 1703 } 1704 // write "Uptime" 1705 err = en.Append(0xa6, 0x55, 0x70, 0x74, 0x69, 0x6d, 0x65) 1706 if err != nil { 1707 return 1708 } 1709 err = en.WriteInt64(z.Uptime) 1710 if err != nil { 1711 err = msgp.WrapError(err, "Uptime") 1712 return 1713 } 1714 // write "ActiveWorkers" 1715 err = en.Append(0xad, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73) 1716 if err != nil { 1717 return 1718 } 1719 err = z.ActiveWorkers.EncodeMsg(en) 1720 if err != nil { 1721 err = msgp.WrapError(err, "ActiveWorkers") 1722 return 1723 } 1724 // write "QStats" 1725 err = en.Append(0xa6, 0x51, 0x53, 0x74, 0x61, 0x74, 0x73) 1726 if err != nil { 1727 return 1728 } 1729 err = z.QStats.EncodeMsg(en) 1730 if err != nil { 1731 err = msgp.WrapError(err, "QStats") 1732 return 1733 } 1734 // write "MRFStats" 1735 err = en.Append(0xa8, 0x4d, 0x52, 0x46, 0x53, 0x74, 0x61, 0x74, 0x73) 1736 if err != nil { 1737 return 1738 } 1739 err = z.MRFStats.EncodeMsg(en) 1740 if err != nil { 1741 err = msgp.WrapError(err, "MRFStats") 1742 return 1743 } 1744 return 1745 } 1746 1747 // MarshalMsg implements msgp.Marshaler 1748 func (z *ReplQNodeStats) MarshalMsg(b []byte) (o []byte, err error) { 1749 o = msgp.Require(b, z.Msgsize()) 1750 // map header, size 5 1751 // string "NodeName" 1752 o = append(o, 0x85, 0xa8, 0x4e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65) 1753 o = msgp.AppendString(o, z.NodeName) 1754 // string "Uptime" 1755 o = append(o, 0xa6, 0x55, 0x70, 0x74, 0x69, 0x6d, 0x65) 1756 o = msgp.AppendInt64(o, z.Uptime) 1757 // string "ActiveWorkers" 1758 o = append(o, 0xad, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x73) 1759 o, err = z.ActiveWorkers.MarshalMsg(o) 1760 if err != nil { 1761 err = msgp.WrapError(err, "ActiveWorkers") 1762 return 1763 } 1764 // string "QStats" 1765 o = append(o, 0xa6, 0x51, 0x53, 0x74, 0x61, 0x74, 0x73) 1766 o, err = z.QStats.MarshalMsg(o) 1767 if err != nil { 1768 err = msgp.WrapError(err, "QStats") 1769 return 1770 } 1771 // string "MRFStats" 1772 o = append(o, 0xa8, 0x4d, 0x52, 0x46, 0x53, 0x74, 0x61, 0x74, 0x73) 1773 o, err = z.MRFStats.MarshalMsg(o) 1774 if err != nil { 1775 err = msgp.WrapError(err, "MRFStats") 1776 return 1777 } 1778 return 1779 } 1780 1781 // UnmarshalMsg implements msgp.Unmarshaler 1782 func (z *ReplQNodeStats) UnmarshalMsg(bts []byte) (o []byte, err error) { 1783 var field []byte 1784 _ = field 1785 var zb0001 uint32 1786 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 1787 if err != nil { 1788 err = msgp.WrapError(err) 1789 return 1790 } 1791 for zb0001 > 0 { 1792 zb0001-- 1793 field, bts, err = msgp.ReadMapKeyZC(bts) 1794 if err != nil { 1795 err = msgp.WrapError(err) 1796 return 1797 } 1798 switch msgp.UnsafeString(field) { 1799 case "NodeName": 1800 z.NodeName, bts, err = msgp.ReadStringBytes(bts) 1801 if err != nil { 1802 err = msgp.WrapError(err, "NodeName") 1803 return 1804 } 1805 case "Uptime": 1806 z.Uptime, bts, err = msgp.ReadInt64Bytes(bts) 1807 if err != nil { 1808 err = msgp.WrapError(err, "Uptime") 1809 return 1810 } 1811 case "ActiveWorkers": 1812 bts, err = z.ActiveWorkers.UnmarshalMsg(bts) 1813 if err != nil { 1814 err = msgp.WrapError(err, "ActiveWorkers") 1815 return 1816 } 1817 case "QStats": 1818 bts, err = z.QStats.UnmarshalMsg(bts) 1819 if err != nil { 1820 err = msgp.WrapError(err, "QStats") 1821 return 1822 } 1823 case "MRFStats": 1824 bts, err = z.MRFStats.UnmarshalMsg(bts) 1825 if err != nil { 1826 err = msgp.WrapError(err, "MRFStats") 1827 return 1828 } 1829 default: 1830 bts, err = msgp.Skip(bts) 1831 if err != nil { 1832 err = msgp.WrapError(err) 1833 return 1834 } 1835 } 1836 } 1837 o = bts 1838 return 1839 } 1840 1841 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 1842 func (z *ReplQNodeStats) Msgsize() (s int) { 1843 s = 1 + 9 + msgp.StringPrefixSize + len(z.NodeName) + 7 + msgp.Int64Size + 14 + z.ActiveWorkers.Msgsize() + 7 + z.QStats.Msgsize() + 9 + z.MRFStats.Msgsize() 1844 return 1845 } 1846 1847 // DecodeMsg implements msgp.Decodable 1848 func (z *ReplicationLastHour) DecodeMsg(dc *msgp.Reader) (err error) { 1849 var field []byte 1850 _ = field 1851 var zb0001 uint32 1852 zb0001, err = dc.ReadMapHeader() 1853 if err != nil { 1854 err = msgp.WrapError(err) 1855 return 1856 } 1857 for zb0001 > 0 { 1858 zb0001-- 1859 field, err = dc.ReadMapKeyPtr() 1860 if err != nil { 1861 err = msgp.WrapError(err) 1862 return 1863 } 1864 switch msgp.UnsafeString(field) { 1865 case "Totals": 1866 var zb0002 uint32 1867 zb0002, err = dc.ReadArrayHeader() 1868 if err != nil { 1869 err = msgp.WrapError(err, "Totals") 1870 return 1871 } 1872 if zb0002 != uint32(60) { 1873 err = msgp.ArrayError{Wanted: uint32(60), Got: zb0002} 1874 return 1875 } 1876 for za0001 := range z.Totals { 1877 err = z.Totals[za0001].DecodeMsg(dc) 1878 if err != nil { 1879 err = msgp.WrapError(err, "Totals", za0001) 1880 return 1881 } 1882 } 1883 case "LastMin": 1884 z.LastMin, err = dc.ReadInt64() 1885 if err != nil { 1886 err = msgp.WrapError(err, "LastMin") 1887 return 1888 } 1889 default: 1890 err = dc.Skip() 1891 if err != nil { 1892 err = msgp.WrapError(err) 1893 return 1894 } 1895 } 1896 } 1897 return 1898 } 1899 1900 // EncodeMsg implements msgp.Encodable 1901 func (z *ReplicationLastHour) EncodeMsg(en *msgp.Writer) (err error) { 1902 // map header, size 2 1903 // write "Totals" 1904 err = en.Append(0x82, 0xa6, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x73) 1905 if err != nil { 1906 return 1907 } 1908 err = en.WriteArrayHeader(uint32(60)) 1909 if err != nil { 1910 err = msgp.WrapError(err, "Totals") 1911 return 1912 } 1913 for za0001 := range z.Totals { 1914 err = z.Totals[za0001].EncodeMsg(en) 1915 if err != nil { 1916 err = msgp.WrapError(err, "Totals", za0001) 1917 return 1918 } 1919 } 1920 // write "LastMin" 1921 err = en.Append(0xa7, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x69, 0x6e) 1922 if err != nil { 1923 return 1924 } 1925 err = en.WriteInt64(z.LastMin) 1926 if err != nil { 1927 err = msgp.WrapError(err, "LastMin") 1928 return 1929 } 1930 return 1931 } 1932 1933 // MarshalMsg implements msgp.Marshaler 1934 func (z *ReplicationLastHour) MarshalMsg(b []byte) (o []byte, err error) { 1935 o = msgp.Require(b, z.Msgsize()) 1936 // map header, size 2 1937 // string "Totals" 1938 o = append(o, 0x82, 0xa6, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x73) 1939 o = msgp.AppendArrayHeader(o, uint32(60)) 1940 for za0001 := range z.Totals { 1941 o, err = z.Totals[za0001].MarshalMsg(o) 1942 if err != nil { 1943 err = msgp.WrapError(err, "Totals", za0001) 1944 return 1945 } 1946 } 1947 // string "LastMin" 1948 o = append(o, 0xa7, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x69, 0x6e) 1949 o = msgp.AppendInt64(o, z.LastMin) 1950 return 1951 } 1952 1953 // UnmarshalMsg implements msgp.Unmarshaler 1954 func (z *ReplicationLastHour) UnmarshalMsg(bts []byte) (o []byte, err error) { 1955 var field []byte 1956 _ = field 1957 var zb0001 uint32 1958 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 1959 if err != nil { 1960 err = msgp.WrapError(err) 1961 return 1962 } 1963 for zb0001 > 0 { 1964 zb0001-- 1965 field, bts, err = msgp.ReadMapKeyZC(bts) 1966 if err != nil { 1967 err = msgp.WrapError(err) 1968 return 1969 } 1970 switch msgp.UnsafeString(field) { 1971 case "Totals": 1972 var zb0002 uint32 1973 zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) 1974 if err != nil { 1975 err = msgp.WrapError(err, "Totals") 1976 return 1977 } 1978 if zb0002 != uint32(60) { 1979 err = msgp.ArrayError{Wanted: uint32(60), Got: zb0002} 1980 return 1981 } 1982 for za0001 := range z.Totals { 1983 bts, err = z.Totals[za0001].UnmarshalMsg(bts) 1984 if err != nil { 1985 err = msgp.WrapError(err, "Totals", za0001) 1986 return 1987 } 1988 } 1989 case "LastMin": 1990 z.LastMin, bts, err = msgp.ReadInt64Bytes(bts) 1991 if err != nil { 1992 err = msgp.WrapError(err, "LastMin") 1993 return 1994 } 1995 default: 1996 bts, err = msgp.Skip(bts) 1997 if err != nil { 1998 err = msgp.WrapError(err) 1999 return 2000 } 2001 } 2002 } 2003 o = bts 2004 return 2005 } 2006 2007 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 2008 func (z *ReplicationLastHour) Msgsize() (s int) { 2009 s = 1 + 7 + msgp.ArrayHeaderSize 2010 for za0001 := range z.Totals { 2011 s += z.Totals[za0001].Msgsize() 2012 } 2013 s += 8 + msgp.Int64Size 2014 return 2015 } 2016 2017 // DecodeMsg implements msgp.Decodable 2018 func (z *ReplicationLastMinute) DecodeMsg(dc *msgp.Reader) (err error) { 2019 var field []byte 2020 _ = field 2021 var zb0001 uint32 2022 zb0001, err = dc.ReadMapHeader() 2023 if err != nil { 2024 err = msgp.WrapError(err) 2025 return 2026 } 2027 for zb0001 > 0 { 2028 zb0001-- 2029 field, err = dc.ReadMapKeyPtr() 2030 if err != nil { 2031 err = msgp.WrapError(err) 2032 return 2033 } 2034 switch msgp.UnsafeString(field) { 2035 case "LastMinute": 2036 err = z.LastMinute.DecodeMsg(dc) 2037 if err != nil { 2038 err = msgp.WrapError(err, "LastMinute") 2039 return 2040 } 2041 default: 2042 err = dc.Skip() 2043 if err != nil { 2044 err = msgp.WrapError(err) 2045 return 2046 } 2047 } 2048 } 2049 return 2050 } 2051 2052 // EncodeMsg implements msgp.Encodable 2053 func (z *ReplicationLastMinute) EncodeMsg(en *msgp.Writer) (err error) { 2054 // map header, size 1 2055 // write "LastMinute" 2056 err = en.Append(0x81, 0xaa, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x69, 0x6e, 0x75, 0x74, 0x65) 2057 if err != nil { 2058 return 2059 } 2060 err = z.LastMinute.EncodeMsg(en) 2061 if err != nil { 2062 err = msgp.WrapError(err, "LastMinute") 2063 return 2064 } 2065 return 2066 } 2067 2068 // MarshalMsg implements msgp.Marshaler 2069 func (z *ReplicationLastMinute) MarshalMsg(b []byte) (o []byte, err error) { 2070 o = msgp.Require(b, z.Msgsize()) 2071 // map header, size 1 2072 // string "LastMinute" 2073 o = append(o, 0x81, 0xaa, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x69, 0x6e, 0x75, 0x74, 0x65) 2074 o, err = z.LastMinute.MarshalMsg(o) 2075 if err != nil { 2076 err = msgp.WrapError(err, "LastMinute") 2077 return 2078 } 2079 return 2080 } 2081 2082 // UnmarshalMsg implements msgp.Unmarshaler 2083 func (z *ReplicationLastMinute) UnmarshalMsg(bts []byte) (o []byte, err error) { 2084 var field []byte 2085 _ = field 2086 var zb0001 uint32 2087 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 2088 if err != nil { 2089 err = msgp.WrapError(err) 2090 return 2091 } 2092 for zb0001 > 0 { 2093 zb0001-- 2094 field, bts, err = msgp.ReadMapKeyZC(bts) 2095 if err != nil { 2096 err = msgp.WrapError(err) 2097 return 2098 } 2099 switch msgp.UnsafeString(field) { 2100 case "LastMinute": 2101 bts, err = z.LastMinute.UnmarshalMsg(bts) 2102 if err != nil { 2103 err = msgp.WrapError(err, "LastMinute") 2104 return 2105 } 2106 default: 2107 bts, err = msgp.Skip(bts) 2108 if err != nil { 2109 err = msgp.WrapError(err) 2110 return 2111 } 2112 } 2113 } 2114 o = bts 2115 return 2116 } 2117 2118 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 2119 func (z *ReplicationLastMinute) Msgsize() (s int) { 2120 s = 1 + 11 + z.LastMinute.Msgsize() 2121 return 2122 } 2123 2124 // DecodeMsg implements msgp.Decodable 2125 func (z *ReplicationLatency) DecodeMsg(dc *msgp.Reader) (err error) { 2126 var field []byte 2127 _ = field 2128 var zb0001 uint32 2129 zb0001, err = dc.ReadMapHeader() 2130 if err != nil { 2131 err = msgp.WrapError(err) 2132 return 2133 } 2134 for zb0001 > 0 { 2135 zb0001-- 2136 field, err = dc.ReadMapKeyPtr() 2137 if err != nil { 2138 err = msgp.WrapError(err) 2139 return 2140 } 2141 switch msgp.UnsafeString(field) { 2142 case "UploadHistogram": 2143 err = z.UploadHistogram.DecodeMsg(dc) 2144 if err != nil { 2145 err = msgp.WrapError(err, "UploadHistogram") 2146 return 2147 } 2148 default: 2149 err = dc.Skip() 2150 if err != nil { 2151 err = msgp.WrapError(err) 2152 return 2153 } 2154 } 2155 } 2156 return 2157 } 2158 2159 // EncodeMsg implements msgp.Encodable 2160 func (z *ReplicationLatency) EncodeMsg(en *msgp.Writer) (err error) { 2161 // map header, size 1 2162 // write "UploadHistogram" 2163 err = en.Append(0x81, 0xaf, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d) 2164 if err != nil { 2165 return 2166 } 2167 err = z.UploadHistogram.EncodeMsg(en) 2168 if err != nil { 2169 err = msgp.WrapError(err, "UploadHistogram") 2170 return 2171 } 2172 return 2173 } 2174 2175 // MarshalMsg implements msgp.Marshaler 2176 func (z *ReplicationLatency) MarshalMsg(b []byte) (o []byte, err error) { 2177 o = msgp.Require(b, z.Msgsize()) 2178 // map header, size 1 2179 // string "UploadHistogram" 2180 o = append(o, 0x81, 0xaf, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d) 2181 o, err = z.UploadHistogram.MarshalMsg(o) 2182 if err != nil { 2183 err = msgp.WrapError(err, "UploadHistogram") 2184 return 2185 } 2186 return 2187 } 2188 2189 // UnmarshalMsg implements msgp.Unmarshaler 2190 func (z *ReplicationLatency) UnmarshalMsg(bts []byte) (o []byte, err error) { 2191 var field []byte 2192 _ = field 2193 var zb0001 uint32 2194 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 2195 if err != nil { 2196 err = msgp.WrapError(err) 2197 return 2198 } 2199 for zb0001 > 0 { 2200 zb0001-- 2201 field, bts, err = msgp.ReadMapKeyZC(bts) 2202 if err != nil { 2203 err = msgp.WrapError(err) 2204 return 2205 } 2206 switch msgp.UnsafeString(field) { 2207 case "UploadHistogram": 2208 bts, err = z.UploadHistogram.UnmarshalMsg(bts) 2209 if err != nil { 2210 err = msgp.WrapError(err, "UploadHistogram") 2211 return 2212 } 2213 default: 2214 bts, err = msgp.Skip(bts) 2215 if err != nil { 2216 err = msgp.WrapError(err) 2217 return 2218 } 2219 } 2220 } 2221 o = bts 2222 return 2223 } 2224 2225 // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message 2226 func (z *ReplicationLatency) Msgsize() (s int) { 2227 s = 1 + 16 + z.UploadHistogram.Msgsize() 2228 return 2229 } 2230 2231 // DecodeMsg implements msgp.Decodable 2232 func (z *ReplicationQueueStats) DecodeMsg(dc *msgp.Reader) (err error) { 2233 var field []byte 2234 _ = field 2235 var zb0001 uint32 2236 zb0001, err = dc.ReadMapHeader() 2237 if err != nil { 2238 err = msgp.WrapError(err) 2239 return 2240 } 2241 for zb0001 > 0 { 2242 zb0001-- 2243 field, err = dc.ReadMapKeyPtr() 2244 if err != nil { 2245 err = msgp.WrapError(err) 2246 return 2247 } 2248 switch msgp.UnsafeString(field) { 2249 case "Nodes": 2250 var zb0002 uint32 2251 zb0002, err = dc.ReadArrayHeader() 2252 if err != nil { 2253 err = msgp.WrapError(err, "Nodes") 2254 return 2255 } 2256 if cap(z.Nodes) >= int(zb0002) { 2257 z.Nodes = (z.Nodes)[:zb0002] 2258 } else { 2259 z.Nodes = make([]ReplQNodeStats, zb0002) 2260 } 2261 for za0001 := range z.Nodes { 2262 err = z.Nodes[za0001].DecodeMsg(dc) 2263 if err != nil { 2264 err = msgp.WrapError(err, "Nodes", za0001) 2265 return 2266 } 2267 } 2268 case "Uptime": 2269 z.Uptime, err = dc.ReadInt64() 2270 if err != nil { 2271 err = msgp.WrapError(err, "Uptime") 2272 return 2273 } 2274 default: 2275 err = dc.Skip() 2276 if err != nil { 2277 err = msgp.WrapError(err) 2278 return 2279 } 2280 } 2281 } 2282 return 2283 } 2284 2285 // EncodeMsg implements msgp.Encodable 2286 func (z *ReplicationQueueStats) EncodeMsg(en *msgp.Writer) (err error) { 2287 // map header, size 2 2288 // write "Nodes" 2289 err = en.Append(0x82, 0xa5, 0x4e, 0x6f, 0x64, 0x65, 0x73) 2290 if err != nil { 2291 return 2292 } 2293 err = en.WriteArrayHeader(uint32(len(z.Nodes))) 2294 if err != nil { 2295 err = msgp.WrapError(err, "Nodes") 2296 return 2297 } 2298 for za0001 := range z.Nodes { 2299 err = z.Nodes[za0001].EncodeMsg(en) 2300 if err != nil { 2301 err = msgp.WrapError(err, "Nodes", za0001) 2302 return 2303 } 2304 } 2305 // write "Uptime" 2306 err = en.Append(0xa6, 0x55, 0x70, 0x74, 0x69, 0x6d, 0x65) 2307 if err != nil { 2308 return 2309 } 2310 err = en.WriteInt64(z.Uptime) 2311 if err != nil { 2312 err = msgp.WrapError(err, "Uptime") 2313 return 2314 } 2315 return 2316 } 2317 2318 // MarshalMsg implements msgp.Marshaler 2319 func (z *ReplicationQueueStats) MarshalMsg(b []byte) (o []byte, err error) { 2320 o = msgp.Require(b, z.Msgsize()) 2321 // map header, size 2 2322 // string "Nodes" 2323 o = append(o, 0x82, 0xa5, 0x4e, 0x6f, 0x64, 0x65, 0x73) 2324 o = msgp.AppendArrayHeader(o, uint32(len(z.Nodes))) 2325 for za0001 := range z.Nodes { 2326 o, err = z.Nodes[za0001].MarshalMsg(o) 2327 if err != nil { 2328 err = msgp.WrapError(err, "Nodes", za0001) 2329 return 2330 } 2331 } 2332 // string "Uptime" 2333 o = append(o, 0xa6, 0x55, 0x70, 0x74, 0x69, 0x6d, 0x65) 2334 o = msgp.AppendInt64(o, z.Uptime) 2335 return 2336 } 2337 2338 // UnmarshalMsg implements msgp.Unmarshaler 2339 func (z *ReplicationQueueStats) UnmarshalMsg(bts []byte) (o []byte, err error) { 2340 var field []byte 2341 _ = field 2342 var zb0001 uint32 2343 zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) 2344 if err != nil { 2345 err = msgp.WrapError(err) 2346 return 2347 } 2348 for zb0001 > 0 { 2349 zb0001-- 2350 field, bts, err = msgp.ReadMapKeyZC(bts) 2351 if err != nil { 2352 err = msgp.WrapError(err) 2353 return 2354 } 2355 switch msgp.UnsafeString(field) { 2356 case "Nodes": 2357 var zb0002 uint32 2358 zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) 2359 if err != nil { 2360 err = msgp.WrapError(err, "Nodes") 2361 return 2362 } 2363 if cap(z.Nodes) >= int(zb0002) { 2364 z.Nodes = (z.Nodes)[:zb0002] 2365 } else { 2366 z.Nodes = make([]ReplQNodeStats, zb0002) 2367 } 2368 for za0001 := range z.Nodes { 2369 bts, err = z.Nodes[za0001].UnmarshalMsg(bts) 2370 if err != nil { 2371 err = msgp.WrapError(err, "Nodes", za0001) 2372 return 2373 } 2374 } 2375 case "Uptime": 2376 z.Uptime, bts, err = msgp.ReadInt64Bytes(bts) 2377 if err != nil { 2378 err = msgp.WrapError(err, "Uptime") 2379 return 2380 } 2381 default: 2382 bts, err = msgp.Skip(bts) 2383 if err != nil { 2384 err = msgp.WrapError(err) 2385 return 2386 } 2387 } 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 *ReplicationQueueStats) Msgsize() (s int) { 2395 s = 1 + 6 + msgp.ArrayHeaderSize 2396 for za0001 := range z.Nodes { 2397 s += z.Nodes[za0001].Msgsize() 2398 } 2399 s += 7 + msgp.Int64Size 2400 return 2401 }