@ -484,6 +484,277 @@ func (z *dataUsageCacheInfo) Msgsize() (s int) {
return
return
}
}
// 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 "Disks" :
var zb0002 uint32
zb0002 , err = dc . ReadArrayHeader ( )
if err != nil {
err = msgp . WrapError ( err , "Disks" )
return
}
if cap ( z . Disks ) >= int ( zb0002 ) {
z . Disks = ( z . Disks ) [ : zb0002 ]
} else {
z . Disks = make ( [ ] string , zb0002 )
}
for za0001 := range z . Disks {
z . Disks [ za0001 ] , err = dc . ReadString ( )
if err != nil {
err = msgp . WrapError ( err , "Disks" , za0001 )
return
}
}
case "Cache" :
var zb0003 uint32
zb0003 , err = dc . ReadMapHeader ( )
if err != nil {
err = msgp . WrapError ( err , "Cache" )
return
}
if z . Cache == nil {
z . Cache = make ( map [ string ] dataUsageEntryV2 , zb0003 )
} else if len ( z . Cache ) > 0 {
for key := range z . Cache {
delete ( z . Cache , key )
}
}
for zb0003 > 0 {
zb0003 --
var za0002 string
var za0003 dataUsageEntryV2
za0002 , err = dc . ReadString ( )
if err != nil {
err = msgp . WrapError ( err , "Cache" )
return
}
err = za0003 . DecodeMsg ( dc )
if err != nil {
err = msgp . WrapError ( err , "Cache" , za0002 )
return
}
z . Cache [ za0002 ] = za0003
}
default :
err = dc . Skip ( )
if err != nil {
err = msgp . WrapError ( err )
return
}
}
}
return
}
// EncodeMsg implements msgp.Encodable
func ( z * dataUsageCacheV2 ) EncodeMsg ( en * msgp . Writer ) ( err error ) {
// map header, size 3
// write "Info"
err = en . Append ( 0x83 , 0xa4 , 0x49 , 0x6e , 0x66 , 0x6f )
if err != nil {
return
}
err = z . Info . EncodeMsg ( en )
if err != nil {
err = msgp . WrapError ( err , "Info" )
return
}
// write "Disks"
err = en . Append ( 0xa5 , 0x44 , 0x69 , 0x73 , 0x6b , 0x73 )
if err != nil {
return
}
err = en . WriteArrayHeader ( uint32 ( len ( z . Disks ) ) )
if err != nil {
err = msgp . WrapError ( err , "Disks" )
return
}
for za0001 := range z . Disks {
err = en . WriteString ( z . Disks [ za0001 ] )
if err != nil {
err = msgp . WrapError ( err , "Disks" , za0001 )
return
}
}
// write "Cache"
err = en . Append ( 0xa5 , 0x43 , 0x61 , 0x63 , 0x68 , 0x65 )
if err != nil {
return
}
err = en . WriteMapHeader ( uint32 ( len ( z . Cache ) ) )
if err != nil {
err = msgp . WrapError ( err , "Cache" )
return
}
for za0002 , za0003 := range z . Cache {
err = en . WriteString ( za0002 )
if err != nil {
err = msgp . WrapError ( err , "Cache" )
return
}
err = za0003 . EncodeMsg ( en )
if err != nil {
err = msgp . WrapError ( err , "Cache" , za0002 )
return
}
}
return
}
// MarshalMsg implements msgp.Marshaler
func ( z * dataUsageCacheV2 ) MarshalMsg ( b [ ] byte ) ( o [ ] byte , err error ) {
o = msgp . Require ( b , z . Msgsize ( ) )
// map header, size 3
// string "Info"
o = append ( o , 0x83 , 0xa4 , 0x49 , 0x6e , 0x66 , 0x6f )
o , err = z . Info . MarshalMsg ( o )
if err != nil {
err = msgp . WrapError ( err , "Info" )
return
}
// string "Disks"
o = append ( o , 0xa5 , 0x44 , 0x69 , 0x73 , 0x6b , 0x73 )
o = msgp . AppendArrayHeader ( o , uint32 ( len ( z . Disks ) ) )
for za0001 := range z . Disks {
o = msgp . AppendString ( o , z . Disks [ za0001 ] )
}
// string "Cache"
o = append ( o , 0xa5 , 0x43 , 0x61 , 0x63 , 0x68 , 0x65 )
o = msgp . AppendMapHeader ( o , uint32 ( len ( z . Cache ) ) )
for za0002 , za0003 := range z . Cache {
o = msgp . AppendString ( o , za0002 )
o , err = za0003 . MarshalMsg ( o )
if err != nil {
err = msgp . WrapError ( err , "Cache" , za0002 )
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 "Disks" :
var zb0002 uint32
zb0002 , bts , err = msgp . ReadArrayHeaderBytes ( bts )
if err != nil {
err = msgp . WrapError ( err , "Disks" )
return
}
if cap ( z . Disks ) >= int ( zb0002 ) {
z . Disks = ( z . Disks ) [ : zb0002 ]
} else {
z . Disks = make ( [ ] string , zb0002 )
}
for za0001 := range z . Disks {
z . Disks [ za0001 ] , bts , err = msgp . ReadStringBytes ( bts )
if err != nil {
err = msgp . WrapError ( err , "Disks" , za0001 )
return
}
}
case "Cache" :
var zb0003 uint32
zb0003 , bts , err = msgp . ReadMapHeaderBytes ( bts )
if err != nil {
err = msgp . WrapError ( err , "Cache" )
return
}
if z . Cache == nil {
z . Cache = make ( map [ string ] dataUsageEntryV2 , zb0003 )
} else if len ( z . Cache ) > 0 {
for key := range z . Cache {
delete ( z . Cache , key )
}
}
for zb0003 > 0 {
var za0002 string
var za0003 dataUsageEntryV2
zb0003 --
za0002 , bts , err = msgp . ReadStringBytes ( bts )
if err != nil {
err = msgp . WrapError ( err , "Cache" )
return
}
bts , err = za0003 . UnmarshalMsg ( bts )
if err != nil {
err = msgp . WrapError ( err , "Cache" , za0002 )
return
}
z . Cache [ za0002 ] = za0003
}
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 ) {
s = 1 + 5 + z . Info . Msgsize ( ) + 6 + msgp . ArrayHeaderSize
for za0001 := range z . Disks {
s += msgp . StringPrefixSize + len ( z . Disks [ za0001 ] )
}
s += 6 + msgp . MapHeaderSize
if z . Cache != nil {
for za0002 , za0003 := range z . Cache {
_ = za0003
s += msgp . StringPrefixSize + len ( za0002 ) + za0003 . Msgsize ( )
}
}
return
}
// DecodeMsg implements msgp.Decodable
// DecodeMsg implements msgp.Decodable
func ( z * dataUsageEntry ) DecodeMsg ( dc * msgp . Reader ) ( err error ) {
func ( z * dataUsageEntry ) DecodeMsg ( dc * msgp . Reader ) ( err error ) {
var zb0001 uint32
var zb0001 uint32
@ -705,6 +976,163 @@ func (z *dataUsageEntry) Msgsize() (s int) {
return
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
}
// EncodeMsg implements msgp.Encodable
func ( z * dataUsageEntryV2 ) EncodeMsg ( en * msgp . Writer ) ( err error ) {
// array header, size 4
err = en . Append ( 0x94 )
if err != nil {
return
}
err = en . WriteInt64 ( z . Size )
if err != nil {
err = msgp . WrapError ( err , "Size" )
return
}
err = en . WriteUint64 ( z . Objects )
if err != nil {
err = msgp . WrapError ( err , "Objects" )
return
}
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
}
}
err = z . Children . EncodeMsg ( en )
if err != nil {
err = msgp . WrapError ( err , "Children" )
return
}
return
}
// MarshalMsg implements msgp.Marshaler
func ( z * dataUsageEntryV2 ) MarshalMsg ( b [ ] byte ) ( o [ ] byte , err error ) {
o = msgp . Require ( b , z . Msgsize ( ) )
// array header, size 4
o = append ( o , 0x94 )
o = msgp . AppendInt64 ( o , z . Size )
o = msgp . AppendUint64 ( o , z . Objects )
o = msgp . AppendArrayHeader ( o , uint32 ( dataUsageBucketLen ) )
for za0001 := range z . ObjSizes {
o = msgp . AppendUint64 ( o , z . ObjSizes [ za0001 ] )
}
o , err = z . Children . MarshalMsg ( o )
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 )
if err != nil {
err = msgp . WrapError ( err )
return
}
if zb0001 != 4 {
err = msgp . ArrayError { Wanted : 4 , Got : zb0001 }
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 . 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
func ( z * dataUsageEntryV2 ) Msgsize ( ) ( s int ) {
s = 1 + msgp . Int64Size + msgp . Uint64Size + msgp . ArrayHeaderSize + ( dataUsageBucketLen * ( msgp . Uint64Size ) ) + z . Children . Msgsize ( )
return
}
// DecodeMsg implements msgp.Decodable
// DecodeMsg implements msgp.Decodable
func ( z * dataUsageHash ) DecodeMsg ( dc * msgp . Reader ) ( err error ) {
func ( z * dataUsageHash ) DecodeMsg ( dc * msgp . Reader ) ( err error ) {
{
{