@ -313,6 +313,12 @@ func (z *dataUsageCacheInfo) DecodeMsg(dc *msgp.Reader) (err error) {
err = msgp . WrapError ( err , "NextCycle" )
return
}
case "SkipHealing" :
z . SkipHealing , err = dc . ReadBool ( )
if err != nil {
err = msgp . WrapError ( err , "SkipHealing" )
return
}
case "BloomFilter" :
z . BloomFilter , err = dc . ReadBytes ( z . BloomFilter )
if err != nil {
@ -333,11 +339,11 @@ func (z *dataUsageCacheInfo) DecodeMsg(dc *msgp.Reader) (err error) {
// EncodeMsg implements msgp.Encodable
func ( z * dataUsageCacheInfo ) EncodeMsg ( en * msgp . Writer ) ( err error ) {
// omitempty: check for empty values
zb0001Len := uint32 ( 4 )
var zb0001Mask uint8 /* 4 bits */
zb0001Len := uint32 ( 5 )
var zb0001Mask uint8 /* 5 bits */
if z . BloomFilter == nil {
zb0001Len --
zb0001Mask |= 0x8
zb0001Mask |= 0x10
}
// variable map header, size zb0001Len
err = en . Append ( 0x80 | uint8 ( zb0001Len ) )
@ -377,7 +383,17 @@ func (z *dataUsageCacheInfo) EncodeMsg(en *msgp.Writer) (err error) {
err = msgp . WrapError ( err , "NextCycle" )
return
}
if ( zb0001Mask & 0x8 ) == 0 { // if not empty
// 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
}
if ( zb0001Mask & 0x10 ) == 0 { // if not empty
// write "BloomFilter"
err = en . Append ( 0xab , 0x42 , 0x6c , 0x6f , 0x6f , 0x6d , 0x46 , 0x69 , 0x6c , 0x74 , 0x65 , 0x72 )
if err != nil {
@ -396,11 +412,11 @@ func (z *dataUsageCacheInfo) EncodeMsg(en *msgp.Writer) (err error) {
func ( z * dataUsageCacheInfo ) MarshalMsg ( b [ ] byte ) ( o [ ] byte , err error ) {
o = msgp . Require ( b , z . Msgsize ( ) )
// omitempty: check for empty values
zb0001Len := uint32 ( 4 )
var zb0001Mask uint8 /* 4 bits */
zb0001Len := uint32 ( 5 )
var zb0001Mask uint8 /* 5 bits */
if z . BloomFilter == nil {
zb0001Len --
zb0001Mask |= 0x8
zb0001Mask |= 0x10
}
// variable map header, size zb0001Len
o = append ( o , 0x80 | uint8 ( zb0001Len ) )
@ -416,7 +432,10 @@ func (z *dataUsageCacheInfo) MarshalMsg(b []byte) (o []byte, err error) {
// string "NextCycle"
o = append ( o , 0xa9 , 0x4e , 0x65 , 0x78 , 0x74 , 0x43 , 0x79 , 0x63 , 0x6c , 0x65 )
o = msgp . AppendUint32 ( o , z . NextCycle )
if ( zb0001Mask & 0x8 ) == 0 { // if not empty
// string "SkipHealing"
o = append ( o , 0xab , 0x53 , 0x6b , 0x69 , 0x70 , 0x48 , 0x65 , 0x61 , 0x6c , 0x69 , 0x6e , 0x67 )
o = msgp . AppendBool ( o , z . SkipHealing )
if ( zb0001Mask & 0x10 ) == 0 { // if not empty
// string "BloomFilter"
o = append ( o , 0xab , 0x42 , 0x6c , 0x6f , 0x6f , 0x6d , 0x46 , 0x69 , 0x6c , 0x74 , 0x65 , 0x72 )
o = msgp . AppendBytes ( o , z . BloomFilter )
@ -460,6 +479,12 @@ func (z *dataUsageCacheInfo) UnmarshalMsg(bts []byte) (o []byte, err error) {
err = msgp . WrapError ( err , "NextCycle" )
return
}
case "SkipHealing" :
z . SkipHealing , bts , err = msgp . ReadBoolBytes ( bts )
if err != nil {
err = msgp . WrapError ( err , "SkipHealing" )
return
}
case "BloomFilter" :
z . BloomFilter , bts , err = msgp . ReadBytesBytes ( bts , z . BloomFilter )
if err != nil {
@ -480,7 +505,7 @@ func (z *dataUsageCacheInfo) UnmarshalMsg(bts []byte) (o []byte, err error) {
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func ( z * dataUsageCacheInfo ) Msgsize ( ) ( s int ) {
s = 1 + 5 + msgp . StringPrefixSize + len ( z . Name ) + 11 + msgp . TimeSize + 10 + msgp . Uint32Size + 12 + msgp . BytesPrefixSize + len ( z . BloomFilter )
s = 1 + 5 + msgp . StringPrefixSize + len ( z . Name ) + 11 + msgp . TimeSize + 10 + msgp . Uint32Size + 12 + msgp . BoolSize + 12 + msgp . B ytesPrefixSize + len ( z . BloomFilter )
return
}