2020-03-18 19:19:29 -04:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
// Code generated by github.com/tinylib/msgp DO NOT EDIT.
|
|
|
|
|
|
|
|
import (
|
2022-07-05 17:45:49 -04:00
|
|
|
"time"
|
|
|
|
|
2020-03-18 19:19:29 -04:00
|
|
|
"github.com/tinylib/msgp/msgp"
|
|
|
|
)
|
|
|
|
|
2021-10-23 21:38:33 -04:00
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *allTierStats) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadMapHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, err = dc.ReadMapKeyPtr()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "ts":
|
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, err = dc.ReadMapHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Tiers")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.Tiers == nil {
|
|
|
|
z.Tiers = make(map[string]tierStats, zb0002)
|
|
|
|
} else if len(z.Tiers) > 0 {
|
|
|
|
for key := range z.Tiers {
|
|
|
|
delete(z.Tiers, key)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for zb0002 > 0 {
|
|
|
|
zb0002--
|
|
|
|
var za0001 string
|
|
|
|
var za0002 tierStats
|
|
|
|
za0001, err = dc.ReadString()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Tiers")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var zb0003 uint32
|
|
|
|
zb0003, err = dc.ReadMapHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Tiers", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for zb0003 > 0 {
|
|
|
|
zb0003--
|
|
|
|
field, err = dc.ReadMapKeyPtr()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Tiers", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "ts":
|
|
|
|
za0002.TotalSize, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Tiers", za0001, "TotalSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "nv":
|
|
|
|
za0002.NumVersions, err = dc.ReadInt()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Tiers", za0001, "NumVersions")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "no":
|
|
|
|
za0002.NumObjects, err = dc.ReadInt()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Tiers", za0001, "NumObjects")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
err = dc.Skip()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Tiers", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
z.Tiers[za0001] = za0002
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
err = dc.Skip()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z *allTierStats) EncodeMsg(en *msgp.Writer) (err error) {
|
|
|
|
// map header, size 1
|
|
|
|
// write "ts"
|
|
|
|
err = en.Append(0x81, 0xa2, 0x74, 0x73)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteMapHeader(uint32(len(z.Tiers)))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Tiers")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001, za0002 := range z.Tiers {
|
|
|
|
err = en.WriteString(za0001)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Tiers")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// map header, size 3
|
|
|
|
// write "ts"
|
|
|
|
err = en.Append(0x83, 0xa2, 0x74, 0x73)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(za0002.TotalSize)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Tiers", za0001, "TotalSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// write "nv"
|
|
|
|
err = en.Append(0xa2, 0x6e, 0x76)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteInt(za0002.NumVersions)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Tiers", za0001, "NumVersions")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// write "no"
|
|
|
|
err = en.Append(0xa2, 0x6e, 0x6f)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteInt(za0002.NumObjects)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Tiers", za0001, "NumObjects")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z *allTierStats) MarshalMsg(b []byte) (o []byte, err error) {
|
|
|
|
o = msgp.Require(b, z.Msgsize())
|
|
|
|
// map header, size 1
|
|
|
|
// string "ts"
|
|
|
|
o = append(o, 0x81, 0xa2, 0x74, 0x73)
|
|
|
|
o = msgp.AppendMapHeader(o, uint32(len(z.Tiers)))
|
|
|
|
for za0001, za0002 := range z.Tiers {
|
|
|
|
o = msgp.AppendString(o, za0001)
|
|
|
|
// map header, size 3
|
|
|
|
// string "ts"
|
|
|
|
o = append(o, 0x83, 0xa2, 0x74, 0x73)
|
|
|
|
o = msgp.AppendUint64(o, za0002.TotalSize)
|
|
|
|
// string "nv"
|
|
|
|
o = append(o, 0xa2, 0x6e, 0x76)
|
|
|
|
o = msgp.AppendInt(o, za0002.NumVersions)
|
|
|
|
// string "no"
|
|
|
|
o = append(o, 0xa2, 0x6e, 0x6f)
|
|
|
|
o = msgp.AppendInt(o, za0002.NumObjects)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *allTierStats) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "ts":
|
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Tiers")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.Tiers == nil {
|
|
|
|
z.Tiers = make(map[string]tierStats, zb0002)
|
|
|
|
} else if len(z.Tiers) > 0 {
|
|
|
|
for key := range z.Tiers {
|
|
|
|
delete(z.Tiers, key)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for zb0002 > 0 {
|
|
|
|
var za0001 string
|
|
|
|
var za0002 tierStats
|
|
|
|
zb0002--
|
|
|
|
za0001, bts, err = msgp.ReadStringBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Tiers")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var zb0003 uint32
|
|
|
|
zb0003, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Tiers", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for zb0003 > 0 {
|
|
|
|
zb0003--
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Tiers", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "ts":
|
|
|
|
za0002.TotalSize, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Tiers", za0001, "TotalSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "nv":
|
|
|
|
za0002.NumVersions, bts, err = msgp.ReadIntBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Tiers", za0001, "NumVersions")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "no":
|
|
|
|
za0002.NumObjects, bts, err = msgp.ReadIntBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Tiers", za0001, "NumObjects")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
bts, err = msgp.Skip(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Tiers", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
z.Tiers[za0001] = za0002
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
bts, err = msgp.Skip(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *allTierStats) Msgsize() (s int) {
|
|
|
|
s = 1 + 3 + msgp.MapHeaderSize
|
|
|
|
if z.Tiers != nil {
|
|
|
|
for za0001, za0002 := range z.Tiers {
|
|
|
|
_ = za0002
|
|
|
|
s += msgp.StringPrefixSize + len(za0001) + 1 + 3 + msgp.Uint64Size + 3 + msgp.IntSize + 3 + msgp.IntSize
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2022-07-05 17:45:49 -04:00
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z *currentScannerCycle) MarshalMsg(b []byte) (o []byte, err error) {
|
|
|
|
o = msgp.Require(b, z.Msgsize())
|
|
|
|
// map header, size 4
|
|
|
|
// string "current"
|
|
|
|
o = append(o, 0x84, 0xa7, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74)
|
|
|
|
o = msgp.AppendUint64(o, z.current)
|
|
|
|
// string "next"
|
|
|
|
o = append(o, 0xa4, 0x6e, 0x65, 0x78, 0x74)
|
|
|
|
o = msgp.AppendUint64(o, z.next)
|
|
|
|
// string "started"
|
|
|
|
o = append(o, 0xa7, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64)
|
|
|
|
o = msgp.AppendTime(o, z.started)
|
|
|
|
// string "cycleCompleted"
|
|
|
|
o = append(o, 0xae, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64)
|
|
|
|
o = msgp.AppendArrayHeader(o, uint32(len(z.cycleCompleted)))
|
|
|
|
for za0001 := range z.cycleCompleted {
|
|
|
|
o = msgp.AppendTime(o, z.cycleCompleted[za0001])
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *currentScannerCycle) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "current":
|
|
|
|
z.current, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "current")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "next":
|
|
|
|
z.next, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "next")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "started":
|
|
|
|
z.started, bts, err = msgp.ReadTimeBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "started")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "cycleCompleted":
|
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "cycleCompleted")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if cap(z.cycleCompleted) >= int(zb0002) {
|
|
|
|
z.cycleCompleted = (z.cycleCompleted)[:zb0002]
|
|
|
|
} else {
|
|
|
|
z.cycleCompleted = make([]time.Time, zb0002)
|
|
|
|
}
|
|
|
|
for za0001 := range z.cycleCompleted {
|
|
|
|
z.cycleCompleted[za0001], bts, err = msgp.ReadTimeBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "cycleCompleted", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
bts, err = msgp.Skip(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *currentScannerCycle) Msgsize() (s int) {
|
|
|
|
s = 1 + 8 + msgp.Uint64Size + 5 + msgp.Uint64Size + 8 + msgp.TimeSize + 15 + msgp.ArrayHeaderSize + (len(z.cycleCompleted) * (msgp.TimeSize))
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2020-06-12 13:28:21 -04:00
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *dataUsageCache) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadMapHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, err = dc.ReadMapKeyPtr()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "Info":
|
|
|
|
err = z.Info.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Info")
|
|
|
|
return
|
|
|
|
}
|
2020-12-01 15:07:39 -05:00
|
|
|
case "Cache":
|
2021-04-03 12:03:42 -04:00
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, err = dc.ReadMapHeader()
|
2020-06-12 13:28:21 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.Cache == nil {
|
2021-04-03 12:03:42 -04:00
|
|
|
z.Cache = make(map[string]dataUsageEntry, zb0002)
|
2020-06-12 13:28:21 -04:00
|
|
|
} else if len(z.Cache) > 0 {
|
|
|
|
for key := range z.Cache {
|
|
|
|
delete(z.Cache, key)
|
|
|
|
}
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
for zb0002 > 0 {
|
|
|
|
zb0002--
|
|
|
|
var za0001 string
|
|
|
|
var za0002 dataUsageEntry
|
|
|
|
za0001, err = dc.ReadString()
|
2020-06-12 13:28:21 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
err = za0002.DecodeMsg(dc)
|
2020-06-12 13:28:21 -04:00
|
|
|
if err != nil {
|
2021-04-03 12:03:42 -04:00
|
|
|
err = msgp.WrapError(err, "Cache", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Cache[za0001] = za0002
|
|
|
|
}
|
2020-06-12 13:28:21 -04:00
|
|
|
default:
|
|
|
|
err = dc.Skip()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z *dataUsageCache) EncodeMsg(en *msgp.Writer) (err error) {
|
2022-01-26 11:34:56 -05:00
|
|
|
// map header, size 2
|
2020-06-12 13:28:21 -04:00
|
|
|
// write "Info"
|
2022-01-26 11:34:56 -05:00
|
|
|
err = en.Append(0x82, 0xa4, 0x49, 0x6e, 0x66, 0x6f)
|
2020-06-12 13:28:21 -04:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = z.Info.EncodeMsg(en)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Info")
|
|
|
|
return
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
// write "Cache"
|
|
|
|
err = en.Append(0xa5, 0x43, 0x61, 0x63, 0x68, 0x65)
|
2020-12-01 15:07:39 -05:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
err = en.WriteMapHeader(uint32(len(z.Cache)))
|
2020-12-01 15:07:39 -05:00
|
|
|
if err != nil {
|
2021-04-03 12:03:42 -04:00
|
|
|
err = msgp.WrapError(err, "Cache")
|
2020-12-01 15:07:39 -05:00
|
|
|
return
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
for za0001, za0002 := range z.Cache {
|
|
|
|
err = en.WriteString(za0001)
|
2020-12-01 15:07:39 -05:00
|
|
|
if err != nil {
|
2021-04-03 12:03:42 -04:00
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = za0002.EncodeMsg(en)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache", za0001)
|
2020-12-01 15:07:39 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2020-06-12 13:28:21 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z *dataUsageCache) MarshalMsg(b []byte) (o []byte, err error) {
|
|
|
|
o = msgp.Require(b, z.Msgsize())
|
2022-01-26 11:34:56 -05:00
|
|
|
// map header, size 2
|
2020-06-12 13:28:21 -04:00
|
|
|
// string "Info"
|
2022-01-26 11:34:56 -05:00
|
|
|
o = append(o, 0x82, 0xa4, 0x49, 0x6e, 0x66, 0x6f)
|
2020-06-12 13:28:21 -04:00
|
|
|
o, err = z.Info.MarshalMsg(o)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Info")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// string "Cache"
|
|
|
|
o = append(o, 0xa5, 0x43, 0x61, 0x63, 0x68, 0x65)
|
|
|
|
o = msgp.AppendMapHeader(o, uint32(len(z.Cache)))
|
2021-04-03 12:03:42 -04:00
|
|
|
for za0001, za0002 := range z.Cache {
|
|
|
|
o = msgp.AppendString(o, za0001)
|
|
|
|
o, err = za0002.MarshalMsg(o)
|
2020-06-12 13:28:21 -04:00
|
|
|
if err != nil {
|
2021-04-03 12:03:42 -04:00
|
|
|
err = msgp.WrapError(err, "Cache", za0001)
|
2020-06-12 13:28:21 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *dataUsageCache) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "Info":
|
|
|
|
bts, err = z.Info.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Info")
|
|
|
|
return
|
|
|
|
}
|
2020-12-01 15:07:39 -05:00
|
|
|
case "Cache":
|
2021-04-03 12:03:42 -04:00
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, bts, err = msgp.ReadMapHeaderBytes(bts)
|
2020-06-12 13:28:21 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.Cache == nil {
|
2021-04-03 12:03:42 -04:00
|
|
|
z.Cache = make(map[string]dataUsageEntry, zb0002)
|
2020-06-12 13:28:21 -04:00
|
|
|
} else if len(z.Cache) > 0 {
|
|
|
|
for key := range z.Cache {
|
|
|
|
delete(z.Cache, key)
|
|
|
|
}
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
for zb0002 > 0 {
|
|
|
|
var za0001 string
|
|
|
|
var za0002 dataUsageEntry
|
|
|
|
zb0002--
|
|
|
|
za0001, bts, err = msgp.ReadStringBytes(bts)
|
2020-06-12 13:28:21 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
bts, err = za0002.UnmarshalMsg(bts)
|
2020-06-12 13:28:21 -04:00
|
|
|
if err != nil {
|
2021-04-03 12:03:42 -04:00
|
|
|
err = msgp.WrapError(err, "Cache", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Cache[za0001] = za0002
|
|
|
|
}
|
2020-06-12 13:28:21 -04:00
|
|
|
default:
|
|
|
|
bts, err = msgp.Skip(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *dataUsageCache) Msgsize() (s int) {
|
2021-04-03 12:03:42 -04:00
|
|
|
s = 1 + 5 + z.Info.Msgsize() + 6 + msgp.MapHeaderSize
|
2020-06-12 13:28:21 -04:00
|
|
|
if z.Cache != nil {
|
2021-04-03 12:03:42 -04:00
|
|
|
for za0001, za0002 := range z.Cache {
|
|
|
|
_ = za0002
|
|
|
|
s += msgp.StringPrefixSize + len(za0001) + za0002.Msgsize()
|
2020-06-12 13:28:21 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2020-03-18 19:19:29 -04:00
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *dataUsageCacheInfo) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadMapHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, err = dc.ReadMapKeyPtr()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "Name":
|
|
|
|
z.Name, err = dc.ReadString()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Name")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "NextCycle":
|
2020-04-27 13:06:21 -04:00
|
|
|
z.NextCycle, err = dc.ReadUint32()
|
2020-03-18 19:19:29 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "NextCycle")
|
|
|
|
return
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
case "LastUpdate":
|
|
|
|
z.LastUpdate, err = dc.ReadTime()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "LastUpdate")
|
|
|
|
return
|
|
|
|
}
|
2021-01-19 05:40:52 -05:00
|
|
|
case "SkipHealing":
|
|
|
|
z.SkipHealing, err = dc.ReadBool()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "SkipHealing")
|
|
|
|
return
|
|
|
|
}
|
2020-03-18 19:19:29 -04:00
|
|
|
default:
|
|
|
|
err = dc.Skip()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
2020-04-27 13:06:21 -04:00
|
|
|
func (z *dataUsageCacheInfo) EncodeMsg(en *msgp.Writer) (err error) {
|
2023-02-23 22:33:31 -05:00
|
|
|
// map header, size 4
|
2020-03-18 19:19:29 -04:00
|
|
|
// write "Name"
|
2023-02-23 22:33:31 -05:00
|
|
|
err = en.Append(0x84, 0xa4, 0x4e, 0x61, 0x6d, 0x65)
|
2020-03-18 19:19:29 -04:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteString(z.Name)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Name")
|
|
|
|
return
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
// write "NextCycle"
|
|
|
|
err = en.Append(0xa9, 0x4e, 0x65, 0x78, 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65)
|
2020-03-18 19:19:29 -04:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
err = en.WriteUint32(z.NextCycle)
|
2020-03-18 19:19:29 -04:00
|
|
|
if err != nil {
|
2021-04-03 12:03:42 -04:00
|
|
|
err = msgp.WrapError(err, "NextCycle")
|
2020-03-18 19:19:29 -04:00
|
|
|
return
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
// write "LastUpdate"
|
|
|
|
err = en.Append(0xaa, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65)
|
2020-03-18 19:19:29 -04:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
err = en.WriteTime(z.LastUpdate)
|
2020-03-18 19:19:29 -04:00
|
|
|
if err != nil {
|
2021-04-03 12:03:42 -04:00
|
|
|
err = msgp.WrapError(err, "LastUpdate")
|
2020-03-18 19:19:29 -04:00
|
|
|
return
|
|
|
|
}
|
2021-01-19 05:40:52 -05:00
|
|
|
// write "SkipHealing"
|
|
|
|
err = en.Append(0xab, 0x53, 0x6b, 0x69, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x69, 0x6e, 0x67)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteBool(z.SkipHealing)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "SkipHealing")
|
|
|
|
return
|
|
|
|
}
|
2020-03-18 19:19:29 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
2020-04-27 13:06:21 -04:00
|
|
|
func (z *dataUsageCacheInfo) MarshalMsg(b []byte) (o []byte, err error) {
|
2020-03-18 19:19:29 -04:00
|
|
|
o = msgp.Require(b, z.Msgsize())
|
2023-02-23 22:33:31 -05:00
|
|
|
// map header, size 4
|
2020-03-18 19:19:29 -04:00
|
|
|
// string "Name"
|
2023-02-23 22:33:31 -05:00
|
|
|
o = append(o, 0x84, 0xa4, 0x4e, 0x61, 0x6d, 0x65)
|
2020-03-18 19:19:29 -04:00
|
|
|
o = msgp.AppendString(o, z.Name)
|
|
|
|
// string "NextCycle"
|
|
|
|
o = append(o, 0xa9, 0x4e, 0x65, 0x78, 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65)
|
2020-04-27 13:06:21 -04:00
|
|
|
o = msgp.AppendUint32(o, z.NextCycle)
|
2021-04-03 12:03:42 -04:00
|
|
|
// string "LastUpdate"
|
|
|
|
o = append(o, 0xaa, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65)
|
|
|
|
o = msgp.AppendTime(o, z.LastUpdate)
|
2021-01-19 05:40:52 -05:00
|
|
|
// string "SkipHealing"
|
|
|
|
o = append(o, 0xab, 0x53, 0x6b, 0x69, 0x70, 0x48, 0x65, 0x61, 0x6c, 0x69, 0x6e, 0x67)
|
|
|
|
o = msgp.AppendBool(o, z.SkipHealing)
|
2020-03-18 19:19:29 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *dataUsageCacheInfo) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "Name":
|
|
|
|
z.Name, bts, err = msgp.ReadStringBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Name")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "NextCycle":
|
2020-04-27 13:06:21 -04:00
|
|
|
z.NextCycle, bts, err = msgp.ReadUint32Bytes(bts)
|
2020-03-18 19:19:29 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "NextCycle")
|
|
|
|
return
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
case "LastUpdate":
|
|
|
|
z.LastUpdate, bts, err = msgp.ReadTimeBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "LastUpdate")
|
|
|
|
return
|
|
|
|
}
|
2021-01-19 05:40:52 -05:00
|
|
|
case "SkipHealing":
|
|
|
|
z.SkipHealing, bts, err = msgp.ReadBoolBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "SkipHealing")
|
|
|
|
return
|
|
|
|
}
|
2020-03-18 19:19:29 -04:00
|
|
|
default:
|
|
|
|
bts, err = msgp.Skip(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
2020-04-27 13:06:21 -04:00
|
|
|
func (z *dataUsageCacheInfo) Msgsize() (s int) {
|
2023-02-23 22:33:31 -05:00
|
|
|
s = 1 + 5 + msgp.StringPrefixSize + len(z.Name) + 10 + msgp.Uint32Size + 11 + msgp.TimeSize + 12 + msgp.BoolSize
|
2020-03-18 19:19:29 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-01-13 12:58:08 -05:00
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *dataUsageCacheV2) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadMapHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, err = dc.ReadMapKeyPtr()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "Info":
|
|
|
|
err = z.Info.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Info")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "Cache":
|
2022-01-26 11:34:56 -05:00
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, err = dc.ReadMapHeader()
|
2021-01-13 12:58:08 -05:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.Cache == nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
z.Cache = make(map[string]dataUsageEntryV2, zb0002)
|
2021-01-13 12:58:08 -05:00
|
|
|
} else if len(z.Cache) > 0 {
|
|
|
|
for key := range z.Cache {
|
|
|
|
delete(z.Cache, key)
|
|
|
|
}
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
for zb0002 > 0 {
|
|
|
|
zb0002--
|
|
|
|
var za0001 string
|
|
|
|
var za0002 dataUsageEntryV2
|
|
|
|
za0001, err = dc.ReadString()
|
2021-01-13 12:58:08 -05:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
err = za0002.DecodeMsg(dc)
|
2021-01-13 12:58:08 -05:00
|
|
|
if err != nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
err = msgp.WrapError(err, "Cache", za0001)
|
2021-01-13 12:58:08 -05:00
|
|
|
return
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
z.Cache[za0001] = za0002
|
2021-01-13 12:58:08 -05:00
|
|
|
}
|
|
|
|
default:
|
|
|
|
err = dc.Skip()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *dataUsageCacheV2) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "Info":
|
|
|
|
bts, err = z.Info.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Info")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "Cache":
|
2022-01-26 11:34:56 -05:00
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, bts, err = msgp.ReadMapHeaderBytes(bts)
|
2021-01-13 12:58:08 -05:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.Cache == nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
z.Cache = make(map[string]dataUsageEntryV2, zb0002)
|
2021-01-13 12:58:08 -05:00
|
|
|
} else if len(z.Cache) > 0 {
|
|
|
|
for key := range z.Cache {
|
|
|
|
delete(z.Cache, key)
|
|
|
|
}
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
for zb0002 > 0 {
|
|
|
|
var za0001 string
|
|
|
|
var za0002 dataUsageEntryV2
|
|
|
|
zb0002--
|
|
|
|
za0001, bts, err = msgp.ReadStringBytes(bts)
|
2021-01-13 12:58:08 -05:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
bts, err = za0002.UnmarshalMsg(bts)
|
2021-01-13 12:58:08 -05:00
|
|
|
if err != nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
err = msgp.WrapError(err, "Cache", za0001)
|
2021-01-13 12:58:08 -05:00
|
|
|
return
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
z.Cache[za0001] = za0002
|
2021-01-13 12:58:08 -05:00
|
|
|
}
|
|
|
|
default:
|
|
|
|
bts, err = msgp.Skip(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *dataUsageCacheV2) Msgsize() (s int) {
|
2022-01-26 11:34:56 -05:00
|
|
|
s = 1 + 5 + z.Info.Msgsize() + 6 + msgp.MapHeaderSize
|
2021-01-13 12:58:08 -05:00
|
|
|
if z.Cache != nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
for za0001, za0002 := range z.Cache {
|
|
|
|
_ = za0002
|
|
|
|
s += msgp.StringPrefixSize + len(za0001) + za0002.Msgsize()
|
2021-01-13 12:58:08 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2020-03-18 19:19:29 -04:00
|
|
|
// DecodeMsg implements msgp.Decodable
|
2021-04-03 12:03:42 -04:00
|
|
|
func (z *dataUsageCacheV3) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
2020-03-18 19:19:29 -04:00
|
|
|
var zb0001 uint32
|
2021-04-03 12:03:42 -04:00
|
|
|
zb0001, err = dc.ReadMapHeader()
|
2020-03-18 19:19:29 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, err = dc.ReadMapKeyPtr()
|
2020-03-18 19:19:29 -04:00
|
|
|
if err != nil {
|
2021-04-03 12:03:42 -04:00
|
|
|
err = msgp.WrapError(err)
|
2020-03-18 19:19:29 -04:00
|
|
|
return
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "Info":
|
|
|
|
err = z.Info.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Info")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "Cache":
|
2022-01-26 11:34:56 -05:00
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, err = dc.ReadMapHeader()
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.Cache == nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
z.Cache = make(map[string]dataUsageEntryV3, zb0002)
|
2021-04-03 12:03:42 -04:00
|
|
|
} else if len(z.Cache) > 0 {
|
|
|
|
for key := range z.Cache {
|
|
|
|
delete(z.Cache, key)
|
|
|
|
}
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
for zb0002 > 0 {
|
|
|
|
zb0002--
|
|
|
|
var za0001 string
|
|
|
|
var za0002 dataUsageEntryV3
|
|
|
|
za0001, err = dc.ReadString()
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
err = za0002.DecodeMsg(dc)
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
err = msgp.WrapError(err, "Cache", za0001)
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
z.Cache[za0001] = za0002
|
2021-04-03 12:03:42 -04:00
|
|
|
}
|
|
|
|
default:
|
|
|
|
err = dc.Skip()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-11 21:36:15 -04:00
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *dataUsageCacheV3) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
2021-05-11 21:36:15 -04:00
|
|
|
err = msgp.WrapError(err)
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
2021-05-11 21:36:15 -04:00
|
|
|
err = msgp.WrapError(err)
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "Info":
|
|
|
|
bts, err = z.Info.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Info")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "Cache":
|
2022-01-26 11:34:56 -05:00
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, bts, err = msgp.ReadMapHeaderBytes(bts)
|
2021-05-11 21:36:15 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.Cache == nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
z.Cache = make(map[string]dataUsageEntryV3, zb0002)
|
2021-05-11 21:36:15 -04:00
|
|
|
} else if len(z.Cache) > 0 {
|
|
|
|
for key := range z.Cache {
|
|
|
|
delete(z.Cache, key)
|
|
|
|
}
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
for zb0002 > 0 {
|
|
|
|
var za0001 string
|
|
|
|
var za0002 dataUsageEntryV3
|
|
|
|
zb0002--
|
|
|
|
za0001, bts, err = msgp.ReadStringBytes(bts)
|
2021-05-11 21:36:15 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
bts, err = za0002.UnmarshalMsg(bts)
|
2021-05-11 21:36:15 -04:00
|
|
|
if err != nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
err = msgp.WrapError(err, "Cache", za0001)
|
2021-05-11 21:36:15 -04:00
|
|
|
return
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
z.Cache[za0001] = za0002
|
2021-05-11 21:36:15 -04:00
|
|
|
}
|
|
|
|
default:
|
|
|
|
bts, err = msgp.Skip(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *dataUsageCacheV3) Msgsize() (s int) {
|
2022-01-26 11:34:56 -05:00
|
|
|
s = 1 + 5 + z.Info.Msgsize() + 6 + msgp.MapHeaderSize
|
2021-05-11 21:36:15 -04:00
|
|
|
if z.Cache != nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
for za0001, za0002 := range z.Cache {
|
|
|
|
_ = za0002
|
|
|
|
s += msgp.StringPrefixSize + len(za0001) + za0002.Msgsize()
|
2021-04-03 12:03:42 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-11 21:36:15 -04:00
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *dataUsageCacheV4) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadMapHeader()
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
2021-05-11 21:36:15 -04:00
|
|
|
err = msgp.WrapError(err)
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, err = dc.ReadMapKeyPtr()
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
2021-05-11 21:36:15 -04:00
|
|
|
err = msgp.WrapError(err)
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "Info":
|
|
|
|
err = z.Info.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Info")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "Cache":
|
2022-01-26 11:34:56 -05:00
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, err = dc.ReadMapHeader()
|
2021-05-11 21:36:15 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.Cache == nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
z.Cache = make(map[string]dataUsageEntryV4, zb0002)
|
2021-05-11 21:36:15 -04:00
|
|
|
} else if len(z.Cache) > 0 {
|
|
|
|
for key := range z.Cache {
|
|
|
|
delete(z.Cache, key)
|
|
|
|
}
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
for zb0002 > 0 {
|
|
|
|
zb0002--
|
|
|
|
var za0001 string
|
|
|
|
var za0002 dataUsageEntryV4
|
|
|
|
za0001, err = dc.ReadString()
|
2021-05-11 21:36:15 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
err = za0002.DecodeMsg(dc)
|
2021-05-11 21:36:15 -04:00
|
|
|
if err != nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
err = msgp.WrapError(err, "Cache", za0001)
|
2021-05-11 21:36:15 -04:00
|
|
|
return
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
z.Cache[za0001] = za0002
|
2021-05-11 21:36:15 -04:00
|
|
|
}
|
|
|
|
default:
|
|
|
|
err = dc.Skip()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
2021-05-11 21:36:15 -04:00
|
|
|
func (z *dataUsageCacheV4) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
2021-04-03 12:03:42 -04:00
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "Info":
|
|
|
|
bts, err = z.Info.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Info")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "Cache":
|
2022-01-26 11:34:56 -05:00
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, bts, err = msgp.ReadMapHeaderBytes(bts)
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.Cache == nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
z.Cache = make(map[string]dataUsageEntryV4, zb0002)
|
2021-04-03 12:03:42 -04:00
|
|
|
} else if len(z.Cache) > 0 {
|
|
|
|
for key := range z.Cache {
|
|
|
|
delete(z.Cache, key)
|
|
|
|
}
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
for zb0002 > 0 {
|
|
|
|
var za0001 string
|
|
|
|
var za0002 dataUsageEntryV4
|
|
|
|
zb0002--
|
|
|
|
za0001, bts, err = msgp.ReadStringBytes(bts)
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
bts, err = za0002.UnmarshalMsg(bts)
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
err = msgp.WrapError(err, "Cache", za0001)
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
z.Cache[za0001] = za0002
|
2021-04-03 12:03:42 -04:00
|
|
|
}
|
|
|
|
default:
|
|
|
|
bts, err = msgp.Skip(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
2021-05-11 21:36:15 -04:00
|
|
|
func (z *dataUsageCacheV4) Msgsize() (s int) {
|
2022-01-26 11:34:56 -05:00
|
|
|
s = 1 + 5 + z.Info.Msgsize() + 6 + msgp.MapHeaderSize
|
2021-04-03 12:03:42 -04:00
|
|
|
if z.Cache != nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
for za0001, za0002 := range z.Cache {
|
|
|
|
_ = za0002
|
|
|
|
s += msgp.StringPrefixSize + len(za0001) + za0002.Msgsize()
|
2021-04-03 12:03:42 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-09-18 16:31:35 -04:00
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *dataUsageCacheV5) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadMapHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, err = dc.ReadMapKeyPtr()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "Info":
|
|
|
|
err = z.Info.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Info")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "Cache":
|
2022-01-26 11:34:56 -05:00
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, err = dc.ReadMapHeader()
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.Cache == nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
z.Cache = make(map[string]dataUsageEntryV5, zb0002)
|
2021-09-18 16:31:35 -04:00
|
|
|
} else if len(z.Cache) > 0 {
|
|
|
|
for key := range z.Cache {
|
|
|
|
delete(z.Cache, key)
|
|
|
|
}
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
for zb0002 > 0 {
|
|
|
|
zb0002--
|
|
|
|
var za0001 string
|
|
|
|
var za0002 dataUsageEntryV5
|
|
|
|
za0001, err = dc.ReadString()
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
err = za0002.DecodeMsg(dc)
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
err = msgp.WrapError(err, "Cache", za0001)
|
2021-09-18 16:31:35 -04:00
|
|
|
return
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
z.Cache[za0001] = za0002
|
2021-09-18 16:31:35 -04:00
|
|
|
}
|
|
|
|
default:
|
|
|
|
err = dc.Skip()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *dataUsageCacheV5) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "Info":
|
|
|
|
bts, err = z.Info.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Info")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "Cache":
|
2022-01-26 11:34:56 -05:00
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, bts, err = msgp.ReadMapHeaderBytes(bts)
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.Cache == nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
z.Cache = make(map[string]dataUsageEntryV5, zb0002)
|
2021-09-18 16:31:35 -04:00
|
|
|
} else if len(z.Cache) > 0 {
|
|
|
|
for key := range z.Cache {
|
|
|
|
delete(z.Cache, key)
|
|
|
|
}
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
for zb0002 > 0 {
|
|
|
|
var za0001 string
|
|
|
|
var za0002 dataUsageEntryV5
|
|
|
|
zb0002--
|
|
|
|
za0001, bts, err = msgp.ReadStringBytes(bts)
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
bts, err = za0002.UnmarshalMsg(bts)
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
err = msgp.WrapError(err, "Cache", za0001)
|
2021-09-18 16:31:35 -04:00
|
|
|
return
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
z.Cache[za0001] = za0002
|
2021-09-18 16:31:35 -04:00
|
|
|
}
|
|
|
|
default:
|
|
|
|
bts, err = msgp.Skip(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *dataUsageCacheV5) Msgsize() (s int) {
|
2022-01-26 11:34:56 -05:00
|
|
|
s = 1 + 5 + z.Info.Msgsize() + 6 + msgp.MapHeaderSize
|
2021-09-18 16:31:35 -04:00
|
|
|
if z.Cache != nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
for za0001, za0002 := range z.Cache {
|
|
|
|
_ = za0002
|
|
|
|
s += msgp.StringPrefixSize + len(za0001) + za0002.Msgsize()
|
2021-09-18 16:31:35 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-04-03 12:03:42 -04:00
|
|
|
// DecodeMsg implements msgp.Decodable
|
2021-10-23 21:38:33 -04:00
|
|
|
func (z *dataUsageCacheV6) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
2021-04-03 12:03:42 -04:00
|
|
|
var zb0001 uint32
|
2021-10-23 21:38:33 -04:00
|
|
|
zb0001, err = dc.ReadMapHeader()
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, err = dc.ReadMapKeyPtr()
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
2021-10-23 21:38:33 -04:00
|
|
|
err = msgp.WrapError(err)
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "Info":
|
|
|
|
err = z.Info.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Info")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "Cache":
|
2022-01-26 11:34:56 -05:00
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, err = dc.ReadMapHeader()
|
2021-10-23 21:38:33 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.Cache == nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
z.Cache = make(map[string]dataUsageEntryV6, zb0002)
|
2021-10-23 21:38:33 -04:00
|
|
|
} else if len(z.Cache) > 0 {
|
|
|
|
for key := range z.Cache {
|
|
|
|
delete(z.Cache, key)
|
|
|
|
}
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
for zb0002 > 0 {
|
|
|
|
zb0002--
|
|
|
|
var za0001 string
|
|
|
|
var za0002 dataUsageEntryV6
|
|
|
|
za0001, err = dc.ReadString()
|
2021-10-23 21:38:33 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
err = za0002.DecodeMsg(dc)
|
2021-10-23 21:38:33 -04:00
|
|
|
if err != nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
err = msgp.WrapError(err, "Cache", za0001)
|
2021-10-23 21:38:33 -04:00
|
|
|
return
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
z.Cache[za0001] = za0002
|
2021-10-23 21:38:33 -04:00
|
|
|
}
|
|
|
|
default:
|
|
|
|
err = dc.Skip()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *dataUsageCacheV6) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
2021-05-11 21:36:15 -04:00
|
|
|
if err != nil {
|
2021-10-23 21:38:33 -04:00
|
|
|
err = msgp.WrapError(err)
|
2021-05-11 21:36:15 -04:00
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "Info":
|
|
|
|
bts, err = z.Info.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Info")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "Cache":
|
2022-01-26 11:34:56 -05:00
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, bts, err = msgp.ReadMapHeaderBytes(bts)
|
2021-10-23 21:38:33 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.Cache == nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
z.Cache = make(map[string]dataUsageEntryV6, zb0002)
|
2021-10-23 21:38:33 -04:00
|
|
|
} else if len(z.Cache) > 0 {
|
|
|
|
for key := range z.Cache {
|
|
|
|
delete(z.Cache, key)
|
|
|
|
}
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
for zb0002 > 0 {
|
|
|
|
var za0001 string
|
|
|
|
var za0002 dataUsageEntryV6
|
|
|
|
zb0002--
|
|
|
|
za0001, bts, err = msgp.ReadStringBytes(bts)
|
2021-10-23 21:38:33 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
bts, err = za0002.UnmarshalMsg(bts)
|
2021-10-23 21:38:33 -04:00
|
|
|
if err != nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
err = msgp.WrapError(err, "Cache", za0001)
|
2021-10-23 21:38:33 -04:00
|
|
|
return
|
|
|
|
}
|
2022-01-26 11:34:56 -05:00
|
|
|
z.Cache[za0001] = za0002
|
2021-10-23 21:38:33 -04:00
|
|
|
}
|
|
|
|
default:
|
|
|
|
bts, err = msgp.Skip(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *dataUsageCacheV6) Msgsize() (s int) {
|
2022-01-26 11:34:56 -05:00
|
|
|
s = 1 + 5 + z.Info.Msgsize() + 6 + msgp.MapHeaderSize
|
2021-10-23 21:38:33 -04:00
|
|
|
if z.Cache != nil {
|
2022-01-26 11:34:56 -05:00
|
|
|
for za0001, za0002 := range z.Cache {
|
|
|
|
_ = za0002
|
|
|
|
s += msgp.StringPrefixSize + len(za0001) + za0002.Msgsize()
|
2021-10-23 21:38:33 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2024-01-13 02:51:08 -05:00
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *dataUsageCacheV7) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadMapHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, err = dc.ReadMapKeyPtr()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "Info":
|
|
|
|
err = z.Info.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Info")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "Cache":
|
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, err = dc.ReadMapHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.Cache == nil {
|
|
|
|
z.Cache = make(map[string]dataUsageEntryV7, zb0002)
|
|
|
|
} else if len(z.Cache) > 0 {
|
|
|
|
for key := range z.Cache {
|
|
|
|
delete(z.Cache, key)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for zb0002 > 0 {
|
|
|
|
zb0002--
|
|
|
|
var za0001 string
|
|
|
|
var za0002 dataUsageEntryV7
|
|
|
|
za0001, err = dc.ReadString()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = za0002.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Cache[za0001] = za0002
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
err = dc.Skip()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *dataUsageCacheV7) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "Info":
|
|
|
|
bts, err = z.Info.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Info")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "Cache":
|
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.Cache == nil {
|
|
|
|
z.Cache = make(map[string]dataUsageEntryV7, zb0002)
|
|
|
|
} else if len(z.Cache) > 0 {
|
|
|
|
for key := range z.Cache {
|
|
|
|
delete(z.Cache, key)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for zb0002 > 0 {
|
|
|
|
var za0001 string
|
|
|
|
var za0002 dataUsageEntryV7
|
|
|
|
zb0002--
|
|
|
|
za0001, bts, err = msgp.ReadStringBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
bts, err = za0002.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Cache", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Cache[za0001] = za0002
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
bts, err = msgp.Skip(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *dataUsageCacheV7) Msgsize() (s int) {
|
|
|
|
s = 1 + 5 + z.Info.Msgsize() + 6 + msgp.MapHeaderSize
|
|
|
|
if z.Cache != nil {
|
|
|
|
for za0001, za0002 := range z.Cache {
|
|
|
|
_ = za0002
|
|
|
|
s += msgp.StringPrefixSize + len(za0001) + za0002.Msgsize()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-10-23 21:38:33 -04:00
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *dataUsageEntry) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadMapHeader()
|
2020-12-07 16:47:48 -05:00
|
|
|
if err != nil {
|
2021-10-23 21:38:33 -04:00
|
|
|
err = msgp.WrapError(err)
|
2020-12-07 16:47:48 -05:00
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, err = dc.ReadMapKeyPtr()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "ch":
|
|
|
|
err = z.Children.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Children")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "sz":
|
|
|
|
z.Size, err = dc.ReadInt64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Size")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "os":
|
|
|
|
z.Objects, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Objects")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "vs":
|
|
|
|
z.Versions, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Versions")
|
|
|
|
return
|
|
|
|
}
|
2023-07-18 13:49:40 -04:00
|
|
|
case "dms":
|
|
|
|
z.DeleteMarkers, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "DeleteMarkers")
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
case "szs":
|
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, err = dc.ReadArrayHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0002 != uint32(dataUsageBucketLen) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001 := range z.ObjSizes {
|
|
|
|
z.ObjSizes[za0001], err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2023-03-10 11:53:59 -05:00
|
|
|
case "vh":
|
|
|
|
var zb0003 uint32
|
|
|
|
zb0003, err = dc.ReadArrayHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjVersions")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0003 != uint32(dataUsageVersionLen) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageVersionLen), Got: zb0003}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0002 := range z.ObjVersions {
|
|
|
|
z.ObjVersions[za0002], err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjVersions", za0002)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
case "rs":
|
|
|
|
if dc.IsNil() {
|
|
|
|
err = dc.ReadNil()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicationStats")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ReplicationStats = nil
|
|
|
|
} else {
|
|
|
|
if z.ReplicationStats == nil {
|
|
|
|
z.ReplicationStats = new(replicationAllStats)
|
|
|
|
}
|
|
|
|
err = z.ReplicationStats.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicationStats")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "ats":
|
|
|
|
if dc.IsNil() {
|
|
|
|
err = dc.ReadNil()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "AllTierStats")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.AllTierStats = nil
|
|
|
|
} else {
|
|
|
|
if z.AllTierStats == nil {
|
|
|
|
z.AllTierStats = new(allTierStats)
|
|
|
|
}
|
|
|
|
err = z.AllTierStats.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "AllTierStats")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "c":
|
|
|
|
z.Compacted, err = dc.ReadBool()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Compacted")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
err = dc.Skip()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z *dataUsageEntry) EncodeMsg(en *msgp.Writer) (err error) {
|
2021-10-23 21:38:33 -04:00
|
|
|
// omitempty: check for empty values
|
2023-07-18 13:49:40 -04:00
|
|
|
zb0001Len := uint32(10)
|
|
|
|
var zb0001Mask uint16 /* 10 bits */
|
2022-08-31 15:28:03 -04:00
|
|
|
_ = zb0001Mask
|
2021-10-23 21:38:33 -04:00
|
|
|
if z.ReplicationStats == nil {
|
|
|
|
zb0001Len--
|
2023-07-18 13:49:40 -04:00
|
|
|
zb0001Mask |= 0x80
|
2021-10-23 21:38:33 -04:00
|
|
|
}
|
|
|
|
if z.AllTierStats == nil {
|
|
|
|
zb0001Len--
|
2023-07-18 13:49:40 -04:00
|
|
|
zb0001Mask |= 0x100
|
2021-10-23 21:38:33 -04:00
|
|
|
}
|
|
|
|
// variable map header, size zb0001Len
|
|
|
|
err = en.Append(0x80 | uint8(zb0001Len))
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0001Len == 0 {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// write "ch"
|
|
|
|
err = en.Append(0xa2, 0x63, 0x68)
|
2020-12-07 16:47:48 -05:00
|
|
|
if err != nil {
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
err = z.Children.EncodeMsg(en)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Children")
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
// write "sz"
|
|
|
|
err = en.Append(0xa2, 0x73, 0x7a)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
err = en.WriteInt64(z.Size)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Size")
|
2020-12-07 16:47:48 -05:00
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
// write "os"
|
|
|
|
err = en.Append(0xa2, 0x6f, 0x73)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2020-03-18 19:19:29 -04:00
|
|
|
err = en.WriteUint64(z.Objects)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Objects")
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
// write "vs"
|
|
|
|
err = en.Append(0xa2, 0x76, 0x73)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
err = en.WriteUint64(z.Versions)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Versions")
|
|
|
|
return
|
|
|
|
}
|
2023-07-18 13:49:40 -04:00
|
|
|
// write "dms"
|
|
|
|
err = en.Append(0xa3, 0x64, 0x6d, 0x73)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.DeleteMarkers)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "DeleteMarkers")
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
// write "szs"
|
|
|
|
err = en.Append(0xa3, 0x73, 0x7a, 0x73)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2020-03-18 19:19:29 -04:00
|
|
|
err = en.WriteArrayHeader(uint32(dataUsageBucketLen))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001 := range z.ObjSizes {
|
|
|
|
err = en.WriteUint64(z.ObjSizes[za0001])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2023-03-10 11:53:59 -05:00
|
|
|
// write "vh"
|
|
|
|
err = en.Append(0xa2, 0x76, 0x68)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteArrayHeader(uint32(dataUsageVersionLen))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjVersions")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0002 := range z.ObjVersions {
|
|
|
|
err = en.WriteUint64(z.ObjVersions[za0002])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjVersions", za0002)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2023-07-18 13:49:40 -04:00
|
|
|
if (zb0001Mask & 0x80) == 0 { // if not empty
|
2021-10-23 21:38:33 -04:00
|
|
|
// write "rs"
|
|
|
|
err = en.Append(0xa2, 0x72, 0x73)
|
2021-05-11 21:36:15 -04:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
if z.ReplicationStats == nil {
|
|
|
|
err = en.WriteNil()
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
err = z.ReplicationStats.EncodeMsg(en)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicationStats")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-07-18 13:49:40 -04:00
|
|
|
if (zb0001Mask & 0x100) == 0 { // if not empty
|
2021-10-23 21:38:33 -04:00
|
|
|
// write "ats"
|
|
|
|
err = en.Append(0xa3, 0x61, 0x74, 0x73)
|
2021-05-11 21:36:15 -04:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
if z.AllTierStats == nil {
|
|
|
|
err = en.WriteNil()
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
err = z.AllTierStats.EncodeMsg(en)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "AllTierStats")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// write "c"
|
|
|
|
err = en.Append(0xa1, 0x63)
|
|
|
|
if err != nil {
|
|
|
|
return
|
2021-05-11 21:36:15 -04:00
|
|
|
}
|
|
|
|
err = en.WriteBool(z.Compacted)
|
2020-03-18 19:19:29 -04:00
|
|
|
if err != nil {
|
2021-05-11 21:36:15 -04:00
|
|
|
err = msgp.WrapError(err, "Compacted")
|
2020-03-18 19:19:29 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z *dataUsageEntry) MarshalMsg(b []byte) (o []byte, err error) {
|
|
|
|
o = msgp.Require(b, z.Msgsize())
|
2021-10-23 21:38:33 -04:00
|
|
|
// omitempty: check for empty values
|
2023-07-18 13:49:40 -04:00
|
|
|
zb0001Len := uint32(10)
|
|
|
|
var zb0001Mask uint16 /* 10 bits */
|
2022-08-31 15:28:03 -04:00
|
|
|
_ = zb0001Mask
|
2021-10-23 21:38:33 -04:00
|
|
|
if z.ReplicationStats == nil {
|
|
|
|
zb0001Len--
|
2023-07-18 13:49:40 -04:00
|
|
|
zb0001Mask |= 0x80
|
2021-10-23 21:38:33 -04:00
|
|
|
}
|
|
|
|
if z.AllTierStats == nil {
|
|
|
|
zb0001Len--
|
2023-07-18 13:49:40 -04:00
|
|
|
zb0001Mask |= 0x100
|
2021-10-23 21:38:33 -04:00
|
|
|
}
|
|
|
|
// variable map header, size zb0001Len
|
|
|
|
o = append(o, 0x80|uint8(zb0001Len))
|
|
|
|
if zb0001Len == 0 {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// string "ch"
|
|
|
|
o = append(o, 0xa2, 0x63, 0x68)
|
2021-04-03 12:03:42 -04:00
|
|
|
o, err = z.Children.MarshalMsg(o)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Children")
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
// string "sz"
|
|
|
|
o = append(o, 0xa2, 0x73, 0x7a)
|
2020-03-18 19:19:29 -04:00
|
|
|
o = msgp.AppendInt64(o, z.Size)
|
2021-10-23 21:38:33 -04:00
|
|
|
// string "os"
|
|
|
|
o = append(o, 0xa2, 0x6f, 0x73)
|
2020-03-18 19:19:29 -04:00
|
|
|
o = msgp.AppendUint64(o, z.Objects)
|
2021-10-23 21:38:33 -04:00
|
|
|
// string "vs"
|
|
|
|
o = append(o, 0xa2, 0x76, 0x73)
|
2021-05-11 21:36:15 -04:00
|
|
|
o = msgp.AppendUint64(o, z.Versions)
|
2023-07-18 13:49:40 -04:00
|
|
|
// string "dms"
|
|
|
|
o = append(o, 0xa3, 0x64, 0x6d, 0x73)
|
|
|
|
o = msgp.AppendUint64(o, z.DeleteMarkers)
|
2021-10-23 21:38:33 -04:00
|
|
|
// string "szs"
|
|
|
|
o = append(o, 0xa3, 0x73, 0x7a, 0x73)
|
2020-03-18 19:19:29 -04:00
|
|
|
o = msgp.AppendArrayHeader(o, uint32(dataUsageBucketLen))
|
|
|
|
for za0001 := range z.ObjSizes {
|
|
|
|
o = msgp.AppendUint64(o, z.ObjSizes[za0001])
|
|
|
|
}
|
2023-03-10 11:53:59 -05:00
|
|
|
// string "vh"
|
|
|
|
o = append(o, 0xa2, 0x76, 0x68)
|
|
|
|
o = msgp.AppendArrayHeader(o, uint32(dataUsageVersionLen))
|
|
|
|
for za0002 := range z.ObjVersions {
|
|
|
|
o = msgp.AppendUint64(o, z.ObjVersions[za0002])
|
|
|
|
}
|
2023-07-18 13:49:40 -04:00
|
|
|
if (zb0001Mask & 0x80) == 0 { // if not empty
|
2021-10-23 21:38:33 -04:00
|
|
|
// string "rs"
|
|
|
|
o = append(o, 0xa2, 0x72, 0x73)
|
|
|
|
if z.ReplicationStats == nil {
|
|
|
|
o = msgp.AppendNil(o)
|
|
|
|
} else {
|
|
|
|
o, err = z.ReplicationStats.MarshalMsg(o)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicationStats")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-07-18 13:49:40 -04:00
|
|
|
if (zb0001Mask & 0x100) == 0 { // if not empty
|
2021-10-23 21:38:33 -04:00
|
|
|
// string "ats"
|
|
|
|
o = append(o, 0xa3, 0x61, 0x74, 0x73)
|
|
|
|
if z.AllTierStats == nil {
|
|
|
|
o = msgp.AppendNil(o)
|
|
|
|
} else {
|
|
|
|
o, err = z.AllTierStats.MarshalMsg(o)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "AllTierStats")
|
|
|
|
return
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
}
|
2020-03-18 19:19:29 -04:00
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
// string "c"
|
|
|
|
o = append(o, 0xa1, 0x63)
|
2021-05-11 21:36:15 -04:00
|
|
|
o = msgp.AppendBool(o, z.Compacted)
|
2020-03-18 19:19:29 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *dataUsageEntry) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
2021-10-23 21:38:33 -04:00
|
|
|
var field []byte
|
|
|
|
_ = field
|
2020-03-18 19:19:29 -04:00
|
|
|
var zb0001 uint32
|
2021-10-23 21:38:33 -04:00
|
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
2020-03-18 19:19:29 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
2021-05-11 21:36:15 -04:00
|
|
|
if err != nil {
|
2021-10-23 21:38:33 -04:00
|
|
|
err = msgp.WrapError(err)
|
2021-05-11 21:36:15 -04:00
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "ch":
|
|
|
|
bts, err = z.Children.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Children")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "sz":
|
|
|
|
z.Size, bts, err = msgp.ReadInt64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Size")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "os":
|
|
|
|
z.Objects, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Objects")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "vs":
|
|
|
|
z.Versions, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Versions")
|
|
|
|
return
|
|
|
|
}
|
2023-07-18 13:49:40 -04:00
|
|
|
case "dms":
|
|
|
|
z.DeleteMarkers, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "DeleteMarkers")
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
case "szs":
|
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0002 != uint32(dataUsageBucketLen) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001 := range z.ObjSizes {
|
|
|
|
z.ObjSizes[za0001], bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2023-03-10 11:53:59 -05:00
|
|
|
case "vh":
|
|
|
|
var zb0003 uint32
|
|
|
|
zb0003, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjVersions")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0003 != uint32(dataUsageVersionLen) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageVersionLen), Got: zb0003}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0002 := range z.ObjVersions {
|
|
|
|
z.ObjVersions[za0002], bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjVersions", za0002)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
case "rs":
|
|
|
|
if msgp.IsNil(bts) {
|
|
|
|
bts, err = msgp.ReadNilBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ReplicationStats = nil
|
|
|
|
} else {
|
|
|
|
if z.ReplicationStats == nil {
|
|
|
|
z.ReplicationStats = new(replicationAllStats)
|
|
|
|
}
|
|
|
|
bts, err = z.ReplicationStats.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicationStats")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "ats":
|
|
|
|
if msgp.IsNil(bts) {
|
|
|
|
bts, err = msgp.ReadNilBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.AllTierStats = nil
|
|
|
|
} else {
|
|
|
|
if z.AllTierStats == nil {
|
|
|
|
z.AllTierStats = new(allTierStats)
|
|
|
|
}
|
|
|
|
bts, err = z.AllTierStats.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "AllTierStats")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "c":
|
|
|
|
z.Compacted, bts, err = msgp.ReadBoolBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Compacted")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
bts, err = msgp.Skip(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
}
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *dataUsageEntry) Msgsize() (s int) {
|
2023-07-18 13:49:40 -04:00
|
|
|
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
|
2021-05-11 21:36:15 -04:00
|
|
|
if z.ReplicationStats == nil {
|
|
|
|
s += msgp.NilSize
|
|
|
|
} else {
|
|
|
|
s += z.ReplicationStats.Msgsize()
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
s += 4
|
|
|
|
if z.AllTierStats == nil {
|
|
|
|
s += msgp.NilSize
|
|
|
|
} else {
|
|
|
|
s += z.AllTierStats.Msgsize()
|
|
|
|
}
|
|
|
|
s += 2 + msgp.BoolSize
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *dataUsageEntryV2) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadArrayHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0001 != 4 {
|
|
|
|
err = msgp.ArrayError{Wanted: 4, Got: zb0001}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Size, err = dc.ReadInt64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Size")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Objects, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Objects")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, err = dc.ReadArrayHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0002 != uint32(dataUsageBucketLen) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001 := range z.ObjSizes {
|
|
|
|
z.ObjSizes[za0001], err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
err = z.Children.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Children")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *dataUsageEntryV2) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
2020-12-07 16:47:48 -05:00
|
|
|
if err != nil {
|
2021-04-03 12:03:42 -04:00
|
|
|
err = msgp.WrapError(err)
|
2020-12-07 16:47:48 -05:00
|
|
|
return
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
if zb0001 != 4 {
|
|
|
|
err = msgp.ArrayError{Wanted: 4, Got: zb0001}
|
2020-12-07 16:47:48 -05:00
|
|
|
return
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
z.Size, bts, err = msgp.ReadInt64Bytes(bts)
|
2020-12-07 16:47:48 -05:00
|
|
|
if err != nil {
|
2021-04-03 12:03:42 -04:00
|
|
|
err = msgp.WrapError(err, "Size")
|
2020-12-07 16:47:48 -05:00
|
|
|
return
|
|
|
|
}
|
2020-03-18 19:19:29 -04:00
|
|
|
z.Objects, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Objects")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0002 != uint32(dataUsageBucketLen) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001 := range z.ObjSizes {
|
|
|
|
z.ObjSizes[za0001], bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
bts, err = z.Children.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Children")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
2021-04-03 12:03:42 -04:00
|
|
|
func (z *dataUsageEntryV2) Msgsize() (s int) {
|
|
|
|
s = 1 + msgp.Int64Size + msgp.Uint64Size + msgp.ArrayHeaderSize + (dataUsageBucketLen * (msgp.Uint64Size)) + z.Children.Msgsize()
|
2021-01-13 12:58:08 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
2021-04-03 12:03:42 -04:00
|
|
|
func (z *dataUsageEntryV3) DecodeMsg(dc *msgp.Reader) (err error) {
|
2021-01-13 12:58:08 -05:00
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadArrayHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
if zb0001 != 8 {
|
|
|
|
err = msgp.ArrayError{Wanted: 8, Got: zb0001}
|
2021-01-13 12:58:08 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Size, err = dc.ReadInt64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Size")
|
|
|
|
return
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
z.ReplicatedSize, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicatedSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ReplicationPendingSize, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicationPendingSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ReplicationFailedSize, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicationFailedSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ReplicaSize, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicaSize")
|
|
|
|
return
|
|
|
|
}
|
2021-01-13 12:58:08 -05:00
|
|
|
z.Objects, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Objects")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, err = dc.ReadArrayHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0002 != uint32(dataUsageBucketLen) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001 := range z.ObjSizes {
|
|
|
|
z.ObjSizes[za0001], err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
err = z.Children.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Children")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-11 21:36:15 -04:00
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *dataUsageEntryV3) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
2021-01-13 12:58:08 -05:00
|
|
|
if err != nil {
|
2021-05-11 21:36:15 -04:00
|
|
|
err = msgp.WrapError(err)
|
2021-01-13 12:58:08 -05:00
|
|
|
return
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
if zb0001 != 8 {
|
|
|
|
err = msgp.ArrayError{Wanted: 8, Got: zb0001}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Size, bts, err = msgp.ReadInt64Bytes(bts)
|
2021-01-13 12:58:08 -05:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Size")
|
|
|
|
return
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
z.ReplicatedSize, bts, err = msgp.ReadUint64Bytes(bts)
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicatedSize")
|
|
|
|
return
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
z.ReplicationPendingSize, bts, err = msgp.ReadUint64Bytes(bts)
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicationPendingSize")
|
|
|
|
return
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
z.ReplicationFailedSize, bts, err = msgp.ReadUint64Bytes(bts)
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicationFailedSize")
|
|
|
|
return
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
z.ReplicaSize, bts, err = msgp.ReadUint64Bytes(bts)
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicaSize")
|
|
|
|
return
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
z.Objects, bts, err = msgp.ReadUint64Bytes(bts)
|
2021-01-13 12:58:08 -05:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Objects")
|
|
|
|
return
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
2021-01-13 12:58:08 -05:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes")
|
|
|
|
return
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
if zb0002 != uint32(dataUsageBucketLen) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002}
|
|
|
|
return
|
|
|
|
}
|
2021-01-13 12:58:08 -05:00
|
|
|
for za0001 := range z.ObjSizes {
|
2021-05-11 21:36:15 -04:00
|
|
|
z.ObjSizes[za0001], bts, err = msgp.ReadUint64Bytes(bts)
|
2021-01-13 12:58:08 -05:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
bts, err = z.Children.UnmarshalMsg(bts)
|
2021-01-13 12:58:08 -05:00
|
|
|
if err != nil {
|
2021-10-23 21:38:33 -04:00
|
|
|
err = msgp.WrapError(err, "Children")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *dataUsageEntryV3) Msgsize() (s int) {
|
|
|
|
s = 1 + msgp.Int64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.ArrayHeaderSize + (dataUsageBucketLen * (msgp.Uint64Size)) + z.Children.Msgsize()
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *dataUsageEntryV4) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadArrayHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0001 != 5 {
|
|
|
|
err = msgp.ArrayError{Wanted: 5, Got: zb0001}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = z.Children.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Children")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Size, err = dc.ReadInt64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Size")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Objects, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Objects")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, err = dc.ReadArrayHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0002 != uint32(dataUsageBucketLen) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001 := range z.ObjSizes {
|
|
|
|
z.ObjSizes[za0001], err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
err = z.ReplicationStats.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicationStats")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *dataUsageEntryV4) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0001 != 5 {
|
|
|
|
err = msgp.ArrayError{Wanted: 5, Got: zb0001}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
bts, err = z.Children.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Children")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Size, bts, err = msgp.ReadInt64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Size")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Objects, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Objects")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0002 != uint32(dataUsageBucketLen) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001 := range z.ObjSizes {
|
|
|
|
z.ObjSizes[za0001], bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
bts, err = z.ReplicationStats.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicationStats")
|
2021-01-13 12:58:08 -05:00
|
|
|
return
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
o = bts
|
2021-01-13 12:58:08 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-11 21:36:15 -04:00
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
2021-10-23 21:38:33 -04:00
|
|
|
func (z *dataUsageEntryV4) Msgsize() (s int) {
|
|
|
|
s = 1 + z.Children.Msgsize() + msgp.Int64Size + msgp.Uint64Size + msgp.ArrayHeaderSize + (dataUsageBucketLen * (msgp.Uint64Size)) + z.ReplicationStats.Msgsize()
|
2021-01-13 12:58:08 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-05-11 21:36:15 -04:00
|
|
|
// DecodeMsg implements msgp.Decodable
|
2021-10-23 21:38:33 -04:00
|
|
|
func (z *dataUsageEntryV5) DecodeMsg(dc *msgp.Reader) (err error) {
|
2021-01-13 12:58:08 -05:00
|
|
|
var zb0001 uint32
|
2021-05-11 21:36:15 -04:00
|
|
|
zb0001, err = dc.ReadArrayHeader()
|
2021-01-13 12:58:08 -05:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
if zb0001 != 7 {
|
|
|
|
err = msgp.ArrayError{Wanted: 7, Got: zb0001}
|
2021-01-13 12:58:08 -05:00
|
|
|
return
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
err = z.Children.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Children")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Size, err = dc.ReadInt64()
|
2021-01-13 12:58:08 -05:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Size")
|
|
|
|
return
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
z.Objects, err = dc.ReadUint64()
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
2021-05-11 21:36:15 -04:00
|
|
|
err = msgp.WrapError(err, "Objects")
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
z.Versions, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Versions")
|
|
|
|
return
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, err = dc.ReadArrayHeader()
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
2021-05-11 21:36:15 -04:00
|
|
|
err = msgp.WrapError(err, "ObjSizes")
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
if zb0002 != uint32(dataUsageBucketLen) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001 := range z.ObjSizes {
|
|
|
|
z.ObjSizes[za0001], err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
if dc.IsNil() {
|
|
|
|
err = dc.ReadNil()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicationStats")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ReplicationStats = nil
|
|
|
|
} else {
|
|
|
|
if z.ReplicationStats == nil {
|
|
|
|
z.ReplicationStats = new(replicationStatsV1)
|
|
|
|
}
|
|
|
|
err = z.ReplicationStats.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicationStats")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
z.Compacted, err = dc.ReadBool()
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
2021-10-23 21:38:33 -04:00
|
|
|
err = msgp.WrapError(err, "Compacted")
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
2021-05-11 21:36:15 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
2021-10-23 21:38:33 -04:00
|
|
|
func (z *dataUsageEntryV5) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
2021-05-11 21:36:15 -04:00
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
2021-05-11 21:36:15 -04:00
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
if zb0001 != 7 {
|
|
|
|
err = msgp.ArrayError{Wanted: 7, Got: zb0001}
|
2021-05-11 21:36:15 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
bts, err = z.Children.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Children")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Size, bts, err = msgp.ReadInt64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Size")
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
2021-01-13 12:58:08 -05:00
|
|
|
z.Objects, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Objects")
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
z.Versions, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Versions")
|
|
|
|
return
|
|
|
|
}
|
2021-01-13 12:58:08 -05:00
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0002 != uint32(dataUsageBucketLen) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001 := range z.ObjSizes {
|
|
|
|
z.ObjSizes[za0001], bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
if msgp.IsNil(bts) {
|
|
|
|
bts, err = msgp.ReadNilBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ReplicationStats = nil
|
|
|
|
} else {
|
|
|
|
if z.ReplicationStats == nil {
|
|
|
|
z.ReplicationStats = new(replicationStatsV1)
|
|
|
|
}
|
|
|
|
bts, err = z.ReplicationStats.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicationStats")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
z.Compacted, bts, err = msgp.ReadBoolBytes(bts)
|
2021-01-13 12:58:08 -05:00
|
|
|
if err != nil {
|
2021-10-23 21:38:33 -04:00
|
|
|
err = msgp.WrapError(err, "Compacted")
|
2021-01-13 12:58:08 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
2021-10-23 21:38:33 -04:00
|
|
|
func (z *dataUsageEntryV5) Msgsize() (s int) {
|
|
|
|
s = 1 + z.Children.Msgsize() + msgp.Int64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.ArrayHeaderSize + (dataUsageBucketLen * (msgp.Uint64Size))
|
|
|
|
if z.ReplicationStats == nil {
|
|
|
|
s += msgp.NilSize
|
|
|
|
} else {
|
|
|
|
s += z.ReplicationStats.Msgsize()
|
|
|
|
}
|
|
|
|
s += msgp.BoolSize
|
2020-03-18 19:19:29 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
2021-10-23 21:38:33 -04:00
|
|
|
func (z *dataUsageEntryV6) DecodeMsg(dc *msgp.Reader) (err error) {
|
2021-04-03 12:03:42 -04:00
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadArrayHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2021-09-18 16:31:35 -04:00
|
|
|
if zb0001 != 7 {
|
|
|
|
err = msgp.ArrayError{Wanted: 7, Got: zb0001}
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
2021-09-18 16:31:35 -04:00
|
|
|
err = z.Children.DecodeMsg(dc)
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
2021-09-18 16:31:35 -04:00
|
|
|
err = msgp.WrapError(err, "Children")
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
2021-09-18 16:31:35 -04:00
|
|
|
z.Size, err = dc.ReadInt64()
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
2021-09-18 16:31:35 -04:00
|
|
|
err = msgp.WrapError(err, "Size")
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
2021-09-18 16:31:35 -04:00
|
|
|
z.Objects, err = dc.ReadUint64()
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
2021-09-18 16:31:35 -04:00
|
|
|
err = msgp.WrapError(err, "Objects")
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
2021-09-18 16:31:35 -04:00
|
|
|
z.Versions, err = dc.ReadUint64()
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
2021-09-18 16:31:35 -04:00
|
|
|
err = msgp.WrapError(err, "Versions")
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
2021-09-18 16:31:35 -04:00
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, err = dc.ReadArrayHeader()
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
2021-09-18 16:31:35 -04:00
|
|
|
err = msgp.WrapError(err, "ObjSizes")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0002 != uint32(dataUsageBucketLen) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001 := range z.ObjSizes {
|
|
|
|
z.ObjSizes[za0001], err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if dc.IsNil() {
|
|
|
|
err = dc.ReadNil()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicationStats")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ReplicationStats = nil
|
|
|
|
} else {
|
|
|
|
if z.ReplicationStats == nil {
|
2021-10-23 21:38:33 -04:00
|
|
|
z.ReplicationStats = new(replicationAllStatsV1)
|
2021-09-18 16:31:35 -04:00
|
|
|
}
|
|
|
|
err = z.ReplicationStats.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicationStats")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
z.Compacted, err = dc.ReadBool()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Compacted")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-10-23 21:38:33 -04:00
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *dataUsageEntryV6) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
2021-10-23 21:38:33 -04:00
|
|
|
err = msgp.WrapError(err)
|
2021-09-18 16:31:35 -04:00
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
if zb0001 != 7 {
|
|
|
|
err = msgp.ArrayError{Wanted: 7, Got: zb0001}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
bts, err = z.Children.UnmarshalMsg(bts)
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Children")
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
z.Size, bts, err = msgp.ReadInt64Bytes(bts)
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Size")
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
z.Objects, bts, err = msgp.ReadUint64Bytes(bts)
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Objects")
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
z.Versions, bts, err = msgp.ReadUint64Bytes(bts)
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Versions")
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes")
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
if zb0002 != uint32(dataUsageBucketLen) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0002}
|
|
|
|
return
|
|
|
|
}
|
2021-09-18 16:31:35 -04:00
|
|
|
for za0001 := range z.ObjSizes {
|
2021-10-23 21:38:33 -04:00
|
|
|
z.ObjSizes[za0001], bts, err = msgp.ReadUint64Bytes(bts)
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
if msgp.IsNil(bts) {
|
|
|
|
bts, err = msgp.ReadNilBytes(bts)
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
z.ReplicationStats = nil
|
2021-09-18 16:31:35 -04:00
|
|
|
} else {
|
2021-10-23 21:38:33 -04:00
|
|
|
if z.ReplicationStats == nil {
|
|
|
|
z.ReplicationStats = new(replicationAllStatsV1)
|
|
|
|
}
|
|
|
|
bts, err = z.ReplicationStats.UnmarshalMsg(bts)
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicationStats")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
z.Compacted, bts, err = msgp.ReadBoolBytes(bts)
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Compacted")
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
o = bts
|
2021-09-18 16:31:35 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-10-23 21:38:33 -04:00
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *dataUsageEntryV6) Msgsize() (s int) {
|
|
|
|
s = 1 + z.Children.Msgsize() + msgp.Int64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.ArrayHeaderSize + (dataUsageBucketLen * (msgp.Uint64Size))
|
2021-09-18 16:31:35 -04:00
|
|
|
if z.ReplicationStats == nil {
|
2021-10-23 21:38:33 -04:00
|
|
|
s += msgp.NilSize
|
2021-09-18 16:31:35 -04:00
|
|
|
} else {
|
2021-10-23 21:38:33 -04:00
|
|
|
s += z.ReplicationStats.Msgsize()
|
|
|
|
}
|
|
|
|
s += msgp.BoolSize
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2024-01-13 02:51:08 -05:00
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *dataUsageEntryV7) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadMapHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, err = dc.ReadMapKeyPtr()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "ch":
|
|
|
|
err = z.Children.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Children")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "sz":
|
|
|
|
z.Size, err = dc.ReadInt64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Size")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "os":
|
|
|
|
z.Objects, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Objects")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "vs":
|
|
|
|
z.Versions, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Versions")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "dms":
|
|
|
|
z.DeleteMarkers, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "DeleteMarkers")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "szs":
|
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, err = dc.ReadArrayHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0002 != uint32(dataUsageBucketLenV1) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLenV1), Got: zb0002}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001 := range z.ObjSizes {
|
|
|
|
z.ObjSizes[za0001], err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "vh":
|
|
|
|
var zb0003 uint32
|
|
|
|
zb0003, err = dc.ReadArrayHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjVersions")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0003 != uint32(dataUsageVersionLen) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageVersionLen), Got: zb0003}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0002 := range z.ObjVersions {
|
|
|
|
z.ObjVersions[za0002], err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjVersions", za0002)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "rs":
|
|
|
|
if dc.IsNil() {
|
|
|
|
err = dc.ReadNil()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicationStats")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ReplicationStats = nil
|
|
|
|
} else {
|
|
|
|
if z.ReplicationStats == nil {
|
|
|
|
z.ReplicationStats = new(replicationAllStats)
|
|
|
|
}
|
|
|
|
err = z.ReplicationStats.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicationStats")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "ats":
|
|
|
|
if dc.IsNil() {
|
|
|
|
err = dc.ReadNil()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "AllTierStats")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.AllTierStats = nil
|
|
|
|
} else {
|
|
|
|
if z.AllTierStats == nil {
|
|
|
|
z.AllTierStats = new(allTierStats)
|
|
|
|
}
|
|
|
|
err = z.AllTierStats.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "AllTierStats")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "c":
|
|
|
|
z.Compacted, err = dc.ReadBool()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Compacted")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
err = dc.Skip()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *dataUsageEntryV7) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "ch":
|
|
|
|
bts, err = z.Children.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Children")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "sz":
|
|
|
|
z.Size, bts, err = msgp.ReadInt64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Size")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "os":
|
|
|
|
z.Objects, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Objects")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "vs":
|
|
|
|
z.Versions, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Versions")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "dms":
|
|
|
|
z.DeleteMarkers, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "DeleteMarkers")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "szs":
|
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0002 != uint32(dataUsageBucketLenV1) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLenV1), Got: zb0002}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001 := range z.ObjSizes {
|
|
|
|
z.ObjSizes[za0001], bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjSizes", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "vh":
|
|
|
|
var zb0003 uint32
|
|
|
|
zb0003, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjVersions")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0003 != uint32(dataUsageVersionLen) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageVersionLen), Got: zb0003}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0002 := range z.ObjVersions {
|
|
|
|
z.ObjVersions[za0002], bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjVersions", za0002)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "rs":
|
|
|
|
if msgp.IsNil(bts) {
|
|
|
|
bts, err = msgp.ReadNilBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ReplicationStats = nil
|
|
|
|
} else {
|
|
|
|
if z.ReplicationStats == nil {
|
|
|
|
z.ReplicationStats = new(replicationAllStats)
|
|
|
|
}
|
|
|
|
bts, err = z.ReplicationStats.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicationStats")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "ats":
|
|
|
|
if msgp.IsNil(bts) {
|
|
|
|
bts, err = msgp.ReadNilBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.AllTierStats = nil
|
|
|
|
} else {
|
|
|
|
if z.AllTierStats == nil {
|
|
|
|
z.AllTierStats = new(allTierStats)
|
|
|
|
}
|
|
|
|
bts, err = z.AllTierStats.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "AllTierStats")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "c":
|
|
|
|
z.Compacted, bts, err = msgp.ReadBoolBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Compacted")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
bts, err = msgp.Skip(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *dataUsageEntryV7) Msgsize() (s int) {
|
|
|
|
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
|
|
|
|
if z.ReplicationStats == nil {
|
|
|
|
s += msgp.NilSize
|
|
|
|
} else {
|
|
|
|
s += z.ReplicationStats.Msgsize()
|
|
|
|
}
|
|
|
|
s += 4
|
|
|
|
if z.AllTierStats == nil {
|
|
|
|
s += msgp.NilSize
|
|
|
|
} else {
|
|
|
|
s += z.AllTierStats.Msgsize()
|
|
|
|
}
|
|
|
|
s += 2 + msgp.BoolSize
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-10-23 21:38:33 -04:00
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *dataUsageHash) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
{
|
|
|
|
var zb0001 string
|
|
|
|
zb0001, err = dc.ReadString()
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
2021-10-23 21:38:33 -04:00
|
|
|
err = msgp.WrapError(err)
|
2021-09-18 16:31:35 -04:00
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
(*z) = dataUsageHash(zb0001)
|
2021-09-18 16:31:35 -04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-10-23 21:38:33 -04:00
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z dataUsageHash) EncodeMsg(en *msgp.Writer) (err error) {
|
|
|
|
err = en.WriteString(string(z))
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z dataUsageHash) MarshalMsg(b []byte) (o []byte, err error) {
|
|
|
|
o = msgp.Require(b, z.Msgsize())
|
|
|
|
o = msgp.AppendString(o, string(z))
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *dataUsageHash) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
{
|
|
|
|
var zb0001 string
|
|
|
|
zb0001, bts, err = msgp.ReadStringBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
(*z) = dataUsageHash(zb0001)
|
2021-09-18 16:31:35 -04:00
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z dataUsageHash) Msgsize() (s int) {
|
|
|
|
s = msgp.StringPrefixSize + len(string(z))
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *replicationAllStats) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadMapHeader()
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
2021-10-23 21:38:33 -04:00
|
|
|
err = msgp.WrapError(err)
|
2021-09-18 16:31:35 -04:00
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, err = dc.ReadMapKeyPtr()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "t":
|
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, err = dc.ReadMapHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Targets")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.Targets == nil {
|
|
|
|
z.Targets = make(map[string]replicationStats, zb0002)
|
|
|
|
} else if len(z.Targets) > 0 {
|
|
|
|
for key := range z.Targets {
|
|
|
|
delete(z.Targets, key)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for zb0002 > 0 {
|
|
|
|
zb0002--
|
|
|
|
var za0001 string
|
|
|
|
var za0002 replicationStats
|
|
|
|
za0001, err = dc.ReadString()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Targets")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = za0002.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Targets", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Targets[za0001] = za0002
|
|
|
|
}
|
|
|
|
case "r":
|
|
|
|
z.ReplicaSize, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicaSize")
|
|
|
|
return
|
|
|
|
}
|
2023-08-30 04:00:59 -04:00
|
|
|
case "rc":
|
|
|
|
z.ReplicaCount, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicaCount")
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
default:
|
|
|
|
err = dc.Skip()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2021-09-18 16:31:35 -04:00
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z *replicationAllStats) EncodeMsg(en *msgp.Writer) (err error) {
|
|
|
|
// omitempty: check for empty values
|
2023-08-30 04:00:59 -04:00
|
|
|
zb0001Len := uint32(3)
|
|
|
|
var zb0001Mask uint8 /* 3 bits */
|
2022-08-31 15:28:03 -04:00
|
|
|
_ = zb0001Mask
|
2021-10-23 21:38:33 -04:00
|
|
|
if z.Targets == nil {
|
|
|
|
zb0001Len--
|
|
|
|
zb0001Mask |= 0x1
|
2021-09-18 16:31:35 -04:00
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
if z.ReplicaSize == 0 {
|
|
|
|
zb0001Len--
|
|
|
|
zb0001Mask |= 0x2
|
2021-09-18 16:31:35 -04:00
|
|
|
}
|
2023-08-30 04:00:59 -04:00
|
|
|
if z.ReplicaCount == 0 {
|
|
|
|
zb0001Len--
|
|
|
|
zb0001Mask |= 0x4
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
// variable map header, size zb0001Len
|
|
|
|
err = en.Append(0x80 | uint8(zb0001Len))
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
if zb0001Len == 0 {
|
2021-09-18 16:31:35 -04:00
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
if (zb0001Mask & 0x1) == 0 { // if not empty
|
|
|
|
// write "t"
|
|
|
|
err = en.Append(0xa1, 0x74)
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
err = en.WriteMapHeader(uint32(len(z.Targets)))
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
2021-10-23 21:38:33 -04:00
|
|
|
err = msgp.WrapError(err, "Targets")
|
2021-09-18 16:31:35 -04:00
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
for za0001, za0002 := range z.Targets {
|
|
|
|
err = en.WriteString(za0001)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Targets")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = za0002.EncodeMsg(en)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Targets", za0001)
|
|
|
|
return
|
|
|
|
}
|
2021-09-18 16:31:35 -04:00
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
}
|
|
|
|
if (zb0001Mask & 0x2) == 0 { // if not empty
|
|
|
|
// write "r"
|
|
|
|
err = en.Append(0xa1, 0x72)
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
2021-10-23 21:38:33 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.ReplicaSize)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicaSize")
|
2021-09-18 16:31:35 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2023-08-30 04:00:59 -04:00
|
|
|
if (zb0001Mask & 0x4) == 0 { // if not empty
|
|
|
|
// write "rc"
|
|
|
|
err = en.Append(0xa2, 0x72, 0x63)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.ReplicaCount)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicaCount")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2021-09-18 16:31:35 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-10-23 21:38:33 -04:00
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z *replicationAllStats) MarshalMsg(b []byte) (o []byte, err error) {
|
|
|
|
o = msgp.Require(b, z.Msgsize())
|
|
|
|
// omitempty: check for empty values
|
2023-08-30 04:00:59 -04:00
|
|
|
zb0001Len := uint32(3)
|
|
|
|
var zb0001Mask uint8 /* 3 bits */
|
2022-08-31 15:28:03 -04:00
|
|
|
_ = zb0001Mask
|
2021-10-23 21:38:33 -04:00
|
|
|
if z.Targets == nil {
|
|
|
|
zb0001Len--
|
|
|
|
zb0001Mask |= 0x1
|
2021-09-18 16:31:35 -04:00
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
if z.ReplicaSize == 0 {
|
|
|
|
zb0001Len--
|
|
|
|
zb0001Mask |= 0x2
|
|
|
|
}
|
2023-08-30 04:00:59 -04:00
|
|
|
if z.ReplicaCount == 0 {
|
|
|
|
zb0001Len--
|
|
|
|
zb0001Mask |= 0x4
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
// variable map header, size zb0001Len
|
|
|
|
o = append(o, 0x80|uint8(zb0001Len))
|
|
|
|
if zb0001Len == 0 {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if (zb0001Mask & 0x1) == 0 { // if not empty
|
|
|
|
// string "t"
|
|
|
|
o = append(o, 0xa1, 0x74)
|
|
|
|
o = msgp.AppendMapHeader(o, uint32(len(z.Targets)))
|
|
|
|
for za0001, za0002 := range z.Targets {
|
|
|
|
o = msgp.AppendString(o, za0001)
|
|
|
|
o, err = za0002.MarshalMsg(o)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Targets", za0001)
|
|
|
|
return
|
|
|
|
}
|
2021-09-18 16:31:35 -04:00
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
}
|
|
|
|
if (zb0001Mask & 0x2) == 0 { // if not empty
|
|
|
|
// string "r"
|
|
|
|
o = append(o, 0xa1, 0x72)
|
|
|
|
o = msgp.AppendUint64(o, z.ReplicaSize)
|
2021-09-18 16:31:35 -04:00
|
|
|
}
|
2023-08-30 04:00:59 -04:00
|
|
|
if (zb0001Mask & 0x4) == 0 { // if not empty
|
|
|
|
// string "rc"
|
|
|
|
o = append(o, 0xa2, 0x72, 0x63)
|
|
|
|
o = msgp.AppendUint64(o, z.ReplicaCount)
|
|
|
|
}
|
2021-09-18 16:31:35 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-10-23 21:38:33 -04:00
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *replicationAllStats) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "t":
|
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Targets")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.Targets == nil {
|
|
|
|
z.Targets = make(map[string]replicationStats, zb0002)
|
|
|
|
} else if len(z.Targets) > 0 {
|
|
|
|
for key := range z.Targets {
|
|
|
|
delete(z.Targets, key)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for zb0002 > 0 {
|
|
|
|
var za0001 string
|
|
|
|
var za0002 replicationStats
|
|
|
|
zb0002--
|
|
|
|
za0001, bts, err = msgp.ReadStringBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Targets")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
bts, err = za0002.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Targets", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Targets[za0001] = za0002
|
|
|
|
}
|
|
|
|
case "r":
|
|
|
|
z.ReplicaSize, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicaSize")
|
|
|
|
return
|
|
|
|
}
|
2023-08-30 04:00:59 -04:00
|
|
|
case "rc":
|
|
|
|
z.ReplicaCount, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicaCount")
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
default:
|
|
|
|
bts, err = msgp.Skip(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2021-09-18 16:31:35 -04:00
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
2021-10-23 21:38:33 -04:00
|
|
|
func (z *replicationAllStats) Msgsize() (s int) {
|
|
|
|
s = 1 + 2 + msgp.MapHeaderSize
|
|
|
|
if z.Targets != nil {
|
|
|
|
for za0001, za0002 := range z.Targets {
|
|
|
|
_ = za0002
|
|
|
|
s += msgp.StringPrefixSize + len(za0001) + za0002.Msgsize()
|
|
|
|
}
|
|
|
|
}
|
2023-08-30 04:00:59 -04:00
|
|
|
s += 2 + msgp.Uint64Size + 3 + msgp.Uint64Size
|
2021-09-18 16:31:35 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
2021-10-23 21:38:33 -04:00
|
|
|
func (z *replicationAllStatsV1) DecodeMsg(dc *msgp.Reader) (err error) {
|
2021-09-18 16:31:35 -04:00
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadArrayHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2023-08-30 04:00:59 -04:00
|
|
|
if zb0001 != 3 {
|
|
|
|
err = msgp.ArrayError{Wanted: 3, Got: zb0001}
|
2021-09-18 16:31:35 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, err = dc.ReadMapHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Targets")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.Targets == nil {
|
|
|
|
z.Targets = make(map[string]replicationStats, zb0002)
|
|
|
|
} else if len(z.Targets) > 0 {
|
|
|
|
for key := range z.Targets {
|
|
|
|
delete(z.Targets, key)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for zb0002 > 0 {
|
|
|
|
zb0002--
|
|
|
|
var za0001 string
|
|
|
|
var za0002 replicationStats
|
|
|
|
za0001, err = dc.ReadString()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Targets")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = za0002.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Targets", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Targets[za0001] = za0002
|
|
|
|
}
|
|
|
|
z.ReplicaSize, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicaSize")
|
|
|
|
return
|
|
|
|
}
|
2023-08-30 04:00:59 -04:00
|
|
|
z.ReplicaCount, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicaCount")
|
|
|
|
return
|
|
|
|
}
|
2021-09-18 16:31:35 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
2021-10-23 21:38:33 -04:00
|
|
|
func (z *replicationAllStatsV1) EncodeMsg(en *msgp.Writer) (err error) {
|
2023-08-30 04:00:59 -04:00
|
|
|
// array header, size 3
|
|
|
|
err = en.Append(0x93)
|
2021-09-18 16:31:35 -04:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteMapHeader(uint32(len(z.Targets)))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Targets")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001, za0002 := range z.Targets {
|
|
|
|
err = en.WriteString(za0001)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Targets")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = za0002.EncodeMsg(en)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Targets", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.ReplicaSize)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicaSize")
|
|
|
|
return
|
|
|
|
}
|
2023-08-30 04:00:59 -04:00
|
|
|
err = en.WriteUint64(z.ReplicaCount)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicaCount")
|
|
|
|
return
|
|
|
|
}
|
2021-09-18 16:31:35 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
2021-10-23 21:38:33 -04:00
|
|
|
func (z *replicationAllStatsV1) MarshalMsg(b []byte) (o []byte, err error) {
|
2021-09-18 16:31:35 -04:00
|
|
|
o = msgp.Require(b, z.Msgsize())
|
2023-08-30 04:00:59 -04:00
|
|
|
// array header, size 3
|
|
|
|
o = append(o, 0x93)
|
2021-09-18 16:31:35 -04:00
|
|
|
o = msgp.AppendMapHeader(o, uint32(len(z.Targets)))
|
|
|
|
for za0001, za0002 := range z.Targets {
|
|
|
|
o = msgp.AppendString(o, za0001)
|
|
|
|
o, err = za0002.MarshalMsg(o)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Targets", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
o = msgp.AppendUint64(o, z.ReplicaSize)
|
2023-08-30 04:00:59 -04:00
|
|
|
o = msgp.AppendUint64(o, z.ReplicaCount)
|
2021-09-18 16:31:35 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
2021-10-23 21:38:33 -04:00
|
|
|
func (z *replicationAllStatsV1) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
2021-09-18 16:31:35 -04:00
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2023-08-30 04:00:59 -04:00
|
|
|
if zb0001 != 3 {
|
|
|
|
err = msgp.ArrayError{Wanted: 3, Got: zb0001}
|
2021-09-18 16:31:35 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Targets")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.Targets == nil {
|
|
|
|
z.Targets = make(map[string]replicationStats, zb0002)
|
|
|
|
} else if len(z.Targets) > 0 {
|
|
|
|
for key := range z.Targets {
|
|
|
|
delete(z.Targets, key)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for zb0002 > 0 {
|
|
|
|
var za0001 string
|
|
|
|
var za0002 replicationStats
|
|
|
|
zb0002--
|
|
|
|
za0001, bts, err = msgp.ReadStringBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Targets")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
bts, err = za0002.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Targets", za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Targets[za0001] = za0002
|
|
|
|
}
|
|
|
|
z.ReplicaSize, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicaSize")
|
|
|
|
return
|
|
|
|
}
|
2023-08-30 04:00:59 -04:00
|
|
|
z.ReplicaCount, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicaCount")
|
|
|
|
return
|
|
|
|
}
|
2021-09-18 16:31:35 -04:00
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
2021-10-23 21:38:33 -04:00
|
|
|
func (z *replicationAllStatsV1) Msgsize() (s int) {
|
2021-09-18 16:31:35 -04:00
|
|
|
s = 1 + msgp.MapHeaderSize
|
|
|
|
if z.Targets != nil {
|
|
|
|
for za0001, za0002 := range z.Targets {
|
|
|
|
_ = za0002
|
|
|
|
s += msgp.StringPrefixSize + len(za0001) + za0002.Msgsize()
|
|
|
|
}
|
|
|
|
}
|
2023-08-30 04:00:59 -04:00
|
|
|
s += msgp.Uint64Size + msgp.Uint64Size
|
2021-09-18 16:31:35 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *replicationStats) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadArrayHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2023-08-30 04:00:59 -04:00
|
|
|
if zb0001 != 10 {
|
|
|
|
err = msgp.ArrayError{Wanted: 10, Got: zb0001}
|
2021-09-18 16:31:35 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
z.PendingSize, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PendingSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ReplicatedSize, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicatedSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.FailedSize, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "FailedSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.FailedCount, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "FailedCount")
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
z.PendingCount, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PendingCount")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.MissedThresholdSize, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MissedThresholdSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.AfterThresholdSize, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "AfterThresholdSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.MissedThresholdCount, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MissedThresholdCount")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.AfterThresholdCount, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "AfterThresholdCount")
|
|
|
|
return
|
|
|
|
}
|
2023-08-30 04:00:59 -04:00
|
|
|
z.ReplicatedCount, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicatedCount")
|
|
|
|
return
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z *replicationStats) EncodeMsg(en *msgp.Writer) (err error) {
|
2023-08-30 04:00:59 -04:00
|
|
|
// array header, size 10
|
|
|
|
err = en.Append(0x9a)
|
2021-04-03 12:03:42 -04:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.PendingSize)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PendingSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.ReplicatedSize)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicatedSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.FailedSize)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "FailedSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.FailedCount)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "FailedCount")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.PendingCount)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PendingCount")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.MissedThresholdSize)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MissedThresholdSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.AfterThresholdSize)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "AfterThresholdSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.MissedThresholdCount)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MissedThresholdCount")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.AfterThresholdCount)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "AfterThresholdCount")
|
|
|
|
return
|
|
|
|
}
|
2023-08-30 04:00:59 -04:00
|
|
|
err = en.WriteUint64(z.ReplicatedCount)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicatedCount")
|
|
|
|
return
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z *replicationStats) MarshalMsg(b []byte) (o []byte, err error) {
|
|
|
|
o = msgp.Require(b, z.Msgsize())
|
2023-08-30 04:00:59 -04:00
|
|
|
// array header, size 10
|
|
|
|
o = append(o, 0x9a)
|
2021-04-03 12:03:42 -04:00
|
|
|
o = msgp.AppendUint64(o, z.PendingSize)
|
|
|
|
o = msgp.AppendUint64(o, z.ReplicatedSize)
|
|
|
|
o = msgp.AppendUint64(o, z.FailedSize)
|
|
|
|
o = msgp.AppendUint64(o, z.FailedCount)
|
|
|
|
o = msgp.AppendUint64(o, z.PendingCount)
|
|
|
|
o = msgp.AppendUint64(o, z.MissedThresholdSize)
|
|
|
|
o = msgp.AppendUint64(o, z.AfterThresholdSize)
|
|
|
|
o = msgp.AppendUint64(o, z.MissedThresholdCount)
|
|
|
|
o = msgp.AppendUint64(o, z.AfterThresholdCount)
|
2023-08-30 04:00:59 -04:00
|
|
|
o = msgp.AppendUint64(o, z.ReplicatedCount)
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *replicationStats) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2023-08-30 04:00:59 -04:00
|
|
|
if zb0001 != 10 {
|
|
|
|
err = msgp.ArrayError{Wanted: 10, Got: zb0001}
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
z.PendingSize, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PendingSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ReplicatedSize, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicatedSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.FailedSize, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "FailedSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.FailedCount, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "FailedCount")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.PendingCount, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PendingCount")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.MissedThresholdSize, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MissedThresholdSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.AfterThresholdSize, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "AfterThresholdSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.MissedThresholdCount, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MissedThresholdCount")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.AfterThresholdCount, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "AfterThresholdCount")
|
|
|
|
return
|
|
|
|
}
|
2023-08-30 04:00:59 -04:00
|
|
|
z.ReplicatedCount, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicatedCount")
|
|
|
|
return
|
|
|
|
}
|
2021-04-03 12:03:42 -04:00
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *replicationStats) Msgsize() (s int) {
|
2023-08-30 04:00:59 -04:00
|
|
|
s = 1 + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size
|
2021-09-21 12:01:51 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *replicationStatsV1) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadArrayHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0001 != 10 {
|
|
|
|
err = msgp.ArrayError{Wanted: 10, Got: zb0001}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.PendingSize, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PendingSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ReplicatedSize, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicatedSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.FailedSize, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "FailedSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ReplicaSize, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicaSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.FailedCount, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "FailedCount")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.PendingCount, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PendingCount")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.MissedThresholdSize, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MissedThresholdSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.AfterThresholdSize, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "AfterThresholdSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.MissedThresholdCount, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MissedThresholdCount")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.AfterThresholdCount, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "AfterThresholdCount")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z *replicationStatsV1) EncodeMsg(en *msgp.Writer) (err error) {
|
|
|
|
// array header, size 10
|
|
|
|
err = en.Append(0x9a)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.PendingSize)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PendingSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.ReplicatedSize)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicatedSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.FailedSize)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "FailedSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.ReplicaSize)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicaSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.FailedCount)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "FailedCount")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.PendingCount)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PendingCount")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.MissedThresholdSize)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MissedThresholdSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.AfterThresholdSize)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "AfterThresholdSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.MissedThresholdCount)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MissedThresholdCount")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.AfterThresholdCount)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "AfterThresholdCount")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z *replicationStatsV1) MarshalMsg(b []byte) (o []byte, err error) {
|
|
|
|
o = msgp.Require(b, z.Msgsize())
|
|
|
|
// array header, size 10
|
|
|
|
o = append(o, 0x9a)
|
|
|
|
o = msgp.AppendUint64(o, z.PendingSize)
|
|
|
|
o = msgp.AppendUint64(o, z.ReplicatedSize)
|
|
|
|
o = msgp.AppendUint64(o, z.FailedSize)
|
|
|
|
o = msgp.AppendUint64(o, z.ReplicaSize)
|
|
|
|
o = msgp.AppendUint64(o, z.FailedCount)
|
|
|
|
o = msgp.AppendUint64(o, z.PendingCount)
|
|
|
|
o = msgp.AppendUint64(o, z.MissedThresholdSize)
|
|
|
|
o = msgp.AppendUint64(o, z.AfterThresholdSize)
|
|
|
|
o = msgp.AppendUint64(o, z.MissedThresholdCount)
|
|
|
|
o = msgp.AppendUint64(o, z.AfterThresholdCount)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *replicationStatsV1) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0001 != 10 {
|
|
|
|
err = msgp.ArrayError{Wanted: 10, Got: zb0001}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.PendingSize, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PendingSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ReplicatedSize, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicatedSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.FailedSize, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "FailedSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ReplicaSize, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ReplicaSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.FailedCount, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "FailedCount")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.PendingCount, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PendingCount")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.MissedThresholdSize, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MissedThresholdSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.AfterThresholdSize, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "AfterThresholdSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.MissedThresholdCount, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MissedThresholdCount")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.AfterThresholdCount, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "AfterThresholdCount")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *replicationStatsV1) Msgsize() (s int) {
|
|
|
|
s = 1 + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size
|
2021-04-03 12:03:42 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2020-03-18 19:19:29 -04:00
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *sizeHistogram) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadArrayHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0001 != uint32(dataUsageBucketLen) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0001}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001 := range z {
|
|
|
|
z[za0001], err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z *sizeHistogram) EncodeMsg(en *msgp.Writer) (err error) {
|
|
|
|
err = en.WriteArrayHeader(uint32(dataUsageBucketLen))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001 := range z {
|
|
|
|
err = en.WriteUint64(z[za0001])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z *sizeHistogram) MarshalMsg(b []byte) (o []byte, err error) {
|
|
|
|
o = msgp.Require(b, z.Msgsize())
|
|
|
|
o = msgp.AppendArrayHeader(o, uint32(dataUsageBucketLen))
|
|
|
|
for za0001 := range z {
|
|
|
|
o = msgp.AppendUint64(o, z[za0001])
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *sizeHistogram) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0001 != uint32(dataUsageBucketLen) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLen), Got: zb0001}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001 := range z {
|
|
|
|
z[za0001], bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *sizeHistogram) Msgsize() (s int) {
|
|
|
|
s = msgp.ArrayHeaderSize + (dataUsageBucketLen * (msgp.Uint64Size))
|
|
|
|
return
|
|
|
|
}
|
2021-10-23 21:38:33 -04:00
|
|
|
|
2024-01-13 02:51:08 -05:00
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *sizeHistogramV1) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadArrayHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0001 != uint32(dataUsageBucketLenV1) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLenV1), Got: zb0001}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001 := range z {
|
|
|
|
z[za0001], err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z *sizeHistogramV1) EncodeMsg(en *msgp.Writer) (err error) {
|
|
|
|
err = en.WriteArrayHeader(uint32(dataUsageBucketLenV1))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001 := range z {
|
|
|
|
err = en.WriteUint64(z[za0001])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z *sizeHistogramV1) MarshalMsg(b []byte) (o []byte, err error) {
|
|
|
|
o = msgp.Require(b, z.Msgsize())
|
|
|
|
o = msgp.AppendArrayHeader(o, uint32(dataUsageBucketLenV1))
|
|
|
|
for za0001 := range z {
|
|
|
|
o = msgp.AppendUint64(o, z[za0001])
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *sizeHistogramV1) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0001 != uint32(dataUsageBucketLenV1) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageBucketLenV1), Got: zb0001}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001 := range z {
|
|
|
|
z[za0001], bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *sizeHistogramV1) Msgsize() (s int) {
|
|
|
|
s = msgp.ArrayHeaderSize + (dataUsageBucketLenV1 * (msgp.Uint64Size))
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-10-23 21:38:33 -04:00
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *tierStats) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadMapHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, err = dc.ReadMapKeyPtr()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "ts":
|
|
|
|
z.TotalSize, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "TotalSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "nv":
|
|
|
|
z.NumVersions, err = dc.ReadInt()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "NumVersions")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "no":
|
|
|
|
z.NumObjects, err = dc.ReadInt()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "NumObjects")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
err = dc.Skip()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z tierStats) EncodeMsg(en *msgp.Writer) (err error) {
|
|
|
|
// map header, size 3
|
|
|
|
// write "ts"
|
|
|
|
err = en.Append(0x83, 0xa2, 0x74, 0x73)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.TotalSize)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "TotalSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// write "nv"
|
|
|
|
err = en.Append(0xa2, 0x6e, 0x76)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteInt(z.NumVersions)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "NumVersions")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// write "no"
|
|
|
|
err = en.Append(0xa2, 0x6e, 0x6f)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteInt(z.NumObjects)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "NumObjects")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z tierStats) MarshalMsg(b []byte) (o []byte, err error) {
|
|
|
|
o = msgp.Require(b, z.Msgsize())
|
|
|
|
// map header, size 3
|
|
|
|
// string "ts"
|
|
|
|
o = append(o, 0x83, 0xa2, 0x74, 0x73)
|
|
|
|
o = msgp.AppendUint64(o, z.TotalSize)
|
|
|
|
// string "nv"
|
|
|
|
o = append(o, 0xa2, 0x6e, 0x76)
|
|
|
|
o = msgp.AppendInt(o, z.NumVersions)
|
|
|
|
// string "no"
|
|
|
|
o = append(o, 0xa2, 0x6e, 0x6f)
|
|
|
|
o = msgp.AppendInt(o, z.NumObjects)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *tierStats) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "ts":
|
|
|
|
z.TotalSize, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "TotalSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "nv":
|
|
|
|
z.NumVersions, bts, err = msgp.ReadIntBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "NumVersions")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "no":
|
|
|
|
z.NumObjects, bts, err = msgp.ReadIntBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "NumObjects")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
bts, err = msgp.Skip(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z tierStats) Msgsize() (s int) {
|
|
|
|
s = 1 + 3 + msgp.Uint64Size + 3 + msgp.IntSize + 3 + msgp.IntSize
|
|
|
|
return
|
|
|
|
}
|
2023-03-10 11:53:59 -05:00
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *versionsHistogram) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadArrayHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0001 != uint32(dataUsageVersionLen) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageVersionLen), Got: zb0001}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001 := range z {
|
|
|
|
z[za0001], err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z *versionsHistogram) EncodeMsg(en *msgp.Writer) (err error) {
|
|
|
|
err = en.WriteArrayHeader(uint32(dataUsageVersionLen))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001 := range z {
|
|
|
|
err = en.WriteUint64(z[za0001])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z *versionsHistogram) MarshalMsg(b []byte) (o []byte, err error) {
|
|
|
|
o = msgp.Require(b, z.Msgsize())
|
|
|
|
o = msgp.AppendArrayHeader(o, uint32(dataUsageVersionLen))
|
|
|
|
for za0001 := range z {
|
|
|
|
o = msgp.AppendUint64(o, z[za0001])
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *versionsHistogram) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0001 != uint32(dataUsageVersionLen) {
|
|
|
|
err = msgp.ArrayError{Wanted: uint32(dataUsageVersionLen), Got: zb0001}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0001 := range z {
|
|
|
|
z[za0001], bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, za0001)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *versionsHistogram) Msgsize() (s int) {
|
|
|
|
s = msgp.ArrayHeaderSize + (dataUsageVersionLen * (msgp.Uint64Size))
|
|
|
|
return
|
|
|
|
}
|