diff --git a/go.mod b/go.mod index d687e61..a993a11 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/safchain/ethtool v0.4.1 github.com/secure-io/sio-go v0.3.1 github.com/shirou/gopsutil/v3 v3.24.5 - github.com/tinylib/msgp v1.2.4 + github.com/tinylib/msgp v1.2.5 golang.org/x/crypto v0.27.0 golang.org/x/net v0.29.0 ) @@ -41,9 +41,11 @@ require ( github.com/tklauser/go-sysconf v0.3.14 // indirect github.com/tklauser/numcpus v0.8.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect + golang.org/x/mod v0.19.0 // indirect golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.25.0 // indirect golang.org/x/text v0.18.0 // indirect + golang.org/x/tools v0.23.0 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 37c5f3f..cccfec8 100644 --- a/go.sum +++ b/go.sum @@ -74,6 +74,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tinylib/msgp v1.2.4 h1:yLFeUGostXXSGW5vxfT5dXG/qzkn4schv2I7at5+hVU= github.com/tinylib/msgp v1.2.4/go.mod h1:ykjzy2wzgrlvpDCRc4LA8UXy6D8bzMSuAF3WD57Gok0= +github.com/tinylib/msgp v1.2.5 h1:WeQg1whrXRFiZusidTQqzETkRpGjFjcIhW6uqWH09po= +github.com/tinylib/msgp v1.2.5/go.mod h1:ykjzy2wzgrlvpDCRc4LA8UXy6D8bzMSuAF3WD57Gok0= github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU= github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY= github.com/tklauser/numcpus v0.8.0 h1:Mx4Wwe/FjZLeQsK/6kt2EOepwwSl7SmJrK5bV/dXYgY= @@ -84,6 +86,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= @@ -103,6 +107,8 @@ golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= +golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/heal-commands_gen.go b/heal-commands_gen.go index da9b64a..8137bf7 100644 --- a/heal-commands_gen.go +++ b/heal-commands_gen.go @@ -927,115 +927,116 @@ func (z *HealOpts) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - // write "recursive" - err = en.Append(0xa9, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65) - if err != nil { - return - } - err = en.WriteBool(z.Recursive) - if err != nil { - err = msgp.WrapError(err, "Recursive") - return - } - // write "dryRun" - err = en.Append(0xa6, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e) - if err != nil { - return - } - err = en.WriteBool(z.DryRun) - if err != nil { - err = msgp.WrapError(err, "DryRun") - return - } - // write "remove" - err = en.Append(0xa6, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65) - if err != nil { - return - } - err = en.WriteBool(z.Remove) - if err != nil { - err = msgp.WrapError(err, "Remove") - return - } - // write "recreate" - err = en.Append(0xa8, 0x72, 0x65, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65) - if err != nil { - return - } - err = en.WriteBool(z.Recreate) - if err != nil { - err = msgp.WrapError(err, "Recreate") - return - } - // write "scanMode" - err = en.Append(0xa8, 0x73, 0x63, 0x61, 0x6e, 0x4d, 0x6f, 0x64, 0x65) - if err != nil { - return - } - err = en.WriteInt(int(z.ScanMode)) - if err != nil { - err = msgp.WrapError(err, "ScanMode") - return - } - // write "updateParity" - err = en.Append(0xac, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x69, 0x74, 0x79) - if err != nil { - return - } - err = en.WriteBool(z.UpdateParity) - if err != nil { - err = msgp.WrapError(err, "UpdateParity") - return - } - // write "nolock" - err = en.Append(0xa6, 0x6e, 0x6f, 0x6c, 0x6f, 0x63, 0x6b) - if err != nil { - return - } - err = en.WriteBool(z.NoLock) - if err != nil { - err = msgp.WrapError(err, "NoLock") - return - } - if (zb0001Mask & 0x80) == 0 { // if not omitted - // write "pool" - err = en.Append(0xa4, 0x70, 0x6f, 0x6f, 0x6c) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // write "recursive" + err = en.Append(0xa9, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65) if err != nil { return } - if z.Pool == nil { - err = en.WriteNil() - if err != nil { - return - } - } else { - err = en.WriteInt(*z.Pool) - if err != nil { - err = msgp.WrapError(err, "Pool") - return - } + err = en.WriteBool(z.Recursive) + if err != nil { + err = msgp.WrapError(err, "Recursive") + return } - } - if (zb0001Mask & 0x100) == 0 { // if not omitted - // write "set" - err = en.Append(0xa3, 0x73, 0x65, 0x74) + // write "dryRun" + err = en.Append(0xa6, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e) + if err != nil { + return + } + err = en.WriteBool(z.DryRun) + if err != nil { + err = msgp.WrapError(err, "DryRun") + return + } + // write "remove" + err = en.Append(0xa6, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65) + if err != nil { + return + } + err = en.WriteBool(z.Remove) + if err != nil { + err = msgp.WrapError(err, "Remove") + return + } + // write "recreate" + err = en.Append(0xa8, 0x72, 0x65, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65) + if err != nil { + return + } + err = en.WriteBool(z.Recreate) if err != nil { + err = msgp.WrapError(err, "Recreate") return } - if z.Set == nil { - err = en.WriteNil() + // write "scanMode" + err = en.Append(0xa8, 0x73, 0x63, 0x61, 0x6e, 0x4d, 0x6f, 0x64, 0x65) + if err != nil { + return + } + err = en.WriteInt(int(z.ScanMode)) + if err != nil { + err = msgp.WrapError(err, "ScanMode") + return + } + // write "updateParity" + err = en.Append(0xac, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x69, 0x74, 0x79) + if err != nil { + return + } + err = en.WriteBool(z.UpdateParity) + if err != nil { + err = msgp.WrapError(err, "UpdateParity") + return + } + // write "nolock" + err = en.Append(0xa6, 0x6e, 0x6f, 0x6c, 0x6f, 0x63, 0x6b) + if err != nil { + return + } + err = en.WriteBool(z.NoLock) + if err != nil { + err = msgp.WrapError(err, "NoLock") + return + } + if (zb0001Mask & 0x80) == 0 { // if not omitted + // write "pool" + err = en.Append(0xa4, 0x70, 0x6f, 0x6f, 0x6c) if err != nil { return } - } else { - err = en.WriteInt(*z.Set) + if z.Pool == nil { + err = en.WriteNil() + if err != nil { + return + } + } else { + err = en.WriteInt(*z.Pool) + if err != nil { + err = msgp.WrapError(err, "Pool") + return + } + } + } + if (zb0001Mask & 0x100) == 0 { // if not omitted + // write "set" + err = en.Append(0xa3, 0x73, 0x65, 0x74) if err != nil { - err = msgp.WrapError(err, "Set") return } + if z.Set == nil { + err = en.WriteNil() + if err != nil { + return + } + } else { + err = en.WriteInt(*z.Set) + if err != nil { + err = msgp.WrapError(err, "Set") + return + } + } } } return @@ -1058,46 +1059,47 @@ func (z *HealOpts) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } - // string "recursive" - o = append(o, 0xa9, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65) - o = msgp.AppendBool(o, z.Recursive) - // string "dryRun" - o = append(o, 0xa6, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e) - o = msgp.AppendBool(o, z.DryRun) - // string "remove" - o = append(o, 0xa6, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65) - o = msgp.AppendBool(o, z.Remove) - // string "recreate" - o = append(o, 0xa8, 0x72, 0x65, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65) - o = msgp.AppendBool(o, z.Recreate) - // string "scanMode" - o = append(o, 0xa8, 0x73, 0x63, 0x61, 0x6e, 0x4d, 0x6f, 0x64, 0x65) - o = msgp.AppendInt(o, int(z.ScanMode)) - // string "updateParity" - o = append(o, 0xac, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x69, 0x74, 0x79) - o = msgp.AppendBool(o, z.UpdateParity) - // string "nolock" - o = append(o, 0xa6, 0x6e, 0x6f, 0x6c, 0x6f, 0x63, 0x6b) - o = msgp.AppendBool(o, z.NoLock) - if (zb0001Mask & 0x80) == 0 { // if not omitted - // string "pool" - o = append(o, 0xa4, 0x70, 0x6f, 0x6f, 0x6c) - if z.Pool == nil { - o = msgp.AppendNil(o) - } else { - o = msgp.AppendInt(o, *z.Pool) - } - } - if (zb0001Mask & 0x100) == 0 { // if not omitted - // string "set" - o = append(o, 0xa3, 0x73, 0x65, 0x74) - if z.Set == nil { - o = msgp.AppendNil(o) - } else { - o = msgp.AppendInt(o, *z.Set) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // string "recursive" + o = append(o, 0xa9, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65) + o = msgp.AppendBool(o, z.Recursive) + // string "dryRun" + o = append(o, 0xa6, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e) + o = msgp.AppendBool(o, z.DryRun) + // string "remove" + o = append(o, 0xa6, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65) + o = msgp.AppendBool(o, z.Remove) + // string "recreate" + o = append(o, 0xa8, 0x72, 0x65, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65) + o = msgp.AppendBool(o, z.Recreate) + // string "scanMode" + o = append(o, 0xa8, 0x73, 0x63, 0x61, 0x6e, 0x4d, 0x6f, 0x64, 0x65) + o = msgp.AppendInt(o, int(z.ScanMode)) + // string "updateParity" + o = append(o, 0xac, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x69, 0x74, 0x79) + o = msgp.AppendBool(o, z.UpdateParity) + // string "nolock" + o = append(o, 0xa6, 0x6e, 0x6f, 0x6c, 0x6f, 0x63, 0x6b) + o = msgp.AppendBool(o, z.NoLock) + if (zb0001Mask & 0x80) == 0 { // if not omitted + // string "pool" + o = append(o, 0xa4, 0x70, 0x6f, 0x6f, 0x6c) + if z.Pool == nil { + o = msgp.AppendNil(o) + } else { + o = msgp.AppendInt(o, *z.Pool) + } + } + if (zb0001Mask & 0x100) == 0 { // if not omitted + // string "set" + o = append(o, 0xa3, 0x73, 0x65, 0x74) + if z.Set == nil { + o = msgp.AppendNil(o) + } else { + o = msgp.AppendInt(o, *z.Set) + } } } return @@ -1528,220 +1530,221 @@ func (z *HealResultItem) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - // write "resultId" - err = en.Append(0xa8, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x49, 0x64) - if err != nil { - return - } - err = en.WriteInt64(z.ResultIndex) - if err != nil { - err = msgp.WrapError(err, "ResultIndex") - return - } - // write "type" - err = en.Append(0xa4, 0x74, 0x79, 0x70, 0x65) - if err != nil { - return - } - err = en.WriteString(string(z.Type)) - if err != nil { - err = msgp.WrapError(err, "Type") - return - } - // write "bucket" - err = en.Append(0xa6, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74) - if err != nil { - return - } - err = en.WriteString(z.Bucket) - if err != nil { - err = msgp.WrapError(err, "Bucket") - return - } - // write "object" - err = en.Append(0xa6, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74) - if err != nil { - return - } - err = en.WriteString(z.Object) - if err != nil { - err = msgp.WrapError(err, "Object") - return - } - // write "versionId" - err = en.Append(0xa9, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64) - if err != nil { - return - } - err = en.WriteString(z.VersionID) - if err != nil { - err = msgp.WrapError(err, "VersionID") - return - } - // write "detail" - err = en.Append(0xa6, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c) - if err != nil { - return - } - err = en.WriteString(z.Detail) - if err != nil { - err = msgp.WrapError(err, "Detail") - return - } - if (zb0001Mask & 0x40) == 0 { // if not omitted - // write "parityBlocks" - err = en.Append(0xac, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // write "resultId" + err = en.Append(0xa8, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x49, 0x64) if err != nil { return } - err = en.WriteInt(z.ParityBlocks) + err = en.WriteInt64(z.ResultIndex) if err != nil { - err = msgp.WrapError(err, "ParityBlocks") + err = msgp.WrapError(err, "ResultIndex") return } - } - if (zb0001Mask & 0x80) == 0 { // if not omitted - // write "dataBlocks" - err = en.Append(0xaa, 0x64, 0x61, 0x74, 0x61, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73) + // write "type" + err = en.Append(0xa4, 0x74, 0x79, 0x70, 0x65) if err != nil { return } - err = en.WriteInt(z.DataBlocks) + err = en.WriteString(string(z.Type)) if err != nil { - err = msgp.WrapError(err, "DataBlocks") + err = msgp.WrapError(err, "Type") return } - } - // write "diskCount" - err = en.Append(0xa9, 0x64, 0x69, 0x73, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74) - if err != nil { - return - } - err = en.WriteInt(z.DiskCount) - if err != nil { - err = msgp.WrapError(err, "DiskCount") - return - } - // write "setCount" - err = en.Append(0xa8, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74) - if err != nil { - return - } - err = en.WriteInt(z.SetCount) - if err != nil { - err = msgp.WrapError(err, "SetCount") - return - } - // write "before" - err = en.Append(0xa6, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65) - if err != nil { - return - } - // map header, size 1 - // write "drives" - err = en.Append(0x81, 0xa6, 0x64, 0x72, 0x69, 0x76, 0x65, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.Before.Drives))) - if err != nil { - err = msgp.WrapError(err, "Before", "Drives") - return - } - for za0001 := range z.Before.Drives { - // map header, size 3 - // write "uuid" - err = en.Append(0x83, 0xa4, 0x75, 0x75, 0x69, 0x64) + // write "bucket" + err = en.Append(0xa6, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74) if err != nil { return } - err = en.WriteString(z.Before.Drives[za0001].UUID) + err = en.WriteString(z.Bucket) if err != nil { - err = msgp.WrapError(err, "Before", "Drives", za0001, "UUID") + err = msgp.WrapError(err, "Bucket") return } - // write "endpoint" - err = en.Append(0xa8, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) + // write "object" + err = en.Append(0xa6, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74) if err != nil { return } - err = en.WriteString(z.Before.Drives[za0001].Endpoint) + err = en.WriteString(z.Object) if err != nil { - err = msgp.WrapError(err, "Before", "Drives", za0001, "Endpoint") + err = msgp.WrapError(err, "Object") return } - // write "state" - err = en.Append(0xa5, 0x73, 0x74, 0x61, 0x74, 0x65) + // write "versionId" + err = en.Append(0xa9, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64) if err != nil { return } - err = en.WriteString(z.Before.Drives[za0001].State) + err = en.WriteString(z.VersionID) if err != nil { - err = msgp.WrapError(err, "Before", "Drives", za0001, "State") + err = msgp.WrapError(err, "VersionID") return } - } - // write "after" - err = en.Append(0xa5, 0x61, 0x66, 0x74, 0x65, 0x72) - if err != nil { - return - } - // map header, size 1 - // write "drives" - err = en.Append(0x81, 0xa6, 0x64, 0x72, 0x69, 0x76, 0x65, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.After.Drives))) - if err != nil { - err = msgp.WrapError(err, "After", "Drives") - return - } - for za0002 := range z.After.Drives { - // map header, size 3 - // write "uuid" - err = en.Append(0x83, 0xa4, 0x75, 0x75, 0x69, 0x64) + // write "detail" + err = en.Append(0xa6, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c) + if err != nil { + return + } + err = en.WriteString(z.Detail) + if err != nil { + err = msgp.WrapError(err, "Detail") + return + } + if (zb0001Mask & 0x40) == 0 { // if not omitted + // write "parityBlocks" + err = en.Append(0xac, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73) + if err != nil { + return + } + err = en.WriteInt(z.ParityBlocks) + if err != nil { + err = msgp.WrapError(err, "ParityBlocks") + return + } + } + if (zb0001Mask & 0x80) == 0 { // if not omitted + // write "dataBlocks" + err = en.Append(0xaa, 0x64, 0x61, 0x74, 0x61, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73) + if err != nil { + return + } + err = en.WriteInt(z.DataBlocks) + if err != nil { + err = msgp.WrapError(err, "DataBlocks") + return + } + } + // write "diskCount" + err = en.Append(0xa9, 0x64, 0x69, 0x73, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74) if err != nil { return } - err = en.WriteString(z.After.Drives[za0002].UUID) + err = en.WriteInt(z.DiskCount) if err != nil { - err = msgp.WrapError(err, "After", "Drives", za0002, "UUID") + err = msgp.WrapError(err, "DiskCount") return } - // write "endpoint" - err = en.Append(0xa8, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) + // write "setCount" + err = en.Append(0xa8, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74) if err != nil { return } - err = en.WriteString(z.After.Drives[za0002].Endpoint) + err = en.WriteInt(z.SetCount) if err != nil { - err = msgp.WrapError(err, "After", "Drives", za0002, "Endpoint") + err = msgp.WrapError(err, "SetCount") return } - // write "state" - err = en.Append(0xa5, 0x73, 0x74, 0x61, 0x74, 0x65) + // write "before" + err = en.Append(0xa6, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65) if err != nil { return } - err = en.WriteString(z.After.Drives[za0002].State) + // map header, size 1 + // write "drives" + err = en.Append(0x81, 0xa6, 0x64, 0x72, 0x69, 0x76, 0x65, 0x73) if err != nil { - err = msgp.WrapError(err, "After", "Drives", za0002, "State") return } - } - // write "objectSize" - err = en.Append(0xaa, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x69, 0x7a, 0x65) - if err != nil { - return - } - err = en.WriteInt64(z.ObjectSize) - if err != nil { - err = msgp.WrapError(err, "ObjectSize") - return + err = en.WriteArrayHeader(uint32(len(z.Before.Drives))) + if err != nil { + err = msgp.WrapError(err, "Before", "Drives") + return + } + for za0001 := range z.Before.Drives { + // map header, size 3 + // write "uuid" + err = en.Append(0x83, 0xa4, 0x75, 0x75, 0x69, 0x64) + if err != nil { + return + } + err = en.WriteString(z.Before.Drives[za0001].UUID) + if err != nil { + err = msgp.WrapError(err, "Before", "Drives", za0001, "UUID") + return + } + // write "endpoint" + err = en.Append(0xa8, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) + if err != nil { + return + } + err = en.WriteString(z.Before.Drives[za0001].Endpoint) + if err != nil { + err = msgp.WrapError(err, "Before", "Drives", za0001, "Endpoint") + return + } + // write "state" + err = en.Append(0xa5, 0x73, 0x74, 0x61, 0x74, 0x65) + if err != nil { + return + } + err = en.WriteString(z.Before.Drives[za0001].State) + if err != nil { + err = msgp.WrapError(err, "Before", "Drives", za0001, "State") + return + } + } + // write "after" + err = en.Append(0xa5, 0x61, 0x66, 0x74, 0x65, 0x72) + if err != nil { + return + } + // map header, size 1 + // write "drives" + err = en.Append(0x81, 0xa6, 0x64, 0x72, 0x69, 0x76, 0x65, 0x73) + if err != nil { + return + } + err = en.WriteArrayHeader(uint32(len(z.After.Drives))) + if err != nil { + err = msgp.WrapError(err, "After", "Drives") + return + } + for za0002 := range z.After.Drives { + // map header, size 3 + // write "uuid" + err = en.Append(0x83, 0xa4, 0x75, 0x75, 0x69, 0x64) + if err != nil { + return + } + err = en.WriteString(z.After.Drives[za0002].UUID) + if err != nil { + err = msgp.WrapError(err, "After", "Drives", za0002, "UUID") + return + } + // write "endpoint" + err = en.Append(0xa8, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) + if err != nil { + return + } + err = en.WriteString(z.After.Drives[za0002].Endpoint) + if err != nil { + err = msgp.WrapError(err, "After", "Drives", za0002, "Endpoint") + return + } + // write "state" + err = en.Append(0xa5, 0x73, 0x74, 0x61, 0x74, 0x65) + if err != nil { + return + } + err = en.WriteString(z.After.Drives[za0002].State) + if err != nil { + err = msgp.WrapError(err, "After", "Drives", za0002, "State") + return + } + } + // write "objectSize" + err = en.Append(0xaa, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x69, 0x7a, 0x65) + if err != nil { + return + } + err = en.WriteInt64(z.ObjectSize) + if err != nil { + err = msgp.WrapError(err, "ObjectSize") + return + } } return } @@ -1763,82 +1766,83 @@ func (z *HealResultItem) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // string "resultId" + o = append(o, 0xa8, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x49, 0x64) + o = msgp.AppendInt64(o, z.ResultIndex) + // string "type" + o = append(o, 0xa4, 0x74, 0x79, 0x70, 0x65) + o = msgp.AppendString(o, string(z.Type)) + // string "bucket" + o = append(o, 0xa6, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74) + o = msgp.AppendString(o, z.Bucket) + // string "object" + o = append(o, 0xa6, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74) + o = msgp.AppendString(o, z.Object) + // string "versionId" + o = append(o, 0xa9, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64) + o = msgp.AppendString(o, z.VersionID) + // string "detail" + o = append(o, 0xa6, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c) + o = msgp.AppendString(o, z.Detail) + if (zb0001Mask & 0x40) == 0 { // if not omitted + // string "parityBlocks" + o = append(o, 0xac, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73) + o = msgp.AppendInt(o, z.ParityBlocks) + } + if (zb0001Mask & 0x80) == 0 { // if not omitted + // string "dataBlocks" + o = append(o, 0xaa, 0x64, 0x61, 0x74, 0x61, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73) + o = msgp.AppendInt(o, z.DataBlocks) + } + // string "diskCount" + o = append(o, 0xa9, 0x64, 0x69, 0x73, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74) + o = msgp.AppendInt(o, z.DiskCount) + // string "setCount" + o = append(o, 0xa8, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74) + o = msgp.AppendInt(o, z.SetCount) + // string "before" + o = append(o, 0xa6, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65) + // map header, size 1 + // string "drives" + o = append(o, 0x81, 0xa6, 0x64, 0x72, 0x69, 0x76, 0x65, 0x73) + o = msgp.AppendArrayHeader(o, uint32(len(z.Before.Drives))) + for za0001 := range z.Before.Drives { + // map header, size 3 + // string "uuid" + o = append(o, 0x83, 0xa4, 0x75, 0x75, 0x69, 0x64) + o = msgp.AppendString(o, z.Before.Drives[za0001].UUID) + // string "endpoint" + o = append(o, 0xa8, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) + o = msgp.AppendString(o, z.Before.Drives[za0001].Endpoint) + // string "state" + o = append(o, 0xa5, 0x73, 0x74, 0x61, 0x74, 0x65) + o = msgp.AppendString(o, z.Before.Drives[za0001].State) + } + // string "after" + o = append(o, 0xa5, 0x61, 0x66, 0x74, 0x65, 0x72) + // map header, size 1 + // string "drives" + o = append(o, 0x81, 0xa6, 0x64, 0x72, 0x69, 0x76, 0x65, 0x73) + o = msgp.AppendArrayHeader(o, uint32(len(z.After.Drives))) + for za0002 := range z.After.Drives { + // map header, size 3 + // string "uuid" + o = append(o, 0x83, 0xa4, 0x75, 0x75, 0x69, 0x64) + o = msgp.AppendString(o, z.After.Drives[za0002].UUID) + // string "endpoint" + o = append(o, 0xa8, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) + o = msgp.AppendString(o, z.After.Drives[za0002].Endpoint) + // string "state" + o = append(o, 0xa5, 0x73, 0x74, 0x61, 0x74, 0x65) + o = msgp.AppendString(o, z.After.Drives[za0002].State) + } + // string "objectSize" + o = append(o, 0xaa, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x69, 0x7a, 0x65) + o = msgp.AppendInt64(o, z.ObjectSize) } - // string "resultId" - o = append(o, 0xa8, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x49, 0x64) - o = msgp.AppendInt64(o, z.ResultIndex) - // string "type" - o = append(o, 0xa4, 0x74, 0x79, 0x70, 0x65) - o = msgp.AppendString(o, string(z.Type)) - // string "bucket" - o = append(o, 0xa6, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74) - o = msgp.AppendString(o, z.Bucket) - // string "object" - o = append(o, 0xa6, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74) - o = msgp.AppendString(o, z.Object) - // string "versionId" - o = append(o, 0xa9, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64) - o = msgp.AppendString(o, z.VersionID) - // string "detail" - o = append(o, 0xa6, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c) - o = msgp.AppendString(o, z.Detail) - if (zb0001Mask & 0x40) == 0 { // if not omitted - // string "parityBlocks" - o = append(o, 0xac, 0x70, 0x61, 0x72, 0x69, 0x74, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73) - o = msgp.AppendInt(o, z.ParityBlocks) - } - if (zb0001Mask & 0x80) == 0 { // if not omitted - // string "dataBlocks" - o = append(o, 0xaa, 0x64, 0x61, 0x74, 0x61, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73) - o = msgp.AppendInt(o, z.DataBlocks) - } - // string "diskCount" - o = append(o, 0xa9, 0x64, 0x69, 0x73, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74) - o = msgp.AppendInt(o, z.DiskCount) - // string "setCount" - o = append(o, 0xa8, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74) - o = msgp.AppendInt(o, z.SetCount) - // string "before" - o = append(o, 0xa6, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65) - // map header, size 1 - // string "drives" - o = append(o, 0x81, 0xa6, 0x64, 0x72, 0x69, 0x76, 0x65, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.Before.Drives))) - for za0001 := range z.Before.Drives { - // map header, size 3 - // string "uuid" - o = append(o, 0x83, 0xa4, 0x75, 0x75, 0x69, 0x64) - o = msgp.AppendString(o, z.Before.Drives[za0001].UUID) - // string "endpoint" - o = append(o, 0xa8, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) - o = msgp.AppendString(o, z.Before.Drives[za0001].Endpoint) - // string "state" - o = append(o, 0xa5, 0x73, 0x74, 0x61, 0x74, 0x65) - o = msgp.AppendString(o, z.Before.Drives[za0001].State) - } - // string "after" - o = append(o, 0xa5, 0x61, 0x66, 0x74, 0x65, 0x72) - // map header, size 1 - // string "drives" - o = append(o, 0x81, 0xa6, 0x64, 0x72, 0x69, 0x76, 0x65, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.After.Drives))) - for za0002 := range z.After.Drives { - // map header, size 3 - // string "uuid" - o = append(o, 0x83, 0xa4, 0x75, 0x75, 0x69, 0x64) - o = msgp.AppendString(o, z.After.Drives[za0002].UUID) - // string "endpoint" - o = append(o, 0xa8, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) - o = msgp.AppendString(o, z.After.Drives[za0002].Endpoint) - // string "state" - o = append(o, 0xa5, 0x73, 0x74, 0x61, 0x74, 0x65) - o = msgp.AppendString(o, z.After.Drives[za0002].State) - } - // string "objectSize" - o = append(o, 0xaa, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x69, 0x7a, 0x65) - o = msgp.AppendInt64(o, z.ObjectSize) return } @@ -2554,11 +2558,10 @@ func (z *HealTaskStatus) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { - if (zb0001Mask & 0x1) == 0 { - z.Items = nil - } + if (zb0001Mask & 0x1) == 0 { + z.Items = nil } + return } @@ -2577,66 +2580,67 @@ func (z *HealTaskStatus) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - // write "summary" - err = en.Append(0xa7, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79) - if err != nil { - return - } - err = en.WriteString(z.Summary) - if err != nil { - err = msgp.WrapError(err, "Summary") - return - } - // write "detail" - err = en.Append(0xa6, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c) - if err != nil { - return - } - err = en.WriteString(z.FailureDetail) - if err != nil { - err = msgp.WrapError(err, "FailureDetail") - return - } - // write "startTime" - err = en.Append(0xa9, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65) - if err != nil { - return - } - err = en.WriteTime(z.StartTime) - if err != nil { - err = msgp.WrapError(err, "StartTime") - return - } - // write "settings" - err = en.Append(0xa8, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73) - if err != nil { - return - } - err = z.HealSettings.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "HealSettings") - return - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // write "items" - err = en.Append(0xa5, 0x69, 0x74, 0x65, 0x6d, 0x73) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // write "summary" + err = en.Append(0xa7, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79) if err != nil { return } - err = en.WriteArrayHeader(uint32(len(z.Items))) + err = en.WriteString(z.Summary) if err != nil { - err = msgp.WrapError(err, "Items") + err = msgp.WrapError(err, "Summary") return } - for za0001 := range z.Items { - err = z.Items[za0001].EncodeMsg(en) + // write "detail" + err = en.Append(0xa6, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c) + if err != nil { + return + } + err = en.WriteString(z.FailureDetail) + if err != nil { + err = msgp.WrapError(err, "FailureDetail") + return + } + // write "startTime" + err = en.Append(0xa9, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65) + if err != nil { + return + } + err = en.WriteTime(z.StartTime) + if err != nil { + err = msgp.WrapError(err, "StartTime") + return + } + // write "settings" + err = en.Append(0xa8, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73) + if err != nil { + return + } + err = z.HealSettings.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "HealSettings") + return + } + if (zb0001Mask & 0x10) == 0 { // if not omitted + // write "items" + err = en.Append(0xa5, 0x69, 0x74, 0x65, 0x6d, 0x73) + if err != nil { + return + } + err = en.WriteArrayHeader(uint32(len(z.Items))) if err != nil { - err = msgp.WrapError(err, "Items", za0001) + err = msgp.WrapError(err, "Items") return } + for za0001 := range z.Items { + err = z.Items[za0001].EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "Items", za0001) + return + } + } } } return @@ -2655,34 +2659,35 @@ func (z *HealTaskStatus) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } - // string "summary" - o = append(o, 0xa7, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79) - o = msgp.AppendString(o, z.Summary) - // string "detail" - o = append(o, 0xa6, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c) - o = msgp.AppendString(o, z.FailureDetail) - // string "startTime" - o = append(o, 0xa9, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65) - o = msgp.AppendTime(o, z.StartTime) - // string "settings" - o = append(o, 0xa8, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73) - o, err = z.HealSettings.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "HealSettings") - return - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // string "items" - o = append(o, 0xa5, 0x69, 0x74, 0x65, 0x6d, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.Items))) - for za0001 := range z.Items { - o, err = z.Items[za0001].MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "Items", za0001) - return + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // string "summary" + o = append(o, 0xa7, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79) + o = msgp.AppendString(o, z.Summary) + // string "detail" + o = append(o, 0xa6, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c) + o = msgp.AppendString(o, z.FailureDetail) + // string "startTime" + o = append(o, 0xa9, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65) + o = msgp.AppendTime(o, z.StartTime) + // string "settings" + o = append(o, 0xa8, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73) + o, err = z.HealSettings.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "HealSettings") + return + } + if (zb0001Mask & 0x10) == 0 { // if not omitted + // string "items" + o = append(o, 0xa5, 0x69, 0x74, 0x65, 0x6d, 0x73) + o = msgp.AppendArrayHeader(o, uint32(len(z.Items))) + for za0001 := range z.Items { + o, err = z.Items[za0001].MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "Items", za0001) + return + } } } } @@ -2762,11 +2767,10 @@ func (z *HealTaskStatus) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { - if (zb0001Mask & 0x1) == 0 { - z.Items = nil - } + if (zb0001Mask & 0x1) == 0 { + z.Items = nil } + o = bts return } diff --git a/info-commands_gen.go b/info-commands_gen.go index b530a19..3428f19 100644 --- a/info-commands_gen.go +++ b/info-commands_gen.go @@ -66,11 +66,10 @@ func (z *Audit) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0004Mask != 0x1 { - if (zb0004Mask & 0x1) == 0 { - zb0002.Status = "" - } + if (zb0004Mask & 0x1) == 0 { + zb0002.Status = "" } + (*z)[zb0001] = zb0002 } return @@ -102,9 +101,6 @@ func (z Audit) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } if (zb0001Mask & 0x1) == 0 { // if not omitted // write "status" err = en.Append(0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) @@ -137,9 +133,6 @@ func (z Audit) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } if (zb0001Mask & 0x1) == 0 { // if not omitted // string "status" o = append(o, 0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) @@ -207,11 +200,10 @@ func (z *Audit) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0004Mask != 0x1 { - if (zb0004Mask & 0x1) == 0 { - zb0002.Status = "" - } + if (zb0004Mask & 0x1) == 0 { + zb0002.Status = "" } + (*z)[zb0001] = zb0002 } o = bts @@ -1705,11 +1697,10 @@ func (z *Buckets) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { - if (zb0001Mask & 0x1) == 0 { - z.Error = "" - } + if (zb0001Mask & 0x1) == 0 { + z.Error = "" } + return } @@ -1728,30 +1719,31 @@ func (z Buckets) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - // write "count" - err = en.Append(0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) - if err != nil { - return - } - err = en.WriteUint64(z.Count) - if err != nil { - err = msgp.WrapError(err, "Count") - return - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // write "error" - err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // write "count" + err = en.Append(0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) if err != nil { return } - err = en.WriteString(z.Error) + err = en.WriteUint64(z.Count) if err != nil { - err = msgp.WrapError(err, "Error") + err = msgp.WrapError(err, "Count") return } + if (zb0001Mask & 0x2) == 0 { // if not omitted + // write "error" + err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + if err != nil { + return + } + err = en.WriteString(z.Error) + if err != nil { + err = msgp.WrapError(err, "Error") + return + } + } } return } @@ -1769,16 +1761,17 @@ func (z Buckets) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } - // string "count" - o = append(o, 0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) - o = msgp.AppendUint64(o, z.Count) - if (zb0001Mask & 0x2) == 0 { // if not omitted - // string "error" - o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) - o = msgp.AppendString(o, z.Error) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // string "count" + o = append(o, 0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) + o = msgp.AppendUint64(o, z.Count) + if (zb0001Mask & 0x2) == 0 { // if not omitted + // string "error" + o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + o = msgp.AppendString(o, z.Error) + } } return } @@ -1825,11 +1818,10 @@ func (z *Buckets) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { - if (zb0001Mask & 0x1) == 0 { - z.Error = "" - } + if (zb0001Mask & 0x1) == 0 { + z.Error = "" } + o = bts return } @@ -2935,11 +2927,10 @@ func (z *DeleteMarkers) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { - if (zb0001Mask & 0x1) == 0 { - z.Error = "" - } + if (zb0001Mask & 0x1) == 0 { + z.Error = "" } + return } @@ -2958,30 +2949,31 @@ func (z DeleteMarkers) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - // write "count" - err = en.Append(0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) - if err != nil { - return - } - err = en.WriteUint64(z.Count) - if err != nil { - err = msgp.WrapError(err, "Count") - return - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // write "error" - err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // write "count" + err = en.Append(0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) if err != nil { return } - err = en.WriteString(z.Error) + err = en.WriteUint64(z.Count) if err != nil { - err = msgp.WrapError(err, "Error") + err = msgp.WrapError(err, "Count") return } + if (zb0001Mask & 0x2) == 0 { // if not omitted + // write "error" + err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + if err != nil { + return + } + err = en.WriteString(z.Error) + if err != nil { + err = msgp.WrapError(err, "Error") + return + } + } } return } @@ -2999,16 +2991,17 @@ func (z DeleteMarkers) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } - // string "count" - o = append(o, 0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) - o = msgp.AppendUint64(o, z.Count) - if (zb0001Mask & 0x2) == 0 { // if not omitted - // string "error" - o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) - o = msgp.AppendString(o, z.Error) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // string "count" + o = append(o, 0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) + o = msgp.AppendUint64(o, z.Count) + if (zb0001Mask & 0x2) == 0 { // if not omitted + // string "error" + o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + o = msgp.AppendString(o, z.Error) + } } return } @@ -3055,11 +3048,10 @@ func (z *DeleteMarkers) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { - if (zb0001Mask & 0x1) == 0 { - z.Error = "" - } + if (zb0001Mask & 0x1) == 0 { + z.Error = "" } + o = bts return } @@ -3481,341 +3473,342 @@ func (z *Disk) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - if (zb0001Mask & 0x1) == 0 { // if not omitted - // write "endpoint" - err = en.Append(0xa8, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) - if err != nil { - return - } - err = en.WriteString(z.Endpoint) - if err != nil { - err = msgp.WrapError(err, "Endpoint") - return - } - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // write "rootDisk" - err = en.Append(0xa8, 0x72, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x73, 0x6b) - if err != nil { - return - } - err = en.WriteBool(z.RootDisk) - if err != nil { - err = msgp.WrapError(err, "RootDisk") - return - } - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // write "path" - err = en.Append(0xa4, 0x70, 0x61, 0x74, 0x68) - if err != nil { - return - } - err = en.WriteString(z.DrivePath) - if err != nil { - err = msgp.WrapError(err, "DrivePath") - return - } - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // write "healing" - err = en.Append(0xa7, 0x68, 0x65, 0x61, 0x6c, 0x69, 0x6e, 0x67) - if err != nil { - return - } - err = en.WriteBool(z.Healing) - if err != nil { - err = msgp.WrapError(err, "Healing") - return - } - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // write "scanning" - err = en.Append(0xa8, 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x69, 0x6e, 0x67) - if err != nil { - return - } - err = en.WriteBool(z.Scanning) - if err != nil { - err = msgp.WrapError(err, "Scanning") - return - } - } - if (zb0001Mask & 0x20) == 0 { // if not omitted - // write "state" - err = en.Append(0xa5, 0x73, 0x74, 0x61, 0x74, 0x65) - if err != nil { - return - } - err = en.WriteString(z.State) - if err != nil { - err = msgp.WrapError(err, "State") - return - } - } - if (zb0001Mask & 0x40) == 0 { // if not omitted - // write "uuid" - err = en.Append(0xa4, 0x75, 0x75, 0x69, 0x64) - if err != nil { - return - } - err = en.WriteString(z.UUID) - if err != nil { - err = msgp.WrapError(err, "UUID") - return - } - } - // write "major" - err = en.Append(0xa5, 0x6d, 0x61, 0x6a, 0x6f, 0x72) - if err != nil { - return - } - err = en.WriteUint32(z.Major) - if err != nil { - err = msgp.WrapError(err, "Major") - return - } - // write "minor" - err = en.Append(0xa5, 0x6d, 0x69, 0x6e, 0x6f, 0x72) - if err != nil { - return - } - err = en.WriteUint32(z.Minor) - if err != nil { - err = msgp.WrapError(err, "Minor") - return - } - if (zb0001Mask & 0x200) == 0 { // if not omitted - // write "model" - err = en.Append(0xa5, 0x6d, 0x6f, 0x64, 0x65, 0x6c) - if err != nil { - return - } - err = en.WriteString(z.Model) - if err != nil { - err = msgp.WrapError(err, "Model") - return - } - } - if (zb0001Mask & 0x400) == 0 { // if not omitted - // write "totalspace" - err = en.Append(0xaa, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x70, 0x61, 0x63, 0x65) - if err != nil { - return - } - err = en.WriteUint64(z.TotalSpace) - if err != nil { - err = msgp.WrapError(err, "TotalSpace") - return - } - } - if (zb0001Mask & 0x800) == 0 { // if not omitted - // write "usedspace" - err = en.Append(0xa9, 0x75, 0x73, 0x65, 0x64, 0x73, 0x70, 0x61, 0x63, 0x65) - if err != nil { - return - } - err = en.WriteUint64(z.UsedSpace) - if err != nil { - err = msgp.WrapError(err, "UsedSpace") - return - } - } - if (zb0001Mask & 0x1000) == 0 { // if not omitted - // write "availspace" - err = en.Append(0xaa, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x73, 0x70, 0x61, 0x63, 0x65) - if err != nil { - return - } - err = en.WriteUint64(z.AvailableSpace) - if err != nil { - err = msgp.WrapError(err, "AvailableSpace") - return - } - } - if (zb0001Mask & 0x2000) == 0 { // if not omitted - // write "readthroughput" - err = en.Append(0xae, 0x72, 0x65, 0x61, 0x64, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74) - if err != nil { - return + + // skip if no fields are to be emitted + if zb0001Len != 0 { + if (zb0001Mask & 0x1) == 0 { // if not omitted + // write "endpoint" + err = en.Append(0xa8, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) + if err != nil { + return + } + err = en.WriteString(z.Endpoint) + if err != nil { + err = msgp.WrapError(err, "Endpoint") + return + } } - err = en.WriteFloat64(z.ReadThroughput) - if err != nil { - err = msgp.WrapError(err, "ReadThroughput") - return + if (zb0001Mask & 0x2) == 0 { // if not omitted + // write "rootDisk" + err = en.Append(0xa8, 0x72, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x73, 0x6b) + if err != nil { + return + } + err = en.WriteBool(z.RootDisk) + if err != nil { + err = msgp.WrapError(err, "RootDisk") + return + } } - } - if (zb0001Mask & 0x4000) == 0 { // if not omitted - // write "writethroughput" - err = en.Append(0xaf, 0x77, 0x72, 0x69, 0x74, 0x65, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74) - if err != nil { - return + if (zb0001Mask & 0x4) == 0 { // if not omitted + // write "path" + err = en.Append(0xa4, 0x70, 0x61, 0x74, 0x68) + if err != nil { + return + } + err = en.WriteString(z.DrivePath) + if err != nil { + err = msgp.WrapError(err, "DrivePath") + return + } } - err = en.WriteFloat64(z.WriteThroughPut) - if err != nil { - err = msgp.WrapError(err, "WriteThroughPut") - return + if (zb0001Mask & 0x8) == 0 { // if not omitted + // write "healing" + err = en.Append(0xa7, 0x68, 0x65, 0x61, 0x6c, 0x69, 0x6e, 0x67) + if err != nil { + return + } + err = en.WriteBool(z.Healing) + if err != nil { + err = msgp.WrapError(err, "Healing") + return + } } - } - if (zb0001Mask & 0x8000) == 0 { // if not omitted - // write "readlatency" - err = en.Append(0xab, 0x72, 0x65, 0x61, 0x64, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79) - if err != nil { - return + if (zb0001Mask & 0x10) == 0 { // if not omitted + // write "scanning" + err = en.Append(0xa8, 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x69, 0x6e, 0x67) + if err != nil { + return + } + err = en.WriteBool(z.Scanning) + if err != nil { + err = msgp.WrapError(err, "Scanning") + return + } } - err = en.WriteFloat64(z.ReadLatency) - if err != nil { - err = msgp.WrapError(err, "ReadLatency") - return + if (zb0001Mask & 0x20) == 0 { // if not omitted + // write "state" + err = en.Append(0xa5, 0x73, 0x74, 0x61, 0x74, 0x65) + if err != nil { + return + } + err = en.WriteString(z.State) + if err != nil { + err = msgp.WrapError(err, "State") + return + } } - } - if (zb0001Mask & 0x10000) == 0 { // if not omitted - // write "writelatency" - err = en.Append(0xac, 0x77, 0x72, 0x69, 0x74, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79) - if err != nil { - return + if (zb0001Mask & 0x40) == 0 { // if not omitted + // write "uuid" + err = en.Append(0xa4, 0x75, 0x75, 0x69, 0x64) + if err != nil { + return + } + err = en.WriteString(z.UUID) + if err != nil { + err = msgp.WrapError(err, "UUID") + return + } } - err = en.WriteFloat64(z.WriteLatency) + // write "major" + err = en.Append(0xa5, 0x6d, 0x61, 0x6a, 0x6f, 0x72) if err != nil { - err = msgp.WrapError(err, "WriteLatency") return } - } - if (zb0001Mask & 0x20000) == 0 { // if not omitted - // write "utilization" - err = en.Append(0xab, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e) + err = en.WriteUint32(z.Major) if err != nil { + err = msgp.WrapError(err, "Major") return } - err = en.WriteFloat64(z.Utilization) + // write "minor" + err = en.Append(0xa5, 0x6d, 0x69, 0x6e, 0x6f, 0x72) if err != nil { - err = msgp.WrapError(err, "Utilization") return } - } - if (zb0001Mask & 0x40000) == 0 { // if not omitted - // write "metrics" - err = en.Append(0xa7, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73) + err = en.WriteUint32(z.Minor) if err != nil { + err = msgp.WrapError(err, "Minor") return } - if z.Metrics == nil { - err = en.WriteNil() + if (zb0001Mask & 0x200) == 0 { // if not omitted + // write "model" + err = en.Append(0xa5, 0x6d, 0x6f, 0x64, 0x65, 0x6c) if err != nil { return } - } else { - err = z.Metrics.EncodeMsg(en) + err = en.WriteString(z.Model) if err != nil { - err = msgp.WrapError(err, "Metrics") + err = msgp.WrapError(err, "Model") return } } - } - if (zb0001Mask & 0x80000) == 0 { // if not omitted - // write "heal_info" - err = en.Append(0xa9, 0x68, 0x65, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f) - if err != nil { - return + if (zb0001Mask & 0x400) == 0 { // if not omitted + // write "totalspace" + err = en.Append(0xaa, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x70, 0x61, 0x63, 0x65) + if err != nil { + return + } + err = en.WriteUint64(z.TotalSpace) + if err != nil { + err = msgp.WrapError(err, "TotalSpace") + return + } } - if z.HealInfo == nil { - err = en.WriteNil() + if (zb0001Mask & 0x800) == 0 { // if not omitted + // write "usedspace" + err = en.Append(0xa9, 0x75, 0x73, 0x65, 0x64, 0x73, 0x70, 0x61, 0x63, 0x65) if err != nil { return } - } else { - err = z.HealInfo.EncodeMsg(en) + err = en.WriteUint64(z.UsedSpace) if err != nil { - err = msgp.WrapError(err, "HealInfo") + err = msgp.WrapError(err, "UsedSpace") return } } - } - // write "used_inodes" - err = en.Append(0xab, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73) - if err != nil { - return - } - err = en.WriteUint64(z.UsedInodes) - if err != nil { - err = msgp.WrapError(err, "UsedInodes") - return - } - if (zb0001Mask & 0x200000) == 0 { // if not omitted - // write "free_inodes" - err = en.Append(0xab, 0x66, 0x72, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73) - if err != nil { - return + if (zb0001Mask & 0x1000) == 0 { // if not omitted + // write "availspace" + err = en.Append(0xaa, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x73, 0x70, 0x61, 0x63, 0x65) + if err != nil { + return + } + err = en.WriteUint64(z.AvailableSpace) + if err != nil { + err = msgp.WrapError(err, "AvailableSpace") + return + } } - err = en.WriteUint64(z.FreeInodes) - if err != nil { - err = msgp.WrapError(err, "FreeInodes") - return + if (zb0001Mask & 0x2000) == 0 { // if not omitted + // write "readthroughput" + err = en.Append(0xae, 0x72, 0x65, 0x61, 0x64, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74) + if err != nil { + return + } + err = en.WriteFloat64(z.ReadThroughput) + if err != nil { + err = msgp.WrapError(err, "ReadThroughput") + return + } } - } - if (zb0001Mask & 0x400000) == 0 { // if not omitted - // write "local" - err = en.Append(0xa5, 0x6c, 0x6f, 0x63, 0x61, 0x6c) - if err != nil { - return + if (zb0001Mask & 0x4000) == 0 { // if not omitted + // write "writethroughput" + err = en.Append(0xaf, 0x77, 0x72, 0x69, 0x74, 0x65, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74) + if err != nil { + return + } + err = en.WriteFloat64(z.WriteThroughPut) + if err != nil { + err = msgp.WrapError(err, "WriteThroughPut") + return + } + } + if (zb0001Mask & 0x8000) == 0 { // if not omitted + // write "readlatency" + err = en.Append(0xab, 0x72, 0x65, 0x61, 0x64, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79) + if err != nil { + return + } + err = en.WriteFloat64(z.ReadLatency) + if err != nil { + err = msgp.WrapError(err, "ReadLatency") + return + } + } + if (zb0001Mask & 0x10000) == 0 { // if not omitted + // write "writelatency" + err = en.Append(0xac, 0x77, 0x72, 0x69, 0x74, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79) + if err != nil { + return + } + err = en.WriteFloat64(z.WriteLatency) + if err != nil { + err = msgp.WrapError(err, "WriteLatency") + return + } + } + if (zb0001Mask & 0x20000) == 0 { // if not omitted + // write "utilization" + err = en.Append(0xab, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e) + if err != nil { + return + } + err = en.WriteFloat64(z.Utilization) + if err != nil { + err = msgp.WrapError(err, "Utilization") + return + } + } + if (zb0001Mask & 0x40000) == 0 { // if not omitted + // write "metrics" + err = en.Append(0xa7, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73) + if err != nil { + return + } + if z.Metrics == nil { + err = en.WriteNil() + if err != nil { + return + } + } else { + err = z.Metrics.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "Metrics") + return + } + } + } + if (zb0001Mask & 0x80000) == 0 { // if not omitted + // write "heal_info" + err = en.Append(0xa9, 0x68, 0x65, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f) + if err != nil { + return + } + if z.HealInfo == nil { + err = en.WriteNil() + if err != nil { + return + } + } else { + err = z.HealInfo.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "HealInfo") + return + } + } } - err = en.WriteBool(z.Local) + // write "used_inodes" + err = en.Append(0xab, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73) if err != nil { - err = msgp.WrapError(err, "Local") return } - } - if (zb0001Mask & 0x800000) == 0 { // if not omitted - // write "cacheStats" - err = en.Append(0xaa, 0x63, 0x61, 0x63, 0x68, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73) + err = en.WriteUint64(z.UsedInodes) if err != nil { + err = msgp.WrapError(err, "UsedInodes") return } - if z.Cache == nil { - err = en.WriteNil() + if (zb0001Mask & 0x200000) == 0 { // if not omitted + // write "free_inodes" + err = en.Append(0xab, 0x66, 0x72, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73) if err != nil { return } - } else { - err = z.Cache.EncodeMsg(en) + err = en.WriteUint64(z.FreeInodes) if err != nil { - err = msgp.WrapError(err, "Cache") + err = msgp.WrapError(err, "FreeInodes") return } } - } - // write "pool_index" - err = en.Append(0xaa, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78) - if err != nil { - return - } - err = en.WriteInt(z.PoolIndex) - if err != nil { - err = msgp.WrapError(err, "PoolIndex") - return - } - // write "set_index" - err = en.Append(0xa9, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78) - if err != nil { - return - } - err = en.WriteInt(z.SetIndex) - if err != nil { - err = msgp.WrapError(err, "SetIndex") - return - } - // write "disk_index" - err = en.Append(0xaa, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78) - if err != nil { - return - } - err = en.WriteInt(z.DiskIndex) - if err != nil { - err = msgp.WrapError(err, "DiskIndex") - return + if (zb0001Mask & 0x400000) == 0 { // if not omitted + // write "local" + err = en.Append(0xa5, 0x6c, 0x6f, 0x63, 0x61, 0x6c) + if err != nil { + return + } + err = en.WriteBool(z.Local) + if err != nil { + err = msgp.WrapError(err, "Local") + return + } + } + if (zb0001Mask & 0x800000) == 0 { // if not omitted + // write "cacheStats" + err = en.Append(0xaa, 0x63, 0x61, 0x63, 0x68, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73) + if err != nil { + return + } + if z.Cache == nil { + err = en.WriteNil() + if err != nil { + return + } + } else { + err = z.Cache.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "Cache") + return + } + } + } + // write "pool_index" + err = en.Append(0xaa, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78) + if err != nil { + return + } + err = en.WriteInt(z.PoolIndex) + if err != nil { + err = msgp.WrapError(err, "PoolIndex") + return + } + // write "set_index" + err = en.Append(0xa9, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78) + if err != nil { + return + } + err = en.WriteInt(z.SetIndex) + if err != nil { + err = msgp.WrapError(err, "SetIndex") + return + } + // write "disk_index" + err = en.Append(0xaa, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78) + if err != nil { + return + } + err = en.WriteInt(z.DiskIndex) + if err != nil { + err = msgp.WrapError(err, "DiskIndex") + return + } } return } @@ -3913,156 +3906,157 @@ func (z *Disk) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = msgp.AppendMapHeader(o, zb0001Len) - if zb0001Len == 0 { - return - } - if (zb0001Mask & 0x1) == 0 { // if not omitted - // string "endpoint" - o = append(o, 0xa8, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) - o = msgp.AppendString(o, z.Endpoint) - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // string "rootDisk" - o = append(o, 0xa8, 0x72, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x73, 0x6b) - o = msgp.AppendBool(o, z.RootDisk) - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // string "path" - o = append(o, 0xa4, 0x70, 0x61, 0x74, 0x68) - o = msgp.AppendString(o, z.DrivePath) - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // string "healing" - o = append(o, 0xa7, 0x68, 0x65, 0x61, 0x6c, 0x69, 0x6e, 0x67) - o = msgp.AppendBool(o, z.Healing) - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // string "scanning" - o = append(o, 0xa8, 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x69, 0x6e, 0x67) - o = msgp.AppendBool(o, z.Scanning) - } - if (zb0001Mask & 0x20) == 0 { // if not omitted - // string "state" - o = append(o, 0xa5, 0x73, 0x74, 0x61, 0x74, 0x65) - o = msgp.AppendString(o, z.State) - } - if (zb0001Mask & 0x40) == 0 { // if not omitted - // string "uuid" - o = append(o, 0xa4, 0x75, 0x75, 0x69, 0x64) - o = msgp.AppendString(o, z.UUID) - } - // string "major" - o = append(o, 0xa5, 0x6d, 0x61, 0x6a, 0x6f, 0x72) - o = msgp.AppendUint32(o, z.Major) - // string "minor" - o = append(o, 0xa5, 0x6d, 0x69, 0x6e, 0x6f, 0x72) - o = msgp.AppendUint32(o, z.Minor) - if (zb0001Mask & 0x200) == 0 { // if not omitted - // string "model" - o = append(o, 0xa5, 0x6d, 0x6f, 0x64, 0x65, 0x6c) - o = msgp.AppendString(o, z.Model) - } - if (zb0001Mask & 0x400) == 0 { // if not omitted - // string "totalspace" - o = append(o, 0xaa, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x70, 0x61, 0x63, 0x65) - o = msgp.AppendUint64(o, z.TotalSpace) - } - if (zb0001Mask & 0x800) == 0 { // if not omitted - // string "usedspace" - o = append(o, 0xa9, 0x75, 0x73, 0x65, 0x64, 0x73, 0x70, 0x61, 0x63, 0x65) - o = msgp.AppendUint64(o, z.UsedSpace) - } - if (zb0001Mask & 0x1000) == 0 { // if not omitted - // string "availspace" - o = append(o, 0xaa, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x73, 0x70, 0x61, 0x63, 0x65) - o = msgp.AppendUint64(o, z.AvailableSpace) - } - if (zb0001Mask & 0x2000) == 0 { // if not omitted - // string "readthroughput" - o = append(o, 0xae, 0x72, 0x65, 0x61, 0x64, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74) - o = msgp.AppendFloat64(o, z.ReadThroughput) - } - if (zb0001Mask & 0x4000) == 0 { // if not omitted - // string "writethroughput" - o = append(o, 0xaf, 0x77, 0x72, 0x69, 0x74, 0x65, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74) - o = msgp.AppendFloat64(o, z.WriteThroughPut) - } - if (zb0001Mask & 0x8000) == 0 { // if not omitted - // string "readlatency" - o = append(o, 0xab, 0x72, 0x65, 0x61, 0x64, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79) - o = msgp.AppendFloat64(o, z.ReadLatency) - } - if (zb0001Mask & 0x10000) == 0 { // if not omitted - // string "writelatency" - o = append(o, 0xac, 0x77, 0x72, 0x69, 0x74, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79) - o = msgp.AppendFloat64(o, z.WriteLatency) - } - if (zb0001Mask & 0x20000) == 0 { // if not omitted - // string "utilization" - o = append(o, 0xab, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e) - o = msgp.AppendFloat64(o, z.Utilization) - } - if (zb0001Mask & 0x40000) == 0 { // if not omitted - // string "metrics" - o = append(o, 0xa7, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73) - if z.Metrics == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.Metrics.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "Metrics") - return + + // skip if no fields are to be emitted + if zb0001Len != 0 { + if (zb0001Mask & 0x1) == 0 { // if not omitted + // string "endpoint" + o = append(o, 0xa8, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) + o = msgp.AppendString(o, z.Endpoint) + } + if (zb0001Mask & 0x2) == 0 { // if not omitted + // string "rootDisk" + o = append(o, 0xa8, 0x72, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x73, 0x6b) + o = msgp.AppendBool(o, z.RootDisk) + } + if (zb0001Mask & 0x4) == 0 { // if not omitted + // string "path" + o = append(o, 0xa4, 0x70, 0x61, 0x74, 0x68) + o = msgp.AppendString(o, z.DrivePath) + } + if (zb0001Mask & 0x8) == 0 { // if not omitted + // string "healing" + o = append(o, 0xa7, 0x68, 0x65, 0x61, 0x6c, 0x69, 0x6e, 0x67) + o = msgp.AppendBool(o, z.Healing) + } + if (zb0001Mask & 0x10) == 0 { // if not omitted + // string "scanning" + o = append(o, 0xa8, 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x69, 0x6e, 0x67) + o = msgp.AppendBool(o, z.Scanning) + } + if (zb0001Mask & 0x20) == 0 { // if not omitted + // string "state" + o = append(o, 0xa5, 0x73, 0x74, 0x61, 0x74, 0x65) + o = msgp.AppendString(o, z.State) + } + if (zb0001Mask & 0x40) == 0 { // if not omitted + // string "uuid" + o = append(o, 0xa4, 0x75, 0x75, 0x69, 0x64) + o = msgp.AppendString(o, z.UUID) + } + // string "major" + o = append(o, 0xa5, 0x6d, 0x61, 0x6a, 0x6f, 0x72) + o = msgp.AppendUint32(o, z.Major) + // string "minor" + o = append(o, 0xa5, 0x6d, 0x69, 0x6e, 0x6f, 0x72) + o = msgp.AppendUint32(o, z.Minor) + if (zb0001Mask & 0x200) == 0 { // if not omitted + // string "model" + o = append(o, 0xa5, 0x6d, 0x6f, 0x64, 0x65, 0x6c) + o = msgp.AppendString(o, z.Model) + } + if (zb0001Mask & 0x400) == 0 { // if not omitted + // string "totalspace" + o = append(o, 0xaa, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x70, 0x61, 0x63, 0x65) + o = msgp.AppendUint64(o, z.TotalSpace) + } + if (zb0001Mask & 0x800) == 0 { // if not omitted + // string "usedspace" + o = append(o, 0xa9, 0x75, 0x73, 0x65, 0x64, 0x73, 0x70, 0x61, 0x63, 0x65) + o = msgp.AppendUint64(o, z.UsedSpace) + } + if (zb0001Mask & 0x1000) == 0 { // if not omitted + // string "availspace" + o = append(o, 0xaa, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x73, 0x70, 0x61, 0x63, 0x65) + o = msgp.AppendUint64(o, z.AvailableSpace) + } + if (zb0001Mask & 0x2000) == 0 { // if not omitted + // string "readthroughput" + o = append(o, 0xae, 0x72, 0x65, 0x61, 0x64, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74) + o = msgp.AppendFloat64(o, z.ReadThroughput) + } + if (zb0001Mask & 0x4000) == 0 { // if not omitted + // string "writethroughput" + o = append(o, 0xaf, 0x77, 0x72, 0x69, 0x74, 0x65, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x70, 0x75, 0x74) + o = msgp.AppendFloat64(o, z.WriteThroughPut) + } + if (zb0001Mask & 0x8000) == 0 { // if not omitted + // string "readlatency" + o = append(o, 0xab, 0x72, 0x65, 0x61, 0x64, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79) + o = msgp.AppendFloat64(o, z.ReadLatency) + } + if (zb0001Mask & 0x10000) == 0 { // if not omitted + // string "writelatency" + o = append(o, 0xac, 0x77, 0x72, 0x69, 0x74, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79) + o = msgp.AppendFloat64(o, z.WriteLatency) + } + if (zb0001Mask & 0x20000) == 0 { // if not omitted + // string "utilization" + o = append(o, 0xab, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e) + o = msgp.AppendFloat64(o, z.Utilization) + } + if (zb0001Mask & 0x40000) == 0 { // if not omitted + // string "metrics" + o = append(o, 0xa7, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73) + if z.Metrics == nil { + o = msgp.AppendNil(o) + } else { + o, err = z.Metrics.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "Metrics") + return + } } } - } - if (zb0001Mask & 0x80000) == 0 { // if not omitted - // string "heal_info" - o = append(o, 0xa9, 0x68, 0x65, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f) - if z.HealInfo == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.HealInfo.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "HealInfo") - return + if (zb0001Mask & 0x80000) == 0 { // if not omitted + // string "heal_info" + o = append(o, 0xa9, 0x68, 0x65, 0x61, 0x6c, 0x5f, 0x69, 0x6e, 0x66, 0x6f) + if z.HealInfo == nil { + o = msgp.AppendNil(o) + } else { + o, err = z.HealInfo.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "HealInfo") + return + } } } - } - // string "used_inodes" - o = append(o, 0xab, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73) - o = msgp.AppendUint64(o, z.UsedInodes) - if (zb0001Mask & 0x200000) == 0 { // if not omitted - // string "free_inodes" - o = append(o, 0xab, 0x66, 0x72, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73) - o = msgp.AppendUint64(o, z.FreeInodes) - } - if (zb0001Mask & 0x400000) == 0 { // if not omitted - // string "local" - o = append(o, 0xa5, 0x6c, 0x6f, 0x63, 0x61, 0x6c) - o = msgp.AppendBool(o, z.Local) - } - if (zb0001Mask & 0x800000) == 0 { // if not omitted - // string "cacheStats" - o = append(o, 0xaa, 0x63, 0x61, 0x63, 0x68, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73) - if z.Cache == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.Cache.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "Cache") - return + // string "used_inodes" + o = append(o, 0xab, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73) + o = msgp.AppendUint64(o, z.UsedInodes) + if (zb0001Mask & 0x200000) == 0 { // if not omitted + // string "free_inodes" + o = append(o, 0xab, 0x66, 0x72, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x73) + o = msgp.AppendUint64(o, z.FreeInodes) + } + if (zb0001Mask & 0x400000) == 0 { // if not omitted + // string "local" + o = append(o, 0xa5, 0x6c, 0x6f, 0x63, 0x61, 0x6c) + o = msgp.AppendBool(o, z.Local) + } + if (zb0001Mask & 0x800000) == 0 { // if not omitted + // string "cacheStats" + o = append(o, 0xaa, 0x63, 0x61, 0x63, 0x68, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73) + if z.Cache == nil { + o = msgp.AppendNil(o) + } else { + o, err = z.Cache.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "Cache") + return + } } } + // string "pool_index" + o = append(o, 0xaa, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78) + o = msgp.AppendInt(o, z.PoolIndex) + // string "set_index" + o = append(o, 0xa9, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78) + o = msgp.AppendInt(o, z.SetIndex) + // string "disk_index" + o = append(o, 0xaa, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78) + o = msgp.AppendInt(o, z.DiskIndex) } - // string "pool_index" - o = append(o, 0xaa, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78) - o = msgp.AppendInt(o, z.PoolIndex) - // string "set_index" - o = append(o, 0xa9, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78) - o = msgp.AppendInt(o, z.SetIndex) - // string "disk_index" - o = append(o, 0xaa, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78) - o = msgp.AppendInt(o, z.DiskIndex) return } @@ -4647,151 +4641,152 @@ func (z *DiskMetrics) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - if (zb0001Mask & 0x1) == 0 { // if not omitted - // write "lastMinute" - err = en.Append(0xaa, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x69, 0x6e, 0x75, 0x74, 0x65) - if err != nil { - return - } - err = en.WriteMapHeader(uint32(len(z.LastMinute))) - if err != nil { - err = msgp.WrapError(err, "LastMinute") - return - } - for za0001, za0002 := range z.LastMinute { - err = en.WriteString(za0001) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + if (zb0001Mask & 0x1) == 0 { // if not omitted + // write "lastMinute" + err = en.Append(0xaa, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x69, 0x6e, 0x75, 0x74, 0x65) + if err != nil { + return + } + err = en.WriteMapHeader(uint32(len(z.LastMinute))) if err != nil { err = msgp.WrapError(err, "LastMinute") return } - err = za0002.EncodeMsg(en) + for za0001, za0002 := range z.LastMinute { + err = en.WriteString(za0001) + if err != nil { + err = msgp.WrapError(err, "LastMinute") + return + } + err = za0002.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "LastMinute", za0001) + return + } + } + } + if (zb0001Mask & 0x2) == 0 { // if not omitted + // write "apiCalls" + err = en.Append(0xa8, 0x61, 0x70, 0x69, 0x43, 0x61, 0x6c, 0x6c, 0x73) + if err != nil { + return + } + err = en.WriteMapHeader(uint32(len(z.APICalls))) if err != nil { - err = msgp.WrapError(err, "LastMinute", za0001) + err = msgp.WrapError(err, "APICalls") return } + for za0003, za0004 := range z.APICalls { + err = en.WriteString(za0003) + if err != nil { + err = msgp.WrapError(err, "APICalls") + return + } + err = en.WriteUint64(za0004) + if err != nil { + err = msgp.WrapError(err, "APICalls", za0003) + return + } + } } - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // write "apiCalls" - err = en.Append(0xa8, 0x61, 0x70, 0x69, 0x43, 0x61, 0x6c, 0x6c, 0x73) - if err != nil { - return + if (zb0001Mask & 0x4) == 0 { // if not omitted + // write "totalTokens" + err = en.Append(0xab, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73) + if err != nil { + return + } + err = en.WriteUint32(z.TotalTokens) + if err != nil { + err = msgp.WrapError(err, "TotalTokens") + return + } } - err = en.WriteMapHeader(uint32(len(z.APICalls))) - if err != nil { - err = msgp.WrapError(err, "APICalls") - return + if (zb0001Mask & 0x8) == 0 { // if not omitted + // write "totalWaiting" + err = en.Append(0xac, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x57, 0x61, 0x69, 0x74, 0x69, 0x6e, 0x67) + if err != nil { + return + } + err = en.WriteUint32(z.TotalWaiting) + if err != nil { + err = msgp.WrapError(err, "TotalWaiting") + return + } } - for za0003, za0004 := range z.APICalls { - err = en.WriteString(za0003) + if (zb0001Mask & 0x10) == 0 { // if not omitted + // write "totalErrorsAvailability" + err = en.Append(0xb7, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79) if err != nil { - err = msgp.WrapError(err, "APICalls") return } - err = en.WriteUint64(za0004) + err = en.WriteUint64(z.TotalErrorsAvailability) if err != nil { - err = msgp.WrapError(err, "APICalls", za0003) + err = msgp.WrapError(err, "TotalErrorsAvailability") return } } - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // write "totalTokens" - err = en.Append(0xab, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73) - if err != nil { - return + if (zb0001Mask & 0x20) == 0 { // if not omitted + // write "totalErrorsTimeout" + err = en.Append(0xb2, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74) + if err != nil { + return + } + err = en.WriteUint64(z.TotalErrorsTimeout) + if err != nil { + err = msgp.WrapError(err, "TotalErrorsTimeout") + return + } } - err = en.WriteUint32(z.TotalTokens) - if err != nil { - err = msgp.WrapError(err, "TotalTokens") - return + if (zb0001Mask & 0x40) == 0 { // if not omitted + // write "totalWrites" + err = en.Append(0xab, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x73) + if err != nil { + return + } + err = en.WriteUint64(z.TotalWrites) + if err != nil { + err = msgp.WrapError(err, "TotalWrites") + return + } } - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // write "totalWaiting" - err = en.Append(0xac, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x57, 0x61, 0x69, 0x74, 0x69, 0x6e, 0x67) - if err != nil { - return - } - err = en.WriteUint32(z.TotalWaiting) - if err != nil { - err = msgp.WrapError(err, "TotalWaiting") - return - } - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // write "totalErrorsAvailability" - err = en.Append(0xb7, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79) - if err != nil { - return - } - err = en.WriteUint64(z.TotalErrorsAvailability) - if err != nil { - err = msgp.WrapError(err, "TotalErrorsAvailability") - return - } - } - if (zb0001Mask & 0x20) == 0 { // if not omitted - // write "totalErrorsTimeout" - err = en.Append(0xb2, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74) - if err != nil { - return - } - err = en.WriteUint64(z.TotalErrorsTimeout) - if err != nil { - err = msgp.WrapError(err, "TotalErrorsTimeout") - return - } - } - if (zb0001Mask & 0x40) == 0 { // if not omitted - // write "totalWrites" - err = en.Append(0xab, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x73) - if err != nil { - return - } - err = en.WriteUint64(z.TotalWrites) - if err != nil { - err = msgp.WrapError(err, "TotalWrites") - return - } - } - if (zb0001Mask & 0x80) == 0 { // if not omitted - // write "totalDeletes" - err = en.Append(0xac, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x73) - if err != nil { - return - } - err = en.WriteUint64(z.TotalDeletes) - if err != nil { - err = msgp.WrapError(err, "TotalDeletes") - return - } - } - if (zb0001Mask & 0x100) == 0 { // if not omitted - // write "apiLatencies" - err = en.Append(0xac, 0x61, 0x70, 0x69, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73) - if err != nil { - return - } - err = en.WriteMapHeader(uint32(len(z.APILatencies))) - if err != nil { - err = msgp.WrapError(err, "APILatencies") - return + if (zb0001Mask & 0x80) == 0 { // if not omitted + // write "totalDeletes" + err = en.Append(0xac, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x73) + if err != nil { + return + } + err = en.WriteUint64(z.TotalDeletes) + if err != nil { + err = msgp.WrapError(err, "TotalDeletes") + return + } } - for za0005, za0006 := range z.APILatencies { - err = en.WriteString(za0005) + if (zb0001Mask & 0x100) == 0 { // if not omitted + // write "apiLatencies" + err = en.Append(0xac, 0x61, 0x70, 0x69, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73) if err != nil { - err = msgp.WrapError(err, "APILatencies") return } - err = en.WriteIntf(za0006) + err = en.WriteMapHeader(uint32(len(z.APILatencies))) if err != nil { - err = msgp.WrapError(err, "APILatencies", za0005) + err = msgp.WrapError(err, "APILatencies") return } + for za0005, za0006 := range z.APILatencies { + err = en.WriteString(za0005) + if err != nil { + err = msgp.WrapError(err, "APILatencies") + return + } + err = en.WriteIntf(za0006) + if err != nil { + err = msgp.WrapError(err, "APILatencies", za0005) + return + } + } } } return @@ -4842,71 +4837,72 @@ func (z *DiskMetrics) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } - if (zb0001Mask & 0x1) == 0 { // if not omitted - // string "lastMinute" - o = append(o, 0xaa, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x69, 0x6e, 0x75, 0x74, 0x65) - o = msgp.AppendMapHeader(o, uint32(len(z.LastMinute))) - for za0001, za0002 := range z.LastMinute { - o = msgp.AppendString(o, za0001) - o, err = za0002.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "LastMinute", za0001) - return + + // skip if no fields are to be emitted + if zb0001Len != 0 { + if (zb0001Mask & 0x1) == 0 { // if not omitted + // string "lastMinute" + o = append(o, 0xaa, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x69, 0x6e, 0x75, 0x74, 0x65) + o = msgp.AppendMapHeader(o, uint32(len(z.LastMinute))) + for za0001, za0002 := range z.LastMinute { + o = msgp.AppendString(o, za0001) + o, err = za0002.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "LastMinute", za0001) + return + } } } - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // string "apiCalls" - o = append(o, 0xa8, 0x61, 0x70, 0x69, 0x43, 0x61, 0x6c, 0x6c, 0x73) - o = msgp.AppendMapHeader(o, uint32(len(z.APICalls))) - for za0003, za0004 := range z.APICalls { - o = msgp.AppendString(o, za0003) - o = msgp.AppendUint64(o, za0004) - } - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // string "totalTokens" - o = append(o, 0xab, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73) - o = msgp.AppendUint32(o, z.TotalTokens) - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // string "totalWaiting" - o = append(o, 0xac, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x57, 0x61, 0x69, 0x74, 0x69, 0x6e, 0x67) - o = msgp.AppendUint32(o, z.TotalWaiting) - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // string "totalErrorsAvailability" - o = append(o, 0xb7, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79) - o = msgp.AppendUint64(o, z.TotalErrorsAvailability) - } - if (zb0001Mask & 0x20) == 0 { // if not omitted - // string "totalErrorsTimeout" - o = append(o, 0xb2, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74) - o = msgp.AppendUint64(o, z.TotalErrorsTimeout) - } - if (zb0001Mask & 0x40) == 0 { // if not omitted - // string "totalWrites" - o = append(o, 0xab, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x73) - o = msgp.AppendUint64(o, z.TotalWrites) - } - if (zb0001Mask & 0x80) == 0 { // if not omitted - // string "totalDeletes" - o = append(o, 0xac, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x73) - o = msgp.AppendUint64(o, z.TotalDeletes) - } - if (zb0001Mask & 0x100) == 0 { // if not omitted - // string "apiLatencies" - o = append(o, 0xac, 0x61, 0x70, 0x69, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73) - o = msgp.AppendMapHeader(o, uint32(len(z.APILatencies))) - for za0005, za0006 := range z.APILatencies { - o = msgp.AppendString(o, za0005) - o, err = msgp.AppendIntf(o, za0006) - if err != nil { - err = msgp.WrapError(err, "APILatencies", za0005) - return + if (zb0001Mask & 0x2) == 0 { // if not omitted + // string "apiCalls" + o = append(o, 0xa8, 0x61, 0x70, 0x69, 0x43, 0x61, 0x6c, 0x6c, 0x73) + o = msgp.AppendMapHeader(o, uint32(len(z.APICalls))) + for za0003, za0004 := range z.APICalls { + o = msgp.AppendString(o, za0003) + o = msgp.AppendUint64(o, za0004) + } + } + if (zb0001Mask & 0x4) == 0 { // if not omitted + // string "totalTokens" + o = append(o, 0xab, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73) + o = msgp.AppendUint32(o, z.TotalTokens) + } + if (zb0001Mask & 0x8) == 0 { // if not omitted + // string "totalWaiting" + o = append(o, 0xac, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x57, 0x61, 0x69, 0x74, 0x69, 0x6e, 0x67) + o = msgp.AppendUint32(o, z.TotalWaiting) + } + if (zb0001Mask & 0x10) == 0 { // if not omitted + // string "totalErrorsAvailability" + o = append(o, 0xb7, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79) + o = msgp.AppendUint64(o, z.TotalErrorsAvailability) + } + if (zb0001Mask & 0x20) == 0 { // if not omitted + // string "totalErrorsTimeout" + o = append(o, 0xb2, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74) + o = msgp.AppendUint64(o, z.TotalErrorsTimeout) + } + if (zb0001Mask & 0x40) == 0 { // if not omitted + // string "totalWrites" + o = append(o, 0xab, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x73) + o = msgp.AppendUint64(o, z.TotalWrites) + } + if (zb0001Mask & 0x80) == 0 { // if not omitted + // string "totalDeletes" + o = append(o, 0xac, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x73) + o = msgp.AppendUint64(o, z.TotalDeletes) + } + if (zb0001Mask & 0x100) == 0 { // if not omitted + // string "apiLatencies" + o = append(o, 0xac, 0x61, 0x70, 0x69, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73) + o = msgp.AppendMapHeader(o, uint32(len(z.APILatencies))) + for za0005, za0006 := range z.APILatencies { + o = msgp.AppendString(o, za0005) + o, err = msgp.AppendIntf(o, za0006) + if err != nil { + err = msgp.WrapError(err, "APILatencies", za0005) + return + } } } } @@ -6253,11 +6249,10 @@ func (z *InfoMessage) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0004Mask != 0x1 { - if (zb0004Mask & 0x1) == 0 { - z.Buckets.Error = "" - } + if (zb0004Mask & 0x1) == 0 { + z.Buckets.Error = "" } + zb0001Mask |= 0x20 case "objects": var zb0005 uint32 @@ -6298,11 +6293,10 @@ func (z *InfoMessage) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0005Mask != 0x1 { - if (zb0005Mask & 0x1) == 0 { - z.Objects.Error = "" - } + if (zb0005Mask & 0x1) == 0 { + z.Objects.Error = "" } + zb0001Mask |= 0x40 case "versions": var zb0006 uint32 @@ -6343,11 +6337,10 @@ func (z *InfoMessage) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0006Mask != 0x1 { - if (zb0006Mask & 0x1) == 0 { - z.Versions.Error = "" - } + if (zb0006Mask & 0x1) == 0 { + z.Versions.Error = "" } + zb0001Mask |= 0x80 case "deletemarkers": var zb0007 uint32 @@ -6388,11 +6381,10 @@ func (z *InfoMessage) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0007Mask != 0x1 { - if (zb0007Mask & 0x1) == 0 { - z.DeleteMarkers.Error = "" - } + if (zb0007Mask & 0x1) == 0 { + z.DeleteMarkers.Error = "" } + zb0001Mask |= 0x100 case "usage": var zb0008 uint32 @@ -6433,11 +6425,10 @@ func (z *InfoMessage) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0008Mask != 0x1 { - if (zb0008Mask & 0x1) == 0 { - z.Usage.Error = "" - } + if (zb0008Mask & 0x1) == 0 { + z.Usage.Error = "" } + zb0001Mask |= 0x200 case "services": err = z.Services.DecodeMsg(dc) @@ -6581,329 +6572,350 @@ func (z *InfoMessage) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - if (zb0001Mask & 0x1) == 0 { // if not omitted - // write "mode" - err = en.Append(0xa4, 0x6d, 0x6f, 0x64, 0x65) - if err != nil { - return - } - err = en.WriteString(z.Mode) - if err != nil { - err = msgp.WrapError(err, "Mode") - return - } - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // write "domain" - err = en.Append(0xa6, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.Domain))) - if err != nil { - err = msgp.WrapError(err, "Domain") - return - } - for za0001 := range z.Domain { - err = en.WriteString(z.Domain[za0001]) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + if (zb0001Mask & 0x1) == 0 { // if not omitted + // write "mode" + err = en.Append(0xa4, 0x6d, 0x6f, 0x64, 0x65) if err != nil { - err = msgp.WrapError(err, "Domain", za0001) return } - } - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // write "region" - err = en.Append(0xa6, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e) - if err != nil { - return - } - err = en.WriteString(z.Region) - if err != nil { - err = msgp.WrapError(err, "Region") - return - } - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // write "sqsARN" - err = en.Append(0xa6, 0x73, 0x71, 0x73, 0x41, 0x52, 0x4e) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.SQSARN))) - if err != nil { - err = msgp.WrapError(err, "SQSARN") - return - } - for za0002 := range z.SQSARN { - err = en.WriteString(z.SQSARN[za0002]) + err = en.WriteString(z.Mode) if err != nil { - err = msgp.WrapError(err, "SQSARN", za0002) + err = msgp.WrapError(err, "Mode") return } } - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // write "deploymentID" - err = en.Append(0xac, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44) - if err != nil { - return - } - err = en.WriteString(z.DeploymentID) - if err != nil { - err = msgp.WrapError(err, "DeploymentID") - return - } - } - if (zb0001Mask & 0x20) == 0 { // if not omitted - // write "buckets" - err = en.Append(0xa7, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73) - if err != nil { - return - } - // check for omitted fields - zb0002Len := uint32(2) - var zb0002Mask uint8 /* 2 bits */ - _ = zb0002Mask - if z.Buckets.Error == "" { - zb0002Len-- - zb0002Mask |= 0x2 - } - // variable map header, size zb0002Len - err = en.Append(0x80 | uint8(zb0002Len)) - if err != nil { - return - } - // write "count" - err = en.Append(0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) - if err != nil { - return - } - err = en.WriteUint64(z.Buckets.Count) - if err != nil { - err = msgp.WrapError(err, "Buckets", "Count") - return - } - if (zb0002Mask & 0x2) == 0 { // if not omitted - // write "error" - err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + if (zb0001Mask & 0x2) == 0 { // if not omitted + // write "domain" + err = en.Append(0xa6, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e) if err != nil { return } - err = en.WriteString(z.Buckets.Error) + err = en.WriteArrayHeader(uint32(len(z.Domain))) if err != nil { - err = msgp.WrapError(err, "Buckets", "Error") + err = msgp.WrapError(err, "Domain") return } + for za0001 := range z.Domain { + err = en.WriteString(z.Domain[za0001]) + if err != nil { + err = msgp.WrapError(err, "Domain", za0001) + return + } + } } - } - if (zb0001Mask & 0x40) == 0 { // if not omitted - // write "objects" - err = en.Append(0xa7, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73) - if err != nil { - return - } - // check for omitted fields - zb0003Len := uint32(2) - var zb0003Mask uint8 /* 2 bits */ - _ = zb0003Mask - if z.Objects.Error == "" { - zb0003Len-- - zb0003Mask |= 0x2 - } - // variable map header, size zb0003Len - err = en.Append(0x80 | uint8(zb0003Len)) - if err != nil { - return - } - // write "count" - err = en.Append(0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) - if err != nil { - return - } - err = en.WriteUint64(z.Objects.Count) - if err != nil { - err = msgp.WrapError(err, "Objects", "Count") - return - } - if (zb0003Mask & 0x2) == 0 { // if not omitted - // write "error" - err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + if (zb0001Mask & 0x4) == 0 { // if not omitted + // write "region" + err = en.Append(0xa6, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e) if err != nil { return } - err = en.WriteString(z.Objects.Error) + err = en.WriteString(z.Region) if err != nil { - err = msgp.WrapError(err, "Objects", "Error") + err = msgp.WrapError(err, "Region") return } } - } - if (zb0001Mask & 0x80) == 0 { // if not omitted - // write "versions" - err = en.Append(0xa8, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73) - if err != nil { - return - } - // check for omitted fields - zb0004Len := uint32(2) - var zb0004Mask uint8 /* 2 bits */ - _ = zb0004Mask - if z.Versions.Error == "" { - zb0004Len-- - zb0004Mask |= 0x2 - } - // variable map header, size zb0004Len - err = en.Append(0x80 | uint8(zb0004Len)) - if err != nil { - return - } - // write "count" - err = en.Append(0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) - if err != nil { - return - } - err = en.WriteUint64(z.Versions.Count) - if err != nil { - err = msgp.WrapError(err, "Versions", "Count") - return - } - if (zb0004Mask & 0x2) == 0 { // if not omitted - // write "error" - err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + if (zb0001Mask & 0x8) == 0 { // if not omitted + // write "sqsARN" + err = en.Append(0xa6, 0x73, 0x71, 0x73, 0x41, 0x52, 0x4e) if err != nil { return } - err = en.WriteString(z.Versions.Error) + err = en.WriteArrayHeader(uint32(len(z.SQSARN))) if err != nil { - err = msgp.WrapError(err, "Versions", "Error") + err = msgp.WrapError(err, "SQSARN") return } + for za0002 := range z.SQSARN { + err = en.WriteString(z.SQSARN[za0002]) + if err != nil { + err = msgp.WrapError(err, "SQSARN", za0002) + return + } + } } - } - if (zb0001Mask & 0x100) == 0 { // if not omitted - // write "deletemarkers" - err = en.Append(0xad, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x73) - if err != nil { - return + if (zb0001Mask & 0x10) == 0 { // if not omitted + // write "deploymentID" + err = en.Append(0xac, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44) + if err != nil { + return + } + err = en.WriteString(z.DeploymentID) + if err != nil { + err = msgp.WrapError(err, "DeploymentID") + return + } } - // check for omitted fields - zb0005Len := uint32(2) - var zb0005Mask uint8 /* 2 bits */ - _ = zb0005Mask - if z.DeleteMarkers.Error == "" { - zb0005Len-- - zb0005Mask |= 0x2 + if (zb0001Mask & 0x20) == 0 { // if not omitted + // write "buckets" + err = en.Append(0xa7, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73) + if err != nil { + return + } + // check for omitted fields + zb0002Len := uint32(2) + var zb0002Mask uint8 /* 2 bits */ + _ = zb0002Mask + if z.Buckets.Error == "" { + zb0002Len-- + zb0002Mask |= 0x2 + } + // variable map header, size zb0002Len + err = en.Append(0x80 | uint8(zb0002Len)) + if err != nil { + return + } + + // skip if no fields are to be emitted + if zb0002Len != 0 { + // write "count" + err = en.Append(0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) + if err != nil { + return + } + err = en.WriteUint64(z.Buckets.Count) + if err != nil { + err = msgp.WrapError(err, "Buckets", "Count") + return + } + if (zb0002Mask & 0x2) == 0 { // if not omitted + // write "error" + err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + if err != nil { + return + } + err = en.WriteString(z.Buckets.Error) + if err != nil { + err = msgp.WrapError(err, "Buckets", "Error") + return + } + } + } } - // variable map header, size zb0005Len - err = en.Append(0x80 | uint8(zb0005Len)) - if err != nil { - return + if (zb0001Mask & 0x40) == 0 { // if not omitted + // write "objects" + err = en.Append(0xa7, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73) + if err != nil { + return + } + // check for omitted fields + zb0003Len := uint32(2) + var zb0003Mask uint8 /* 2 bits */ + _ = zb0003Mask + if z.Objects.Error == "" { + zb0003Len-- + zb0003Mask |= 0x2 + } + // variable map header, size zb0003Len + err = en.Append(0x80 | uint8(zb0003Len)) + if err != nil { + return + } + + // skip if no fields are to be emitted + if zb0003Len != 0 { + // write "count" + err = en.Append(0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) + if err != nil { + return + } + err = en.WriteUint64(z.Objects.Count) + if err != nil { + err = msgp.WrapError(err, "Objects", "Count") + return + } + if (zb0003Mask & 0x2) == 0 { // if not omitted + // write "error" + err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + if err != nil { + return + } + err = en.WriteString(z.Objects.Error) + if err != nil { + err = msgp.WrapError(err, "Objects", "Error") + return + } + } + } } - // write "count" - err = en.Append(0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) - if err != nil { - return + if (zb0001Mask & 0x80) == 0 { // if not omitted + // write "versions" + err = en.Append(0xa8, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73) + if err != nil { + return + } + // check for omitted fields + zb0004Len := uint32(2) + var zb0004Mask uint8 /* 2 bits */ + _ = zb0004Mask + if z.Versions.Error == "" { + zb0004Len-- + zb0004Mask |= 0x2 + } + // variable map header, size zb0004Len + err = en.Append(0x80 | uint8(zb0004Len)) + if err != nil { + return + } + + // skip if no fields are to be emitted + if zb0004Len != 0 { + // write "count" + err = en.Append(0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) + if err != nil { + return + } + err = en.WriteUint64(z.Versions.Count) + if err != nil { + err = msgp.WrapError(err, "Versions", "Count") + return + } + if (zb0004Mask & 0x2) == 0 { // if not omitted + // write "error" + err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + if err != nil { + return + } + err = en.WriteString(z.Versions.Error) + if err != nil { + err = msgp.WrapError(err, "Versions", "Error") + return + } + } + } } - err = en.WriteUint64(z.DeleteMarkers.Count) - if err != nil { - err = msgp.WrapError(err, "DeleteMarkers", "Count") - return + if (zb0001Mask & 0x100) == 0 { // if not omitted + // write "deletemarkers" + err = en.Append(0xad, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x73) + if err != nil { + return + } + // check for omitted fields + zb0005Len := uint32(2) + var zb0005Mask uint8 /* 2 bits */ + _ = zb0005Mask + if z.DeleteMarkers.Error == "" { + zb0005Len-- + zb0005Mask |= 0x2 + } + // variable map header, size zb0005Len + err = en.Append(0x80 | uint8(zb0005Len)) + if err != nil { + return + } + + // skip if no fields are to be emitted + if zb0005Len != 0 { + // write "count" + err = en.Append(0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) + if err != nil { + return + } + err = en.WriteUint64(z.DeleteMarkers.Count) + if err != nil { + err = msgp.WrapError(err, "DeleteMarkers", "Count") + return + } + if (zb0005Mask & 0x2) == 0 { // if not omitted + // write "error" + err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + if err != nil { + return + } + err = en.WriteString(z.DeleteMarkers.Error) + if err != nil { + err = msgp.WrapError(err, "DeleteMarkers", "Error") + return + } + } + } } - if (zb0005Mask & 0x2) == 0 { // if not omitted - // write "error" - err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + if (zb0001Mask & 0x200) == 0 { // if not omitted + // write "usage" + err = en.Append(0xa5, 0x75, 0x73, 0x61, 0x67, 0x65) if err != nil { return } - err = en.WriteString(z.DeleteMarkers.Error) + // check for omitted fields + zb0006Len := uint32(2) + var zb0006Mask uint8 /* 2 bits */ + _ = zb0006Mask + if z.Usage.Error == "" { + zb0006Len-- + zb0006Mask |= 0x2 + } + // variable map header, size zb0006Len + err = en.Append(0x80 | uint8(zb0006Len)) if err != nil { - err = msgp.WrapError(err, "DeleteMarkers", "Error") return } + + // skip if no fields are to be emitted + if zb0006Len != 0 { + // write "size" + err = en.Append(0xa4, 0x73, 0x69, 0x7a, 0x65) + if err != nil { + return + } + err = en.WriteUint64(z.Usage.Size) + if err != nil { + err = msgp.WrapError(err, "Usage", "Size") + return + } + if (zb0006Mask & 0x2) == 0 { // if not omitted + // write "error" + err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + if err != nil { + return + } + err = en.WriteString(z.Usage.Error) + if err != nil { + err = msgp.WrapError(err, "Usage", "Error") + return + } + } + } } - } - if (zb0001Mask & 0x200) == 0 { // if not omitted - // write "usage" - err = en.Append(0xa5, 0x75, 0x73, 0x61, 0x67, 0x65) + // write "services" + err = en.Append(0xa8, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73) if err != nil { return } - // check for omitted fields - zb0006Len := uint32(2) - var zb0006Mask uint8 /* 2 bits */ - _ = zb0006Mask - if z.Usage.Error == "" { - zb0006Len-- - zb0006Mask |= 0x2 - } - // variable map header, size zb0006Len - err = en.Append(0x80 | uint8(zb0006Len)) + err = z.Services.EncodeMsg(en) if err != nil { + err = msgp.WrapError(err, "Services") return } - // write "size" - err = en.Append(0xa4, 0x73, 0x69, 0x7a, 0x65) + // write "backend" + err = en.Append(0xa7, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64) if err != nil { return } - err = en.WriteUint64(z.Usage.Size) + err = z.Backend.EncodeMsg(en) if err != nil { - err = msgp.WrapError(err, "Usage", "Size") + err = msgp.WrapError(err, "Backend") return } - if (zb0006Mask & 0x2) == 0 { // if not omitted - // write "error" - err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + if (zb0001Mask & 0x1000) == 0 { // if not omitted + // write "servers" + err = en.Append(0xa7, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73) if err != nil { return } - err = en.WriteString(z.Usage.Error) + err = en.WriteArrayHeader(uint32(len(z.Servers))) if err != nil { - err = msgp.WrapError(err, "Usage", "Error") + err = msgp.WrapError(err, "Servers") return } - } - } - // write "services" - err = en.Append(0xa8, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73) - if err != nil { - return - } - err = z.Services.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "Services") - return - } - // write "backend" - err = en.Append(0xa7, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64) - if err != nil { - return - } - err = z.Backend.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "Backend") - return - } - if (zb0001Mask & 0x1000) == 0 { // if not omitted - // write "servers" - err = en.Append(0xa7, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.Servers))) - if err != nil { - err = msgp.WrapError(err, "Servers") - return - } - for za0003 := range z.Servers { - err = z.Servers[za0003].EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "Servers", za0003) - return + for za0003 := range z.Servers { + err = z.Servers[za0003].EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "Servers", za0003) + return + } } } } @@ -6963,173 +6975,194 @@ func (z *InfoMessage) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } - if (zb0001Mask & 0x1) == 0 { // if not omitted - // string "mode" - o = append(o, 0xa4, 0x6d, 0x6f, 0x64, 0x65) - o = msgp.AppendString(o, z.Mode) - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // string "domain" - o = append(o, 0xa6, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e) - o = msgp.AppendArrayHeader(o, uint32(len(z.Domain))) - for za0001 := range z.Domain { - o = msgp.AppendString(o, z.Domain[za0001]) - } - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // string "region" - o = append(o, 0xa6, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e) - o = msgp.AppendString(o, z.Region) - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // string "sqsARN" - o = append(o, 0xa6, 0x73, 0x71, 0x73, 0x41, 0x52, 0x4e) - o = msgp.AppendArrayHeader(o, uint32(len(z.SQSARN))) - for za0002 := range z.SQSARN { - o = msgp.AppendString(o, z.SQSARN[za0002]) - } - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // string "deploymentID" - o = append(o, 0xac, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44) - o = msgp.AppendString(o, z.DeploymentID) - } - if (zb0001Mask & 0x20) == 0 { // if not omitted - // string "buckets" - o = append(o, 0xa7, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73) - // check for omitted fields - zb0002Len := uint32(2) - var zb0002Mask uint8 /* 2 bits */ - _ = zb0002Mask - if z.Buckets.Error == "" { - zb0002Len-- - zb0002Mask |= 0x2 - } - // variable map header, size zb0002Len - o = append(o, 0x80|uint8(zb0002Len)) - // string "count" - o = append(o, 0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) - o = msgp.AppendUint64(o, z.Buckets.Count) - if (zb0002Mask & 0x2) == 0 { // if not omitted - // string "error" - o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) - o = msgp.AppendString(o, z.Buckets.Error) - } - } - if (zb0001Mask & 0x40) == 0 { // if not omitted - // string "objects" - o = append(o, 0xa7, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73) - // check for omitted fields - zb0003Len := uint32(2) - var zb0003Mask uint8 /* 2 bits */ - _ = zb0003Mask - if z.Objects.Error == "" { - zb0003Len-- - zb0003Mask |= 0x2 - } - // variable map header, size zb0003Len - o = append(o, 0x80|uint8(zb0003Len)) - // string "count" - o = append(o, 0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) - o = msgp.AppendUint64(o, z.Objects.Count) - if (zb0003Mask & 0x2) == 0 { // if not omitted - // string "error" - o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) - o = msgp.AppendString(o, z.Objects.Error) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + if (zb0001Mask & 0x1) == 0 { // if not omitted + // string "mode" + o = append(o, 0xa4, 0x6d, 0x6f, 0x64, 0x65) + o = msgp.AppendString(o, z.Mode) + } + if (zb0001Mask & 0x2) == 0 { // if not omitted + // string "domain" + o = append(o, 0xa6, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e) + o = msgp.AppendArrayHeader(o, uint32(len(z.Domain))) + for za0001 := range z.Domain { + o = msgp.AppendString(o, z.Domain[za0001]) + } } - } - if (zb0001Mask & 0x80) == 0 { // if not omitted - // string "versions" - o = append(o, 0xa8, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73) - // check for omitted fields - zb0004Len := uint32(2) - var zb0004Mask uint8 /* 2 bits */ - _ = zb0004Mask - if z.Versions.Error == "" { - zb0004Len-- - zb0004Mask |= 0x2 + if (zb0001Mask & 0x4) == 0 { // if not omitted + // string "region" + o = append(o, 0xa6, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e) + o = msgp.AppendString(o, z.Region) } - // variable map header, size zb0004Len - o = append(o, 0x80|uint8(zb0004Len)) - // string "count" - o = append(o, 0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) - o = msgp.AppendUint64(o, z.Versions.Count) - if (zb0004Mask & 0x2) == 0 { // if not omitted - // string "error" - o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) - o = msgp.AppendString(o, z.Versions.Error) + if (zb0001Mask & 0x8) == 0 { // if not omitted + // string "sqsARN" + o = append(o, 0xa6, 0x73, 0x71, 0x73, 0x41, 0x52, 0x4e) + o = msgp.AppendArrayHeader(o, uint32(len(z.SQSARN))) + for za0002 := range z.SQSARN { + o = msgp.AppendString(o, z.SQSARN[za0002]) + } + } + if (zb0001Mask & 0x10) == 0 { // if not omitted + // string "deploymentID" + o = append(o, 0xac, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x44) + o = msgp.AppendString(o, z.DeploymentID) + } + if (zb0001Mask & 0x20) == 0 { // if not omitted + // string "buckets" + o = append(o, 0xa7, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73) + // check for omitted fields + zb0002Len := uint32(2) + var zb0002Mask uint8 /* 2 bits */ + _ = zb0002Mask + if z.Buckets.Error == "" { + zb0002Len-- + zb0002Mask |= 0x2 + } + // variable map header, size zb0002Len + o = append(o, 0x80|uint8(zb0002Len)) + + // skip if no fields are to be emitted + if zb0002Len != 0 { + // string "count" + o = append(o, 0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) + o = msgp.AppendUint64(o, z.Buckets.Count) + if (zb0002Mask & 0x2) == 0 { // if not omitted + // string "error" + o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + o = msgp.AppendString(o, z.Buckets.Error) + } + } + } + if (zb0001Mask & 0x40) == 0 { // if not omitted + // string "objects" + o = append(o, 0xa7, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73) + // check for omitted fields + zb0003Len := uint32(2) + var zb0003Mask uint8 /* 2 bits */ + _ = zb0003Mask + if z.Objects.Error == "" { + zb0003Len-- + zb0003Mask |= 0x2 + } + // variable map header, size zb0003Len + o = append(o, 0x80|uint8(zb0003Len)) + + // skip if no fields are to be emitted + if zb0003Len != 0 { + // string "count" + o = append(o, 0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) + o = msgp.AppendUint64(o, z.Objects.Count) + if (zb0003Mask & 0x2) == 0 { // if not omitted + // string "error" + o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + o = msgp.AppendString(o, z.Objects.Error) + } + } + } + if (zb0001Mask & 0x80) == 0 { // if not omitted + // string "versions" + o = append(o, 0xa8, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73) + // check for omitted fields + zb0004Len := uint32(2) + var zb0004Mask uint8 /* 2 bits */ + _ = zb0004Mask + if z.Versions.Error == "" { + zb0004Len-- + zb0004Mask |= 0x2 + } + // variable map header, size zb0004Len + o = append(o, 0x80|uint8(zb0004Len)) + + // skip if no fields are to be emitted + if zb0004Len != 0 { + // string "count" + o = append(o, 0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) + o = msgp.AppendUint64(o, z.Versions.Count) + if (zb0004Mask & 0x2) == 0 { // if not omitted + // string "error" + o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + o = msgp.AppendString(o, z.Versions.Error) + } + } + } + if (zb0001Mask & 0x100) == 0 { // if not omitted + // string "deletemarkers" + o = append(o, 0xad, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x73) + // check for omitted fields + zb0005Len := uint32(2) + var zb0005Mask uint8 /* 2 bits */ + _ = zb0005Mask + if z.DeleteMarkers.Error == "" { + zb0005Len-- + zb0005Mask |= 0x2 + } + // variable map header, size zb0005Len + o = append(o, 0x80|uint8(zb0005Len)) + + // skip if no fields are to be emitted + if zb0005Len != 0 { + // string "count" + o = append(o, 0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) + o = msgp.AppendUint64(o, z.DeleteMarkers.Count) + if (zb0005Mask & 0x2) == 0 { // if not omitted + // string "error" + o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + o = msgp.AppendString(o, z.DeleteMarkers.Error) + } + } + } + if (zb0001Mask & 0x200) == 0 { // if not omitted + // string "usage" + o = append(o, 0xa5, 0x75, 0x73, 0x61, 0x67, 0x65) + // check for omitted fields + zb0006Len := uint32(2) + var zb0006Mask uint8 /* 2 bits */ + _ = zb0006Mask + if z.Usage.Error == "" { + zb0006Len-- + zb0006Mask |= 0x2 + } + // variable map header, size zb0006Len + o = append(o, 0x80|uint8(zb0006Len)) + + // skip if no fields are to be emitted + if zb0006Len != 0 { + // string "size" + o = append(o, 0xa4, 0x73, 0x69, 0x7a, 0x65) + o = msgp.AppendUint64(o, z.Usage.Size) + if (zb0006Mask & 0x2) == 0 { // if not omitted + // string "error" + o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + o = msgp.AppendString(o, z.Usage.Error) + } + } } - } - if (zb0001Mask & 0x100) == 0 { // if not omitted - // string "deletemarkers" - o = append(o, 0xad, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x73) - // check for omitted fields - zb0005Len := uint32(2) - var zb0005Mask uint8 /* 2 bits */ - _ = zb0005Mask - if z.DeleteMarkers.Error == "" { - zb0005Len-- - zb0005Mask |= 0x2 - } - // variable map header, size zb0005Len - o = append(o, 0x80|uint8(zb0005Len)) - // string "count" - o = append(o, 0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) - o = msgp.AppendUint64(o, z.DeleteMarkers.Count) - if (zb0005Mask & 0x2) == 0 { // if not omitted - // string "error" - o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) - o = msgp.AppendString(o, z.DeleteMarkers.Error) + // string "services" + o = append(o, 0xa8, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73) + o, err = z.Services.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "Services") + return } - } - if (zb0001Mask & 0x200) == 0 { // if not omitted - // string "usage" - o = append(o, 0xa5, 0x75, 0x73, 0x61, 0x67, 0x65) - // check for omitted fields - zb0006Len := uint32(2) - var zb0006Mask uint8 /* 2 bits */ - _ = zb0006Mask - if z.Usage.Error == "" { - zb0006Len-- - zb0006Mask |= 0x2 - } - // variable map header, size zb0006Len - o = append(o, 0x80|uint8(zb0006Len)) - // string "size" - o = append(o, 0xa4, 0x73, 0x69, 0x7a, 0x65) - o = msgp.AppendUint64(o, z.Usage.Size) - if (zb0006Mask & 0x2) == 0 { // if not omitted - // string "error" - o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) - o = msgp.AppendString(o, z.Usage.Error) + // string "backend" + o = append(o, 0xa7, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64) + o, err = z.Backend.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "Backend") + return } - } - // string "services" - o = append(o, 0xa8, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73) - o, err = z.Services.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "Services") - return - } - // string "backend" - o = append(o, 0xa7, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64) - o, err = z.Backend.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "Backend") - return - } - if (zb0001Mask & 0x1000) == 0 { // if not omitted - // string "servers" - o = append(o, 0xa7, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.Servers))) - for za0003 := range z.Servers { - o, err = z.Servers[za0003].MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "Servers", za0003) - return + if (zb0001Mask & 0x1000) == 0 { // if not omitted + // string "servers" + o = append(o, 0xa7, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73) + o = msgp.AppendArrayHeader(o, uint32(len(z.Servers))) + for za0003 := range z.Servers { + o, err = z.Servers[za0003].MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "Servers", za0003) + return + } } } } @@ -7256,11 +7289,10 @@ func (z *InfoMessage) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0004Mask != 0x1 { - if (zb0004Mask & 0x1) == 0 { - z.Buckets.Error = "" - } + if (zb0004Mask & 0x1) == 0 { + z.Buckets.Error = "" } + zb0001Mask |= 0x20 case "objects": var zb0005 uint32 @@ -7301,11 +7333,10 @@ func (z *InfoMessage) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0005Mask != 0x1 { - if (zb0005Mask & 0x1) == 0 { - z.Objects.Error = "" - } + if (zb0005Mask & 0x1) == 0 { + z.Objects.Error = "" } + zb0001Mask |= 0x40 case "versions": var zb0006 uint32 @@ -7346,11 +7377,10 @@ func (z *InfoMessage) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0006Mask != 0x1 { - if (zb0006Mask & 0x1) == 0 { - z.Versions.Error = "" - } + if (zb0006Mask & 0x1) == 0 { + z.Versions.Error = "" } + zb0001Mask |= 0x80 case "deletemarkers": var zb0007 uint32 @@ -7391,11 +7421,10 @@ func (z *InfoMessage) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0007Mask != 0x1 { - if (zb0007Mask & 0x1) == 0 { - z.DeleteMarkers.Error = "" - } + if (zb0007Mask & 0x1) == 0 { + z.DeleteMarkers.Error = "" } + zb0001Mask |= 0x100 case "usage": var zb0008 uint32 @@ -7436,11 +7465,10 @@ func (z *InfoMessage) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0008Mask != 0x1 { - if (zb0008Mask & 0x1) == 0 { - z.Usage.Error = "" - } + if (zb0008Mask & 0x1) == 0 { + z.Usage.Error = "" } + zb0001Mask |= 0x200 case "services": bts, err = z.Services.UnmarshalMsg(bts) @@ -7714,67 +7742,68 @@ func (z *KMS) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - if (zb0001Mask & 0x1) == 0 { // if not omitted - // write "status" - err = en.Append(0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) - if err != nil { - return - } - err = en.WriteString(z.Status) - if err != nil { - err = msgp.WrapError(err, "Status") - return - } - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // write "encrypt" - err = en.Append(0xa7, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74) - if err != nil { - return - } - err = en.WriteString(z.Encrypt) - if err != nil { - err = msgp.WrapError(err, "Encrypt") - return - } - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // write "decrypt" - err = en.Append(0xa7, 0x64, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74) - if err != nil { - return - } - err = en.WriteString(z.Decrypt) - if err != nil { - err = msgp.WrapError(err, "Decrypt") - return + + // skip if no fields are to be emitted + if zb0001Len != 0 { + if (zb0001Mask & 0x1) == 0 { // if not omitted + // write "status" + err = en.Append(0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) + if err != nil { + return + } + err = en.WriteString(z.Status) + if err != nil { + err = msgp.WrapError(err, "Status") + return + } } - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // write "endpoint" - err = en.Append(0xa8, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) - if err != nil { - return + if (zb0001Mask & 0x2) == 0 { // if not omitted + // write "encrypt" + err = en.Append(0xa7, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74) + if err != nil { + return + } + err = en.WriteString(z.Encrypt) + if err != nil { + err = msgp.WrapError(err, "Encrypt") + return + } } - err = en.WriteString(z.Endpoint) - if err != nil { - err = msgp.WrapError(err, "Endpoint") - return + if (zb0001Mask & 0x4) == 0 { // if not omitted + // write "decrypt" + err = en.Append(0xa7, 0x64, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74) + if err != nil { + return + } + err = en.WriteString(z.Decrypt) + if err != nil { + err = msgp.WrapError(err, "Decrypt") + return + } } - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // write "version" - err = en.Append(0xa7, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - if err != nil { - return + if (zb0001Mask & 0x8) == 0 { // if not omitted + // write "endpoint" + err = en.Append(0xa8, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) + if err != nil { + return + } + err = en.WriteString(z.Endpoint) + if err != nil { + err = msgp.WrapError(err, "Endpoint") + return + } } - err = en.WriteString(z.Version) - if err != nil { - err = msgp.WrapError(err, "Version") - return + if (zb0001Mask & 0x10) == 0 { // if not omitted + // write "version" + err = en.Append(0xa7, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) + if err != nil { + return + } + err = en.WriteString(z.Version) + if err != nil { + err = msgp.WrapError(err, "Version") + return + } } } return @@ -7809,33 +7838,34 @@ func (z *KMS) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } - if (zb0001Mask & 0x1) == 0 { // if not omitted - // string "status" - o = append(o, 0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) - o = msgp.AppendString(o, z.Status) - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // string "encrypt" - o = append(o, 0xa7, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74) - o = msgp.AppendString(o, z.Encrypt) - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // string "decrypt" - o = append(o, 0xa7, 0x64, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74) - o = msgp.AppendString(o, z.Decrypt) - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // string "endpoint" - o = append(o, 0xa8, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) - o = msgp.AppendString(o, z.Endpoint) - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // string "version" - o = append(o, 0xa7, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - o = msgp.AppendString(o, z.Version) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + if (zb0001Mask & 0x1) == 0 { // if not omitted + // string "status" + o = append(o, 0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) + o = msgp.AppendString(o, z.Status) + } + if (zb0001Mask & 0x2) == 0 { // if not omitted + // string "encrypt" + o = append(o, 0xa7, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74) + o = msgp.AppendString(o, z.Encrypt) + } + if (zb0001Mask & 0x4) == 0 { // if not omitted + // string "decrypt" + o = append(o, 0xa7, 0x64, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74) + o = msgp.AppendString(o, z.Decrypt) + } + if (zb0001Mask & 0x8) == 0 { // if not omitted + // string "endpoint" + o = append(o, 0xa8, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) + o = msgp.AppendString(o, z.Endpoint) + } + if (zb0001Mask & 0x10) == 0 { // if not omitted + // string "version" + o = append(o, 0xa7, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) + o = msgp.AppendString(o, z.Version) + } } return } @@ -7967,11 +7997,10 @@ func (z *LDAP) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { - if (zb0001Mask & 0x1) == 0 { - z.Status = "" - } + if (zb0001Mask & 0x1) == 0 { + z.Status = "" } + return } @@ -7990,9 +8019,6 @@ func (z LDAP) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } if (zb0001Mask & 0x1) == 0 { // if not omitted // write "status" err = en.Append(0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) @@ -8021,9 +8047,6 @@ func (z LDAP) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } if (zb0001Mask & 0x1) == 0 { // if not omitted // string "status" o = append(o, 0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) @@ -8068,11 +8091,10 @@ func (z *LDAP) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { - if (zb0001Mask & 0x1) == 0 { - z.Status = "" - } + if (zb0001Mask & 0x1) == 0 { + z.Status = "" } + o = bts return } @@ -8141,11 +8163,10 @@ func (z *Logger) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0004Mask != 0x1 { - if (zb0004Mask & 0x1) == 0 { - zb0002.Status = "" - } + if (zb0004Mask & 0x1) == 0 { + zb0002.Status = "" } + (*z)[zb0001] = zb0002 } return @@ -8177,9 +8198,6 @@ func (z Logger) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } if (zb0001Mask & 0x1) == 0 { // if not omitted // write "status" err = en.Append(0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) @@ -8212,9 +8230,6 @@ func (z Logger) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } if (zb0001Mask & 0x1) == 0 { // if not omitted // string "status" o = append(o, 0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) @@ -8282,11 +8297,10 @@ func (z *Logger) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0004Mask != 0x1 { - if (zb0004Mask & 0x1) == 0 { - zb0002.Status = "" - } + if (zb0004Mask & 0x1) == 0 { + zb0002.Status = "" } + (*z)[zb0001] = zb0002 } o = bts @@ -8550,11 +8564,10 @@ func (z *Objects) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { - if (zb0001Mask & 0x1) == 0 { - z.Error = "" - } + if (zb0001Mask & 0x1) == 0 { + z.Error = "" } + return } @@ -8573,30 +8586,31 @@ func (z Objects) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - // write "count" - err = en.Append(0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) - if err != nil { - return - } - err = en.WriteUint64(z.Count) - if err != nil { - err = msgp.WrapError(err, "Count") - return - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // write "error" - err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // write "count" + err = en.Append(0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) if err != nil { return } - err = en.WriteString(z.Error) + err = en.WriteUint64(z.Count) if err != nil { - err = msgp.WrapError(err, "Error") + err = msgp.WrapError(err, "Count") return } + if (zb0001Mask & 0x2) == 0 { // if not omitted + // write "error" + err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + if err != nil { + return + } + err = en.WriteString(z.Error) + if err != nil { + err = msgp.WrapError(err, "Error") + return + } + } } return } @@ -8614,16 +8628,17 @@ func (z Objects) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } - // string "count" - o = append(o, 0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) - o = msgp.AppendUint64(o, z.Count) - if (zb0001Mask & 0x2) == 0 { // if not omitted - // string "error" - o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) - o = msgp.AppendString(o, z.Error) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // string "count" + o = append(o, 0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) + o = msgp.AppendUint64(o, z.Count) + if (zb0001Mask & 0x2) == 0 { // if not omitted + // string "error" + o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + o = msgp.AppendString(o, z.Error) + } } return } @@ -8670,11 +8685,10 @@ func (z *Objects) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { - if (zb0001Mask & 0x1) == 0 { - z.Error = "" - } + if (zb0001Mask & 0x1) == 0 { + z.Error = "" } + o = bts return } @@ -9131,246 +9145,247 @@ func (z *ServerProperties) EncodeMsg(en *msgp.Writer) (err error) { zb0001Mask |= 0x8000 } // variable map header, size zb0001Len - err = en.WriteMapHeader(zb0001Len) - if err != nil { - return - } - if zb0001Len == 0 { - return - } - if (zb0001Mask & 0x1) == 0 { // if not omitted - // write "state" - err = en.Append(0xa5, 0x73, 0x74, 0x61, 0x74, 0x65) - if err != nil { - return - } - err = en.WriteString(z.State) - if err != nil { - err = msgp.WrapError(err, "State") - return - } - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // write "endpoint" - err = en.Append(0xa8, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) - if err != nil { - return - } - err = en.WriteString(z.Endpoint) - if err != nil { - err = msgp.WrapError(err, "Endpoint") - return - } - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // write "scheme" - err = en.Append(0xa6, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65) - if err != nil { - return - } - err = en.WriteString(z.Scheme) - if err != nil { - err = msgp.WrapError(err, "Scheme") - return - } - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // write "uptime" - err = en.Append(0xa6, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65) - if err != nil { - return - } - err = en.WriteInt64(z.Uptime) - if err != nil { - err = msgp.WrapError(err, "Uptime") - return - } - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // write "version" - err = en.Append(0xa7, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - if err != nil { - return - } - err = en.WriteString(z.Version) - if err != nil { - err = msgp.WrapError(err, "Version") - return - } - } - if (zb0001Mask & 0x20) == 0 { // if not omitted - // write "commitID" - err = en.Append(0xa8, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x44) - if err != nil { - return - } - err = en.WriteString(z.CommitID) - if err != nil { - err = msgp.WrapError(err, "CommitID") - return - } - } - if (zb0001Mask & 0x40) == 0 { // if not omitted - // write "network" - err = en.Append(0xa7, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b) - if err != nil { - return - } - err = en.WriteMapHeader(uint32(len(z.Network))) - if err != nil { - err = msgp.WrapError(err, "Network") - return - } - for za0001, za0002 := range z.Network { - err = en.WriteString(za0001) + err = en.WriteMapHeader(zb0001Len) + if err != nil { + return + } + + // skip if no fields are to be emitted + if zb0001Len != 0 { + if (zb0001Mask & 0x1) == 0 { // if not omitted + // write "state" + err = en.Append(0xa5, 0x73, 0x74, 0x61, 0x74, 0x65) if err != nil { - err = msgp.WrapError(err, "Network") return } - err = en.WriteString(za0002) + err = en.WriteString(z.State) if err != nil { - err = msgp.WrapError(err, "Network", za0001) + err = msgp.WrapError(err, "State") return } } - } - if (zb0001Mask & 0x80) == 0 { // if not omitted - // write "drives" - err = en.Append(0xa6, 0x64, 0x72, 0x69, 0x76, 0x65, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.Disks))) - if err != nil { - err = msgp.WrapError(err, "Disks") - return - } - for za0003 := range z.Disks { - err = z.Disks[za0003].EncodeMsg(en) + if (zb0001Mask & 0x2) == 0 { // if not omitted + // write "endpoint" + err = en.Append(0xa8, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) if err != nil { - err = msgp.WrapError(err, "Disks", za0003) + return + } + err = en.WriteString(z.Endpoint) + if err != nil { + err = msgp.WrapError(err, "Endpoint") return } } - } - if (zb0001Mask & 0x100) == 0 { // if not omitted - // write "poolNumber" - err = en.Append(0xaa, 0x70, 0x6f, 0x6f, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72) - if err != nil { - return - } - err = en.WriteInt(z.PoolNumber) - if err != nil { - err = msgp.WrapError(err, "PoolNumber") - return + if (zb0001Mask & 0x4) == 0 { // if not omitted + // write "scheme" + err = en.Append(0xa6, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65) + if err != nil { + return + } + err = en.WriteString(z.Scheme) + if err != nil { + err = msgp.WrapError(err, "Scheme") + return + } } - } - if (zb0001Mask & 0x200) == 0 { // if not omitted - // write "poolNumbers" - err = en.Append(0xab, 0x70, 0x6f, 0x6f, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73) - if err != nil { - return + if (zb0001Mask & 0x8) == 0 { // if not omitted + // write "uptime" + err = en.Append(0xa6, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65) + if err != nil { + return + } + err = en.WriteInt64(z.Uptime) + if err != nil { + err = msgp.WrapError(err, "Uptime") + return + } } - err = en.WriteArrayHeader(uint32(len(z.PoolNumbers))) - if err != nil { - err = msgp.WrapError(err, "PoolNumbers") - return + if (zb0001Mask & 0x10) == 0 { // if not omitted + // write "version" + err = en.Append(0xa7, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) + if err != nil { + return + } + err = en.WriteString(z.Version) + if err != nil { + err = msgp.WrapError(err, "Version") + return + } } - for za0004 := range z.PoolNumbers { - err = en.WriteInt(z.PoolNumbers[za0004]) + if (zb0001Mask & 0x20) == 0 { // if not omitted + // write "commitID" + err = en.Append(0xa8, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x44) + if err != nil { + return + } + err = en.WriteString(z.CommitID) if err != nil { - err = msgp.WrapError(err, "PoolNumbers", za0004) + err = msgp.WrapError(err, "CommitID") return } } - } - // write "mem_stats" - err = en.Append(0xa9, 0x6d, 0x65, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73) - if err != nil { - return - } - err = z.MemStats.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "MemStats") - return - } - if (zb0001Mask & 0x800) == 0 { // if not omitted - // write "go_max_procs" - err = en.Append(0xac, 0x67, 0x6f, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x73) - if err != nil { - return + if (zb0001Mask & 0x40) == 0 { // if not omitted + // write "network" + err = en.Append(0xa7, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b) + if err != nil { + return + } + err = en.WriteMapHeader(uint32(len(z.Network))) + if err != nil { + err = msgp.WrapError(err, "Network") + return + } + for za0001, za0002 := range z.Network { + err = en.WriteString(za0001) + if err != nil { + err = msgp.WrapError(err, "Network") + return + } + err = en.WriteString(za0002) + if err != nil { + err = msgp.WrapError(err, "Network", za0001) + return + } + } } - err = en.WriteInt(z.GoMaxProcs) - if err != nil { - err = msgp.WrapError(err, "GoMaxProcs") - return + if (zb0001Mask & 0x80) == 0 { // if not omitted + // write "drives" + err = en.Append(0xa6, 0x64, 0x72, 0x69, 0x76, 0x65, 0x73) + if err != nil { + return + } + err = en.WriteArrayHeader(uint32(len(z.Disks))) + if err != nil { + err = msgp.WrapError(err, "Disks") + return + } + for za0003 := range z.Disks { + err = z.Disks[za0003].EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "Disks", za0003) + return + } + } } - } - if (zb0001Mask & 0x1000) == 0 { // if not omitted - // write "num_cpu" - err = en.Append(0xa7, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x70, 0x75) - if err != nil { - return + if (zb0001Mask & 0x100) == 0 { // if not omitted + // write "poolNumber" + err = en.Append(0xaa, 0x70, 0x6f, 0x6f, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72) + if err != nil { + return + } + err = en.WriteInt(z.PoolNumber) + if err != nil { + err = msgp.WrapError(err, "PoolNumber") + return + } } - err = en.WriteInt(z.NumCPU) - if err != nil { - err = msgp.WrapError(err, "NumCPU") - return + if (zb0001Mask & 0x200) == 0 { // if not omitted + // write "poolNumbers" + err = en.Append(0xab, 0x70, 0x6f, 0x6f, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73) + if err != nil { + return + } + err = en.WriteArrayHeader(uint32(len(z.PoolNumbers))) + if err != nil { + err = msgp.WrapError(err, "PoolNumbers") + return + } + for za0004 := range z.PoolNumbers { + err = en.WriteInt(z.PoolNumbers[za0004]) + if err != nil { + err = msgp.WrapError(err, "PoolNumbers", za0004) + return + } + } } - } - if (zb0001Mask & 0x2000) == 0 { // if not omitted - // write "runtime_version" - err = en.Append(0xaf, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) + // write "mem_stats" + err = en.Append(0xa9, 0x6d, 0x65, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73) if err != nil { return } - err = en.WriteString(z.RuntimeVersion) + err = z.MemStats.EncodeMsg(en) if err != nil { - err = msgp.WrapError(err, "RuntimeVersion") + err = msgp.WrapError(err, "MemStats") return } - } - if (zb0001Mask & 0x4000) == 0 { // if not omitted - // write "gc_stats" - err = en.Append(0xa8, 0x67, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73) - if err != nil { - return + if (zb0001Mask & 0x800) == 0 { // if not omitted + // write "go_max_procs" + err = en.Append(0xac, 0x67, 0x6f, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x73) + if err != nil { + return + } + err = en.WriteInt(z.GoMaxProcs) + if err != nil { + err = msgp.WrapError(err, "GoMaxProcs") + return + } } - if z.GCStats == nil { - err = en.WriteNil() + if (zb0001Mask & 0x1000) == 0 { // if not omitted + // write "num_cpu" + err = en.Append(0xa7, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x70, 0x75) if err != nil { return } - } else { - err = z.GCStats.EncodeMsg(en) + err = en.WriteInt(z.NumCPU) if err != nil { - err = msgp.WrapError(err, "GCStats") + err = msgp.WrapError(err, "NumCPU") return } } - } - if (zb0001Mask & 0x8000) == 0 { // if not omitted - // write "minio_env_vars" - err = en.Append(0xae, 0x6d, 0x69, 0x6e, 0x69, 0x6f, 0x5f, 0x65, 0x6e, 0x76, 0x5f, 0x76, 0x61, 0x72, 0x73) - if err != nil { - return + if (zb0001Mask & 0x2000) == 0 { // if not omitted + // write "runtime_version" + err = en.Append(0xaf, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) + if err != nil { + return + } + err = en.WriteString(z.RuntimeVersion) + if err != nil { + err = msgp.WrapError(err, "RuntimeVersion") + return + } } - err = en.WriteMapHeader(uint32(len(z.MinioEnvVars))) - if err != nil { - err = msgp.WrapError(err, "MinioEnvVars") - return + if (zb0001Mask & 0x4000) == 0 { // if not omitted + // write "gc_stats" + err = en.Append(0xa8, 0x67, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73) + if err != nil { + return + } + if z.GCStats == nil { + err = en.WriteNil() + if err != nil { + return + } + } else { + err = z.GCStats.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "GCStats") + return + } + } } - for za0005, za0006 := range z.MinioEnvVars { - err = en.WriteString(za0005) + if (zb0001Mask & 0x8000) == 0 { // if not omitted + // write "minio_env_vars" + err = en.Append(0xae, 0x6d, 0x69, 0x6e, 0x69, 0x6f, 0x5f, 0x65, 0x6e, 0x76, 0x5f, 0x76, 0x61, 0x72, 0x73) if err != nil { - err = msgp.WrapError(err, "MinioEnvVars") return } - err = en.WriteString(za0006) + err = en.WriteMapHeader(uint32(len(z.MinioEnvVars))) if err != nil { - err = msgp.WrapError(err, "MinioEnvVars", za0005) + err = msgp.WrapError(err, "MinioEnvVars") return } + for za0005, za0006 := range z.MinioEnvVars { + err = en.WriteString(za0005) + if err != nil { + err = msgp.WrapError(err, "MinioEnvVars") + return + } + err = en.WriteString(za0006) + if err != nil { + err = msgp.WrapError(err, "MinioEnvVars", za0005) + return + } + } } } return @@ -9445,115 +9460,116 @@ func (z *ServerProperties) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = msgp.AppendMapHeader(o, zb0001Len) - if zb0001Len == 0 { - return - } - if (zb0001Mask & 0x1) == 0 { // if not omitted - // string "state" - o = append(o, 0xa5, 0x73, 0x74, 0x61, 0x74, 0x65) - o = msgp.AppendString(o, z.State) - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // string "endpoint" - o = append(o, 0xa8, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) - o = msgp.AppendString(o, z.Endpoint) - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // string "scheme" - o = append(o, 0xa6, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65) - o = msgp.AppendString(o, z.Scheme) - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // string "uptime" - o = append(o, 0xa6, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65) - o = msgp.AppendInt64(o, z.Uptime) - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // string "version" - o = append(o, 0xa7, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - o = msgp.AppendString(o, z.Version) - } - if (zb0001Mask & 0x20) == 0 { // if not omitted - // string "commitID" - o = append(o, 0xa8, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x44) - o = msgp.AppendString(o, z.CommitID) - } - if (zb0001Mask & 0x40) == 0 { // if not omitted - // string "network" - o = append(o, 0xa7, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b) - o = msgp.AppendMapHeader(o, uint32(len(z.Network))) - for za0001, za0002 := range z.Network { - o = msgp.AppendString(o, za0001) - o = msgp.AppendString(o, za0002) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + if (zb0001Mask & 0x1) == 0 { // if not omitted + // string "state" + o = append(o, 0xa5, 0x73, 0x74, 0x61, 0x74, 0x65) + o = msgp.AppendString(o, z.State) + } + if (zb0001Mask & 0x2) == 0 { // if not omitted + // string "endpoint" + o = append(o, 0xa8, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) + o = msgp.AppendString(o, z.Endpoint) + } + if (zb0001Mask & 0x4) == 0 { // if not omitted + // string "scheme" + o = append(o, 0xa6, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65) + o = msgp.AppendString(o, z.Scheme) + } + if (zb0001Mask & 0x8) == 0 { // if not omitted + // string "uptime" + o = append(o, 0xa6, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65) + o = msgp.AppendInt64(o, z.Uptime) + } + if (zb0001Mask & 0x10) == 0 { // if not omitted + // string "version" + o = append(o, 0xa7, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) + o = msgp.AppendString(o, z.Version) + } + if (zb0001Mask & 0x20) == 0 { // if not omitted + // string "commitID" + o = append(o, 0xa8, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x44) + o = msgp.AppendString(o, z.CommitID) + } + if (zb0001Mask & 0x40) == 0 { // if not omitted + // string "network" + o = append(o, 0xa7, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b) + o = msgp.AppendMapHeader(o, uint32(len(z.Network))) + for za0001, za0002 := range z.Network { + o = msgp.AppendString(o, za0001) + o = msgp.AppendString(o, za0002) + } + } + if (zb0001Mask & 0x80) == 0 { // if not omitted + // string "drives" + o = append(o, 0xa6, 0x64, 0x72, 0x69, 0x76, 0x65, 0x73) + o = msgp.AppendArrayHeader(o, uint32(len(z.Disks))) + for za0003 := range z.Disks { + o, err = z.Disks[za0003].MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "Disks", za0003) + return + } + } } - } - if (zb0001Mask & 0x80) == 0 { // if not omitted - // string "drives" - o = append(o, 0xa6, 0x64, 0x72, 0x69, 0x76, 0x65, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.Disks))) - for za0003 := range z.Disks { - o, err = z.Disks[za0003].MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "Disks", za0003) - return + if (zb0001Mask & 0x100) == 0 { // if not omitted + // string "poolNumber" + o = append(o, 0xaa, 0x70, 0x6f, 0x6f, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72) + o = msgp.AppendInt(o, z.PoolNumber) + } + if (zb0001Mask & 0x200) == 0 { // if not omitted + // string "poolNumbers" + o = append(o, 0xab, 0x70, 0x6f, 0x6f, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73) + o = msgp.AppendArrayHeader(o, uint32(len(z.PoolNumbers))) + for za0004 := range z.PoolNumbers { + o = msgp.AppendInt(o, z.PoolNumbers[za0004]) } } - } - if (zb0001Mask & 0x100) == 0 { // if not omitted - // string "poolNumber" - o = append(o, 0xaa, 0x70, 0x6f, 0x6f, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72) - o = msgp.AppendInt(o, z.PoolNumber) - } - if (zb0001Mask & 0x200) == 0 { // if not omitted - // string "poolNumbers" - o = append(o, 0xab, 0x70, 0x6f, 0x6f, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.PoolNumbers))) - for za0004 := range z.PoolNumbers { - o = msgp.AppendInt(o, z.PoolNumbers[za0004]) + // string "mem_stats" + o = append(o, 0xa9, 0x6d, 0x65, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73) + o, err = z.MemStats.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "MemStats") + return } - } - // string "mem_stats" - o = append(o, 0xa9, 0x6d, 0x65, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73) - o, err = z.MemStats.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "MemStats") - return - } - if (zb0001Mask & 0x800) == 0 { // if not omitted - // string "go_max_procs" - o = append(o, 0xac, 0x67, 0x6f, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x73) - o = msgp.AppendInt(o, z.GoMaxProcs) - } - if (zb0001Mask & 0x1000) == 0 { // if not omitted - // string "num_cpu" - o = append(o, 0xa7, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x70, 0x75) - o = msgp.AppendInt(o, z.NumCPU) - } - if (zb0001Mask & 0x2000) == 0 { // if not omitted - // string "runtime_version" - o = append(o, 0xaf, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - o = msgp.AppendString(o, z.RuntimeVersion) - } - if (zb0001Mask & 0x4000) == 0 { // if not omitted - // string "gc_stats" - o = append(o, 0xa8, 0x67, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73) - if z.GCStats == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.GCStats.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "GCStats") - return + if (zb0001Mask & 0x800) == 0 { // if not omitted + // string "go_max_procs" + o = append(o, 0xac, 0x67, 0x6f, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x73) + o = msgp.AppendInt(o, z.GoMaxProcs) + } + if (zb0001Mask & 0x1000) == 0 { // if not omitted + // string "num_cpu" + o = append(o, 0xa7, 0x6e, 0x75, 0x6d, 0x5f, 0x63, 0x70, 0x75) + o = msgp.AppendInt(o, z.NumCPU) + } + if (zb0001Mask & 0x2000) == 0 { // if not omitted + // string "runtime_version" + o = append(o, 0xaf, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) + o = msgp.AppendString(o, z.RuntimeVersion) + } + if (zb0001Mask & 0x4000) == 0 { // if not omitted + // string "gc_stats" + o = append(o, 0xa8, 0x67, 0x63, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73) + if z.GCStats == nil { + o = msgp.AppendNil(o) + } else { + o, err = z.GCStats.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "GCStats") + return + } } } - } - if (zb0001Mask & 0x8000) == 0 { // if not omitted - // string "minio_env_vars" - o = append(o, 0xae, 0x6d, 0x69, 0x6e, 0x69, 0x6f, 0x5f, 0x65, 0x6e, 0x76, 0x5f, 0x76, 0x61, 0x72, 0x73) - o = msgp.AppendMapHeader(o, uint32(len(z.MinioEnvVars))) - for za0005, za0006 := range z.MinioEnvVars { - o = msgp.AppendString(o, za0005) - o = msgp.AppendString(o, za0006) + if (zb0001Mask & 0x8000) == 0 { // if not omitted + // string "minio_env_vars" + o = append(o, 0xae, 0x6d, 0x69, 0x6e, 0x69, 0x6f, 0x5f, 0x65, 0x6e, 0x76, 0x5f, 0x76, 0x61, 0x72, 0x73) + o = msgp.AppendMapHeader(o, uint32(len(z.MinioEnvVars))) + for za0005, za0006 := range z.MinioEnvVars { + o = msgp.AppendString(o, za0005) + o = msgp.AppendString(o, za0006) + } } } return @@ -9944,11 +9960,10 @@ func (z *Services) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0003Mask != 0x1 { - if (zb0003Mask & 0x1) == 0 { - z.LDAP.Status = "" - } + if (zb0003Mask & 0x1) == 0 { + z.LDAP.Status = "" } + zb0001Mask |= 0x4 case "logger": var zb0004 uint32 @@ -10017,11 +10032,10 @@ func (z *Services) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0006Mask != 0x1 { - if (zb0006Mask & 0x1) == 0 { - za0004.Status = "" - } + if (zb0006Mask & 0x1) == 0 { + za0004.Status = "" } + z.Logger[za0002][za0003] = za0004 } } @@ -10093,11 +10107,10 @@ func (z *Services) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0009Mask != 0x1 { - if (zb0009Mask & 0x1) == 0 { - za0007.Status = "" - } + if (zb0009Mask & 0x1) == 0 { + za0007.Status = "" } + z.Audit[za0005][za0006] = za0007 } } @@ -10203,11 +10216,10 @@ func (z *Services) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0014Mask != 0x1 { - if (zb0014Mask & 0x1) == 0 { - za0013.Status = "" - } + if (zb0014Mask & 0x1) == 0 { + za0013.Status = "" } + za0010[za0011][za0012] = za0013 } } @@ -10278,245 +10290,237 @@ func (z *Services) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - // write "kms" - err = en.Append(0xa3, 0x6b, 0x6d, 0x73) - if err != nil { - return - } - err = z.KMS.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "KMS") - return - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // write "kmsStatus" - err = en.Append(0xa9, 0x6b, 0x6d, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // write "kms" + err = en.Append(0xa3, 0x6b, 0x6d, 0x73) if err != nil { return } - err = en.WriteArrayHeader(uint32(len(z.KMSStatus))) + err = z.KMS.EncodeMsg(en) if err != nil { - err = msgp.WrapError(err, "KMSStatus") + err = msgp.WrapError(err, "KMS") return } - for za0001 := range z.KMSStatus { - err = z.KMSStatus[za0001].EncodeMsg(en) + if (zb0001Mask & 0x2) == 0 { // if not omitted + // write "kmsStatus" + err = en.Append(0xa9, 0x6b, 0x6d, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73) if err != nil { - err = msgp.WrapError(err, "KMSStatus", za0001) return } - } - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // write "ldap" - err = en.Append(0xa4, 0x6c, 0x64, 0x61, 0x70) - if err != nil { - return - } - // check for omitted fields - zb0002Len := uint32(1) - var zb0002Mask uint8 /* 1 bits */ - _ = zb0002Mask - if z.LDAP.Status == "" { - zb0002Len-- - zb0002Mask |= 0x1 - } - // variable map header, size zb0002Len - err = en.Append(0x80 | uint8(zb0002Len)) - if err != nil { - return - } - if (zb0002Mask & 0x1) == 0 { // if not omitted - // write "status" - err = en.Append(0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) + err = en.WriteArrayHeader(uint32(len(z.KMSStatus))) if err != nil { + err = msgp.WrapError(err, "KMSStatus") return } - err = en.WriteString(z.LDAP.Status) - if err != nil { - err = msgp.WrapError(err, "LDAP", "Status") - return + for za0001 := range z.KMSStatus { + err = z.KMSStatus[za0001].EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "KMSStatus", za0001) + return + } } } - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // write "logger" - err = en.Append(0xa6, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.Logger))) - if err != nil { - err = msgp.WrapError(err, "Logger") - return - } - for za0002 := range z.Logger { - err = en.WriteMapHeader(uint32(len(z.Logger[za0002]))) + if (zb0001Mask & 0x4) == 0 { // if not omitted + // write "ldap" + err = en.Append(0xa4, 0x6c, 0x64, 0x61, 0x70) + if err != nil { + return + } + // check for omitted fields + zb0002Len := uint32(1) + var zb0002Mask uint8 /* 1 bits */ + _ = zb0002Mask + if z.LDAP.Status == "" { + zb0002Len-- + zb0002Mask |= 0x1 + } + // variable map header, size zb0002Len + err = en.Append(0x80 | uint8(zb0002Len)) if err != nil { - err = msgp.WrapError(err, "Logger", za0002) return } - for za0003, za0004 := range z.Logger[za0002] { - err = en.WriteString(za0003) + if (zb0002Mask & 0x1) == 0 { // if not omitted + // write "status" + err = en.Append(0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) if err != nil { - err = msgp.WrapError(err, "Logger", za0002) return } - // check for omitted fields - zb0003Len := uint32(1) - var zb0003Mask uint8 /* 1 bits */ - _ = zb0003Mask - if za0004.Status == "" { - zb0003Len-- - zb0003Mask |= 0x1 - } - // variable map header, size zb0003Len - err = en.Append(0x80 | uint8(zb0003Len)) + err = en.WriteString(z.LDAP.Status) if err != nil { + err = msgp.WrapError(err, "LDAP", "Status") return } - if zb0003Len == 0 { + } + } + if (zb0001Mask & 0x8) == 0 { // if not omitted + // write "logger" + err = en.Append(0xa6, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72) + if err != nil { + return + } + err = en.WriteArrayHeader(uint32(len(z.Logger))) + if err != nil { + err = msgp.WrapError(err, "Logger") + return + } + for za0002 := range z.Logger { + err = en.WriteMapHeader(uint32(len(z.Logger[za0002]))) + if err != nil { + err = msgp.WrapError(err, "Logger", za0002) return } - if (zb0003Mask & 0x1) == 0 { // if not omitted - // write "status" - err = en.Append(0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) + for za0003, za0004 := range z.Logger[za0002] { + err = en.WriteString(za0003) if err != nil { + err = msgp.WrapError(err, "Logger", za0002) return } - err = en.WriteString(za0004.Status) + // check for omitted fields + zb0003Len := uint32(1) + var zb0003Mask uint8 /* 1 bits */ + _ = zb0003Mask + if za0004.Status == "" { + zb0003Len-- + zb0003Mask |= 0x1 + } + // variable map header, size zb0003Len + err = en.Append(0x80 | uint8(zb0003Len)) if err != nil { - err = msgp.WrapError(err, "Logger", za0002, za0003, "Status") return } + if (zb0003Mask & 0x1) == 0 { // if not omitted + // write "status" + err = en.Append(0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) + if err != nil { + return + } + err = en.WriteString(za0004.Status) + if err != nil { + err = msgp.WrapError(err, "Logger", za0002, za0003, "Status") + return + } + } } } } - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // write "audit" - err = en.Append(0xa5, 0x61, 0x75, 0x64, 0x69, 0x74) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.Audit))) - if err != nil { - err = msgp.WrapError(err, "Audit") - return - } - for za0005 := range z.Audit { - err = en.WriteMapHeader(uint32(len(z.Audit[za0005]))) + if (zb0001Mask & 0x10) == 0 { // if not omitted + // write "audit" + err = en.Append(0xa5, 0x61, 0x75, 0x64, 0x69, 0x74) if err != nil { - err = msgp.WrapError(err, "Audit", za0005) return } - for za0006, za0007 := range z.Audit[za0005] { - err = en.WriteString(za0006) + err = en.WriteArrayHeader(uint32(len(z.Audit))) + if err != nil { + err = msgp.WrapError(err, "Audit") + return + } + for za0005 := range z.Audit { + err = en.WriteMapHeader(uint32(len(z.Audit[za0005]))) if err != nil { err = msgp.WrapError(err, "Audit", za0005) return } - // check for omitted fields - zb0004Len := uint32(1) - var zb0004Mask uint8 /* 1 bits */ - _ = zb0004Mask - if za0007.Status == "" { - zb0004Len-- - zb0004Mask |= 0x1 - } - // variable map header, size zb0004Len - err = en.Append(0x80 | uint8(zb0004Len)) - if err != nil { - return - } - if zb0004Len == 0 { - return - } - if (zb0004Mask & 0x1) == 0 { // if not omitted - // write "status" - err = en.Append(0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) + for za0006, za0007 := range z.Audit[za0005] { + err = en.WriteString(za0006) if err != nil { + err = msgp.WrapError(err, "Audit", za0005) return } - err = en.WriteString(za0007.Status) + // check for omitted fields + zb0004Len := uint32(1) + var zb0004Mask uint8 /* 1 bits */ + _ = zb0004Mask + if za0007.Status == "" { + zb0004Len-- + zb0004Mask |= 0x1 + } + // variable map header, size zb0004Len + err = en.Append(0x80 | uint8(zb0004Len)) if err != nil { - err = msgp.WrapError(err, "Audit", za0005, za0006, "Status") return } + if (zb0004Mask & 0x1) == 0 { // if not omitted + // write "status" + err = en.Append(0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) + if err != nil { + return + } + err = en.WriteString(za0007.Status) + if err != nil { + err = msgp.WrapError(err, "Audit", za0005, za0006, "Status") + return + } + } } } } - } - if (zb0001Mask & 0x20) == 0 { // if not omitted - // write "notifications" - err = en.Append(0xad, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.Notifications))) - if err != nil { - err = msgp.WrapError(err, "Notifications") - return - } - for za0008 := range z.Notifications { - err = en.WriteMapHeader(uint32(len(z.Notifications[za0008]))) + if (zb0001Mask & 0x20) == 0 { // if not omitted + // write "notifications" + err = en.Append(0xad, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73) if err != nil { - err = msgp.WrapError(err, "Notifications", za0008) return } - for za0009, za0010 := range z.Notifications[za0008] { - err = en.WriteString(za0009) + err = en.WriteArrayHeader(uint32(len(z.Notifications))) + if err != nil { + err = msgp.WrapError(err, "Notifications") + return + } + for za0008 := range z.Notifications { + err = en.WriteMapHeader(uint32(len(z.Notifications[za0008]))) if err != nil { err = msgp.WrapError(err, "Notifications", za0008) return } - err = en.WriteArrayHeader(uint32(len(za0010))) - if err != nil { - err = msgp.WrapError(err, "Notifications", za0008, za0009) - return - } - for za0011 := range za0010 { - err = en.WriteMapHeader(uint32(len(za0010[za0011]))) + for za0009, za0010 := range z.Notifications[za0008] { + err = en.WriteString(za0009) + if err != nil { + err = msgp.WrapError(err, "Notifications", za0008) + return + } + err = en.WriteArrayHeader(uint32(len(za0010))) if err != nil { - err = msgp.WrapError(err, "Notifications", za0008, za0009, za0011) + err = msgp.WrapError(err, "Notifications", za0008, za0009) return } - for za0012, za0013 := range za0010[za0011] { - err = en.WriteString(za0012) + for za0011 := range za0010 { + err = en.WriteMapHeader(uint32(len(za0010[za0011]))) if err != nil { err = msgp.WrapError(err, "Notifications", za0008, za0009, za0011) return } - // check for omitted fields - zb0005Len := uint32(1) - var zb0005Mask uint8 /* 1 bits */ - _ = zb0005Mask - if za0013.Status == "" { - zb0005Len-- - zb0005Mask |= 0x1 - } - // variable map header, size zb0005Len - err = en.Append(0x80 | uint8(zb0005Len)) - if err != nil { - return - } - if zb0005Len == 0 { - return - } - if (zb0005Mask & 0x1) == 0 { // if not omitted - // write "status" - err = en.Append(0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) + for za0012, za0013 := range za0010[za0011] { + err = en.WriteString(za0012) if err != nil { + err = msgp.WrapError(err, "Notifications", za0008, za0009, za0011) return } - err = en.WriteString(za0013.Status) + // check for omitted fields + zb0005Len := uint32(1) + var zb0005Mask uint8 /* 1 bits */ + _ = zb0005Mask + if za0013.Status == "" { + zb0005Len-- + zb0005Mask |= 0x1 + } + // variable map header, size zb0005Len + err = en.Append(0x80 | uint8(zb0005Len)) if err != nil { - err = msgp.WrapError(err, "Notifications", za0008, za0009, za0011, za0012, "Status") return } + if (zb0005Mask & 0x1) == 0 { // if not omitted + // write "status" + err = en.Append(0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) + if err != nil { + return + } + err = en.WriteString(za0013.Status) + if err != nil { + err = msgp.WrapError(err, "Notifications", za0008, za0009, za0011, za0012, "Status") + return + } + } } } } @@ -10555,135 +10559,127 @@ func (z *Services) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } - // string "kms" - o = append(o, 0xa3, 0x6b, 0x6d, 0x73) - o, err = z.KMS.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "KMS") - return - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // string "kmsStatus" - o = append(o, 0xa9, 0x6b, 0x6d, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.KMSStatus))) - for za0001 := range z.KMSStatus { - o, err = z.KMSStatus[za0001].MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "KMSStatus", za0001) - return - } - } - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // string "ldap" - o = append(o, 0xa4, 0x6c, 0x64, 0x61, 0x70) - // check for omitted fields - zb0002Len := uint32(1) - var zb0002Mask uint8 /* 1 bits */ - _ = zb0002Mask - if z.LDAP.Status == "" { - zb0002Len-- - zb0002Mask |= 0x1 - } - // variable map header, size zb0002Len - o = append(o, 0x80|uint8(zb0002Len)) - if (zb0002Mask & 0x1) == 0 { // if not omitted - // string "status" - o = append(o, 0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) - o = msgp.AppendString(o, z.LDAP.Status) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // string "kms" + o = append(o, 0xa3, 0x6b, 0x6d, 0x73) + o, err = z.KMS.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "KMS") + return } - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // string "logger" - o = append(o, 0xa6, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72) - o = msgp.AppendArrayHeader(o, uint32(len(z.Logger))) - for za0002 := range z.Logger { - o = msgp.AppendMapHeader(o, uint32(len(z.Logger[za0002]))) - for za0003, za0004 := range z.Logger[za0002] { - o = msgp.AppendString(o, za0003) - // check for omitted fields - zb0003Len := uint32(1) - var zb0003Mask uint8 /* 1 bits */ - _ = zb0003Mask - if za0004.Status == "" { - zb0003Len-- - zb0003Mask |= 0x1 - } - // variable map header, size zb0003Len - o = append(o, 0x80|uint8(zb0003Len)) - if zb0003Len == 0 { + if (zb0001Mask & 0x2) == 0 { // if not omitted + // string "kmsStatus" + o = append(o, 0xa9, 0x6b, 0x6d, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73) + o = msgp.AppendArrayHeader(o, uint32(len(z.KMSStatus))) + for za0001 := range z.KMSStatus { + o, err = z.KMSStatus[za0001].MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "KMSStatus", za0001) return } - if (zb0003Mask & 0x1) == 0 { // if not omitted - // string "status" - o = append(o, 0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) - o = msgp.AppendString(o, za0004.Status) - } } } - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // string "audit" - o = append(o, 0xa5, 0x61, 0x75, 0x64, 0x69, 0x74) - o = msgp.AppendArrayHeader(o, uint32(len(z.Audit))) - for za0005 := range z.Audit { - o = msgp.AppendMapHeader(o, uint32(len(z.Audit[za0005]))) - for za0006, za0007 := range z.Audit[za0005] { - o = msgp.AppendString(o, za0006) - // check for omitted fields - zb0004Len := uint32(1) - var zb0004Mask uint8 /* 1 bits */ - _ = zb0004Mask - if za0007.Status == "" { - zb0004Len-- - zb0004Mask |= 0x1 - } - // variable map header, size zb0004Len - o = append(o, 0x80|uint8(zb0004Len)) - if zb0004Len == 0 { - return + if (zb0001Mask & 0x4) == 0 { // if not omitted + // string "ldap" + o = append(o, 0xa4, 0x6c, 0x64, 0x61, 0x70) + // check for omitted fields + zb0002Len := uint32(1) + var zb0002Mask uint8 /* 1 bits */ + _ = zb0002Mask + if z.LDAP.Status == "" { + zb0002Len-- + zb0002Mask |= 0x1 + } + // variable map header, size zb0002Len + o = append(o, 0x80|uint8(zb0002Len)) + if (zb0002Mask & 0x1) == 0 { // if not omitted + // string "status" + o = append(o, 0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) + o = msgp.AppendString(o, z.LDAP.Status) + } + } + if (zb0001Mask & 0x8) == 0 { // if not omitted + // string "logger" + o = append(o, 0xa6, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72) + o = msgp.AppendArrayHeader(o, uint32(len(z.Logger))) + for za0002 := range z.Logger { + o = msgp.AppendMapHeader(o, uint32(len(z.Logger[za0002]))) + for za0003, za0004 := range z.Logger[za0002] { + o = msgp.AppendString(o, za0003) + // check for omitted fields + zb0003Len := uint32(1) + var zb0003Mask uint8 /* 1 bits */ + _ = zb0003Mask + if za0004.Status == "" { + zb0003Len-- + zb0003Mask |= 0x1 + } + // variable map header, size zb0003Len + o = append(o, 0x80|uint8(zb0003Len)) + if (zb0003Mask & 0x1) == 0 { // if not omitted + // string "status" + o = append(o, 0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) + o = msgp.AppendString(o, za0004.Status) + } } - if (zb0004Mask & 0x1) == 0 { // if not omitted - // string "status" - o = append(o, 0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) - o = msgp.AppendString(o, za0007.Status) + } + } + if (zb0001Mask & 0x10) == 0 { // if not omitted + // string "audit" + o = append(o, 0xa5, 0x61, 0x75, 0x64, 0x69, 0x74) + o = msgp.AppendArrayHeader(o, uint32(len(z.Audit))) + for za0005 := range z.Audit { + o = msgp.AppendMapHeader(o, uint32(len(z.Audit[za0005]))) + for za0006, za0007 := range z.Audit[za0005] { + o = msgp.AppendString(o, za0006) + // check for omitted fields + zb0004Len := uint32(1) + var zb0004Mask uint8 /* 1 bits */ + _ = zb0004Mask + if za0007.Status == "" { + zb0004Len-- + zb0004Mask |= 0x1 + } + // variable map header, size zb0004Len + o = append(o, 0x80|uint8(zb0004Len)) + if (zb0004Mask & 0x1) == 0 { // if not omitted + // string "status" + o = append(o, 0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) + o = msgp.AppendString(o, za0007.Status) + } } } } - } - if (zb0001Mask & 0x20) == 0 { // if not omitted - // string "notifications" - o = append(o, 0xad, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.Notifications))) - for za0008 := range z.Notifications { - o = msgp.AppendMapHeader(o, uint32(len(z.Notifications[za0008]))) - for za0009, za0010 := range z.Notifications[za0008] { - o = msgp.AppendString(o, za0009) - o = msgp.AppendArrayHeader(o, uint32(len(za0010))) - for za0011 := range za0010 { - o = msgp.AppendMapHeader(o, uint32(len(za0010[za0011]))) - for za0012, za0013 := range za0010[za0011] { - o = msgp.AppendString(o, za0012) - // check for omitted fields - zb0005Len := uint32(1) - var zb0005Mask uint8 /* 1 bits */ - _ = zb0005Mask - if za0013.Status == "" { - zb0005Len-- - zb0005Mask |= 0x1 - } - // variable map header, size zb0005Len - o = append(o, 0x80|uint8(zb0005Len)) - if zb0005Len == 0 { - return - } - if (zb0005Mask & 0x1) == 0 { // if not omitted - // string "status" - o = append(o, 0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) - o = msgp.AppendString(o, za0013.Status) + if (zb0001Mask & 0x20) == 0 { // if not omitted + // string "notifications" + o = append(o, 0xad, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73) + o = msgp.AppendArrayHeader(o, uint32(len(z.Notifications))) + for za0008 := range z.Notifications { + o = msgp.AppendMapHeader(o, uint32(len(z.Notifications[za0008]))) + for za0009, za0010 := range z.Notifications[za0008] { + o = msgp.AppendString(o, za0009) + o = msgp.AppendArrayHeader(o, uint32(len(za0010))) + for za0011 := range za0010 { + o = msgp.AppendMapHeader(o, uint32(len(za0010[za0011]))) + for za0012, za0013 := range za0010[za0011] { + o = msgp.AppendString(o, za0012) + // check for omitted fields + zb0005Len := uint32(1) + var zb0005Mask uint8 /* 1 bits */ + _ = zb0005Mask + if za0013.Status == "" { + zb0005Len-- + zb0005Mask |= 0x1 + } + // variable map header, size zb0005Len + o = append(o, 0x80|uint8(zb0005Len)) + if (zb0005Mask & 0x1) == 0 { // if not omitted + // string "status" + o = append(o, 0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) + o = msgp.AppendString(o, za0013.Status) + } } } } @@ -10773,11 +10769,10 @@ func (z *Services) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0003Mask != 0x1 { - if (zb0003Mask & 0x1) == 0 { - z.LDAP.Status = "" - } + if (zb0003Mask & 0x1) == 0 { + z.LDAP.Status = "" } + zb0001Mask |= 0x4 case "logger": var zb0004 uint32 @@ -10846,11 +10841,10 @@ func (z *Services) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0006Mask != 0x1 { - if (zb0006Mask & 0x1) == 0 { - za0004.Status = "" - } + if (zb0006Mask & 0x1) == 0 { + za0004.Status = "" } + z.Logger[za0002][za0003] = za0004 } } @@ -10922,11 +10916,10 @@ func (z *Services) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0009Mask != 0x1 { - if (zb0009Mask & 0x1) == 0 { - za0007.Status = "" - } + if (zb0009Mask & 0x1) == 0 { + za0007.Status = "" } + z.Audit[za0005][za0006] = za0007 } } @@ -11032,11 +11025,10 @@ func (z *Services) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0014Mask != 0x1 { - if (zb0014Mask & 0x1) == 0 { - za0013.Status = "" - } + if (zb0014Mask & 0x1) == 0 { + za0013.Status = "" } + za0010[za0011][za0012] = za0013 } } @@ -11161,11 +11153,10 @@ func (z *Status) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { - if (zb0001Mask & 0x1) == 0 { - z.Status = "" - } + if (zb0001Mask & 0x1) == 0 { + z.Status = "" } + return } @@ -11184,9 +11175,6 @@ func (z Status) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } if (zb0001Mask & 0x1) == 0 { // if not omitted // write "status" err = en.Append(0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) @@ -11215,9 +11203,6 @@ func (z Status) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } if (zb0001Mask & 0x1) == 0 { // if not omitted // string "status" o = append(o, 0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) @@ -11262,11 +11247,10 @@ func (z *Status) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { - if (zb0001Mask & 0x1) == 0 { - z.Status = "" - } + if (zb0001Mask & 0x1) == 0 { + z.Status = "" } + o = bts return } @@ -11511,11 +11495,10 @@ func (z *TargetIDStatus) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0004Mask != 0x1 { - if (zb0004Mask & 0x1) == 0 { - zb0002.Status = "" - } + if (zb0004Mask & 0x1) == 0 { + zb0002.Status = "" } + (*z)[zb0001] = zb0002 } return @@ -11547,9 +11530,6 @@ func (z TargetIDStatus) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } if (zb0001Mask & 0x1) == 0 { // if not omitted // write "status" err = en.Append(0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) @@ -11582,9 +11562,6 @@ func (z TargetIDStatus) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } if (zb0001Mask & 0x1) == 0 { // if not omitted // string "status" o = append(o, 0xa6, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73) @@ -11652,11 +11629,10 @@ func (z *TargetIDStatus) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0004Mask != 0x1 { - if (zb0004Mask & 0x1) == 0 { - zb0002.Status = "" - } + if (zb0004Mask & 0x1) == 0 { + zb0002.Status = "" } + (*z)[zb0001] = zb0002 } o = bts @@ -11870,11 +11846,10 @@ func (z *Usage) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { - if (zb0001Mask & 0x1) == 0 { - z.Error = "" - } + if (zb0001Mask & 0x1) == 0 { + z.Error = "" } + return } @@ -11893,30 +11868,31 @@ func (z Usage) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - // write "size" - err = en.Append(0xa4, 0x73, 0x69, 0x7a, 0x65) - if err != nil { - return - } - err = en.WriteUint64(z.Size) - if err != nil { - err = msgp.WrapError(err, "Size") - return - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // write "error" - err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // write "size" + err = en.Append(0xa4, 0x73, 0x69, 0x7a, 0x65) if err != nil { return } - err = en.WriteString(z.Error) + err = en.WriteUint64(z.Size) if err != nil { - err = msgp.WrapError(err, "Error") + err = msgp.WrapError(err, "Size") return } + if (zb0001Mask & 0x2) == 0 { // if not omitted + // write "error" + err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + if err != nil { + return + } + err = en.WriteString(z.Error) + if err != nil { + err = msgp.WrapError(err, "Error") + return + } + } } return } @@ -11934,16 +11910,17 @@ func (z Usage) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } - // string "size" - o = append(o, 0xa4, 0x73, 0x69, 0x7a, 0x65) - o = msgp.AppendUint64(o, z.Size) - if (zb0001Mask & 0x2) == 0 { // if not omitted - // string "error" - o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) - o = msgp.AppendString(o, z.Error) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // string "size" + o = append(o, 0xa4, 0x73, 0x69, 0x7a, 0x65) + o = msgp.AppendUint64(o, z.Size) + if (zb0001Mask & 0x2) == 0 { // if not omitted + // string "error" + o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + o = msgp.AppendString(o, z.Error) + } } return } @@ -11990,11 +11967,10 @@ func (z *Usage) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { - if (zb0001Mask & 0x1) == 0 { - z.Error = "" - } + if (zb0001Mask & 0x1) == 0 { + z.Error = "" } + o = bts return } @@ -12047,11 +12023,10 @@ func (z *Versions) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { - if (zb0001Mask & 0x1) == 0 { - z.Error = "" - } + if (zb0001Mask & 0x1) == 0 { + z.Error = "" } + return } @@ -12070,30 +12045,31 @@ func (z Versions) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - // write "count" - err = en.Append(0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) - if err != nil { - return - } - err = en.WriteUint64(z.Count) - if err != nil { - err = msgp.WrapError(err, "Count") - return - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // write "error" - err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // write "count" + err = en.Append(0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) if err != nil { return } - err = en.WriteString(z.Error) + err = en.WriteUint64(z.Count) if err != nil { - err = msgp.WrapError(err, "Error") + err = msgp.WrapError(err, "Count") return } + if (zb0001Mask & 0x2) == 0 { // if not omitted + // write "error" + err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + if err != nil { + return + } + err = en.WriteString(z.Error) + if err != nil { + err = msgp.WrapError(err, "Error") + return + } + } } return } @@ -12111,16 +12087,17 @@ func (z Versions) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } - // string "count" - o = append(o, 0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) - o = msgp.AppendUint64(o, z.Count) - if (zb0001Mask & 0x2) == 0 { // if not omitted - // string "error" - o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) - o = msgp.AppendString(o, z.Error) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // string "count" + o = append(o, 0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) + o = msgp.AppendUint64(o, z.Count) + if (zb0001Mask & 0x2) == 0 { // if not omitted + // string "error" + o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + o = msgp.AppendString(o, z.Error) + } } return } @@ -12167,11 +12144,10 @@ func (z *Versions) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { - if (zb0001Mask & 0x1) == 0 { - z.Error = "" - } + if (zb0001Mask & 0x1) == 0 { + z.Error = "" } + o = bts return } diff --git a/metrics_gen.go b/metrics_gen.go index 246c6cd..7a1754f 100644 --- a/metrics_gen.go +++ b/metrics_gen.go @@ -1115,11 +1115,10 @@ func (z *DiskMetric) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0003Mask != 0x1 { - if (zb0003Mask & 0x1) == 0 { - z.LastMinute.Operations = nil - } + if (zb0003Mask & 0x1) == 0 { + z.LastMinute.Operations = nil } + case "iostats": err = z.IOStats.DecodeMsg(dc) if err != nil { @@ -1176,128 +1175,129 @@ func (z *DiskMetric) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - // write "collected" - err = en.Append(0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) - if err != nil { - return - } - err = en.WriteTime(z.CollectedAt) - if err != nil { - err = msgp.WrapError(err, "CollectedAt") - return - } - // write "n_disks" - err = en.Append(0xa7, 0x6e, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x73) - if err != nil { - return - } - err = en.WriteInt(z.NDisks) - if err != nil { - err = msgp.WrapError(err, "NDisks") - return - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // write "offline" - err = en.Append(0xa7, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // write "collected" + err = en.Append(0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) if err != nil { return } - err = en.WriteInt(z.Offline) + err = en.WriteTime(z.CollectedAt) if err != nil { - err = msgp.WrapError(err, "Offline") + err = msgp.WrapError(err, "CollectedAt") return } - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // write "healing" - err = en.Append(0xa7, 0x68, 0x65, 0x61, 0x6c, 0x69, 0x6e, 0x67) + // write "n_disks" + err = en.Append(0xa7, 0x6e, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x73) if err != nil { return } - err = en.WriteInt(z.Healing) + err = en.WriteInt(z.NDisks) if err != nil { - err = msgp.WrapError(err, "Healing") + err = msgp.WrapError(err, "NDisks") return } - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // write "life_time_ops" - err = en.Append(0xad, 0x6c, 0x69, 0x66, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x70, 0x73) - if err != nil { - return + if (zb0001Mask & 0x4) == 0 { // if not omitted + // write "offline" + err = en.Append(0xa7, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65) + if err != nil { + return + } + err = en.WriteInt(z.Offline) + if err != nil { + err = msgp.WrapError(err, "Offline") + return + } } - err = en.WriteMapHeader(uint32(len(z.LifeTimeOps))) - if err != nil { - err = msgp.WrapError(err, "LifeTimeOps") - return + if (zb0001Mask & 0x8) == 0 { // if not omitted + // write "healing" + err = en.Append(0xa7, 0x68, 0x65, 0x61, 0x6c, 0x69, 0x6e, 0x67) + if err != nil { + return + } + err = en.WriteInt(z.Healing) + if err != nil { + err = msgp.WrapError(err, "Healing") + return + } } - for za0001, za0002 := range z.LifeTimeOps { - err = en.WriteString(za0001) + if (zb0001Mask & 0x10) == 0 { // if not omitted + // write "life_time_ops" + err = en.Append(0xad, 0x6c, 0x69, 0x66, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x70, 0x73) if err != nil { - err = msgp.WrapError(err, "LifeTimeOps") return } - err = en.WriteUint64(za0002) + err = en.WriteMapHeader(uint32(len(z.LifeTimeOps))) if err != nil { - err = msgp.WrapError(err, "LifeTimeOps", za0001) + err = msgp.WrapError(err, "LifeTimeOps") return } + for za0001, za0002 := range z.LifeTimeOps { + err = en.WriteString(za0001) + if err != nil { + err = msgp.WrapError(err, "LifeTimeOps") + return + } + err = en.WriteUint64(za0002) + if err != nil { + err = msgp.WrapError(err, "LifeTimeOps", za0001) + return + } + } } - } - // write "last_minute" - err = en.Append(0xab, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65) - if err != nil { - return - } - // check for omitted fields - zb0002Len := uint32(1) - var zb0002Mask uint8 /* 1 bits */ - _ = zb0002Mask - if z.LastMinute.Operations == nil { - zb0002Len-- - zb0002Mask |= 0x1 - } - // variable map header, size zb0002Len - err = en.Append(0x80 | uint8(zb0002Len)) - if err != nil { - return - } - if (zb0002Mask & 0x1) == 0 { // if not omitted - // write "operations" - err = en.Append(0xaa, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73) + // write "last_minute" + err = en.Append(0xab, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65) if err != nil { return } - err = en.WriteMapHeader(uint32(len(z.LastMinute.Operations))) + // check for omitted fields + zb0002Len := uint32(1) + var zb0002Mask uint8 /* 1 bits */ + _ = zb0002Mask + if z.LastMinute.Operations == nil { + zb0002Len-- + zb0002Mask |= 0x1 + } + // variable map header, size zb0002Len + err = en.Append(0x80 | uint8(zb0002Len)) if err != nil { - err = msgp.WrapError(err, "LastMinute", "Operations") return } - for za0003, za0004 := range z.LastMinute.Operations { - err = en.WriteString(za0003) + if (zb0002Mask & 0x1) == 0 { // if not omitted + // write "operations" + err = en.Append(0xaa, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73) if err != nil { - err = msgp.WrapError(err, "LastMinute", "Operations") return } - err = za0004.EncodeMsg(en) + err = en.WriteMapHeader(uint32(len(z.LastMinute.Operations))) if err != nil { - err = msgp.WrapError(err, "LastMinute", "Operations", za0003) + err = msgp.WrapError(err, "LastMinute", "Operations") return } + for za0003, za0004 := range z.LastMinute.Operations { + err = en.WriteString(za0003) + if err != nil { + err = msgp.WrapError(err, "LastMinute", "Operations") + return + } + err = za0004.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "LastMinute", "Operations", za0003) + return + } + } + } + // write "iostats" + err = en.Append(0xa7, 0x69, 0x6f, 0x73, 0x74, 0x61, 0x74, 0x73) + if err != nil { + return + } + err = z.IOStats.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "IOStats") + return } - } - // write "iostats" - err = en.Append(0xa7, 0x69, 0x6f, 0x73, 0x74, 0x61, 0x74, 0x73) - if err != nil { - return - } - err = z.IOStats.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "IOStats") - return } return } @@ -1323,65 +1323,66 @@ func (z *DiskMetric) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } - // string "collected" - o = append(o, 0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) - o = msgp.AppendTime(o, z.CollectedAt) - // string "n_disks" - o = append(o, 0xa7, 0x6e, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x73) - o = msgp.AppendInt(o, z.NDisks) - if (zb0001Mask & 0x4) == 0 { // if not omitted - // string "offline" - o = append(o, 0xa7, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65) - o = msgp.AppendInt(o, z.Offline) - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // string "healing" - o = append(o, 0xa7, 0x68, 0x65, 0x61, 0x6c, 0x69, 0x6e, 0x67) - o = msgp.AppendInt(o, z.Healing) - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // string "life_time_ops" - o = append(o, 0xad, 0x6c, 0x69, 0x66, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x70, 0x73) - o = msgp.AppendMapHeader(o, uint32(len(z.LifeTimeOps))) - for za0001, za0002 := range z.LifeTimeOps { - o = msgp.AppendString(o, za0001) - o = msgp.AppendUint64(o, za0002) - } - } - // string "last_minute" - o = append(o, 0xab, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65) - // check for omitted fields - zb0002Len := uint32(1) - var zb0002Mask uint8 /* 1 bits */ - _ = zb0002Mask - if z.LastMinute.Operations == nil { - zb0002Len-- - zb0002Mask |= 0x1 - } - // variable map header, size zb0002Len - o = append(o, 0x80|uint8(zb0002Len)) - if (zb0002Mask & 0x1) == 0 { // if not omitted - // string "operations" - o = append(o, 0xaa, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73) - o = msgp.AppendMapHeader(o, uint32(len(z.LastMinute.Operations))) - for za0003, za0004 := range z.LastMinute.Operations { - o = msgp.AppendString(o, za0003) - o, err = za0004.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "LastMinute", "Operations", za0003) - return + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // string "collected" + o = append(o, 0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) + o = msgp.AppendTime(o, z.CollectedAt) + // string "n_disks" + o = append(o, 0xa7, 0x6e, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x73) + o = msgp.AppendInt(o, z.NDisks) + if (zb0001Mask & 0x4) == 0 { // if not omitted + // string "offline" + o = append(o, 0xa7, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65) + o = msgp.AppendInt(o, z.Offline) + } + if (zb0001Mask & 0x8) == 0 { // if not omitted + // string "healing" + o = append(o, 0xa7, 0x68, 0x65, 0x61, 0x6c, 0x69, 0x6e, 0x67) + o = msgp.AppendInt(o, z.Healing) + } + if (zb0001Mask & 0x10) == 0 { // if not omitted + // string "life_time_ops" + o = append(o, 0xad, 0x6c, 0x69, 0x66, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x70, 0x73) + o = msgp.AppendMapHeader(o, uint32(len(z.LifeTimeOps))) + for za0001, za0002 := range z.LifeTimeOps { + o = msgp.AppendString(o, za0001) + o = msgp.AppendUint64(o, za0002) + } + } + // string "last_minute" + o = append(o, 0xab, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65) + // check for omitted fields + zb0002Len := uint32(1) + var zb0002Mask uint8 /* 1 bits */ + _ = zb0002Mask + if z.LastMinute.Operations == nil { + zb0002Len-- + zb0002Mask |= 0x1 + } + // variable map header, size zb0002Len + o = append(o, 0x80|uint8(zb0002Len)) + if (zb0002Mask & 0x1) == 0 { // if not omitted + // string "operations" + o = append(o, 0xaa, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73) + o = msgp.AppendMapHeader(o, uint32(len(z.LastMinute.Operations))) + for za0003, za0004 := range z.LastMinute.Operations { + o = msgp.AppendString(o, za0003) + o, err = za0004.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "LastMinute", "Operations", za0003) + return + } } } - } - // string "iostats" - o = append(o, 0xa7, 0x69, 0x6f, 0x73, 0x74, 0x61, 0x74, 0x73) - o, err = z.IOStats.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "IOStats") - return + // string "iostats" + o = append(o, 0xa7, 0x69, 0x6f, 0x73, 0x74, 0x61, 0x74, 0x73) + o, err = z.IOStats.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "IOStats") + return + } } return } @@ -1520,11 +1521,10 @@ func (z *DiskMetric) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0003Mask != 0x1 { - if (zb0003Mask & 0x1) == 0 { - z.LastMinute.Operations = nil - } + if (zb0003Mask & 0x1) == 0 { + z.LastMinute.Operations = nil } + case "iostats": bts, err = z.IOStats.UnmarshalMsg(bts) if err != nil { @@ -1922,134 +1922,135 @@ func (z *JobMetric) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - // write "jobID" - err = en.Append(0xa5, 0x6a, 0x6f, 0x62, 0x49, 0x44) - if err != nil { - return - } - err = en.WriteString(z.JobID) - if err != nil { - err = msgp.WrapError(err, "JobID") - return - } - // write "jobType" - err = en.Append(0xa7, 0x6a, 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65) - if err != nil { - return - } - err = en.WriteString(z.JobType) - if err != nil { - err = msgp.WrapError(err, "JobType") - return - } - // write "startTime" - err = en.Append(0xa9, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65) - if err != nil { - return - } - err = en.WriteTime(z.StartTime) - if err != nil { - err = msgp.WrapError(err, "StartTime") - return - } - // write "lastUpdate" - err = en.Append(0xaa, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65) - if err != nil { - return - } - err = en.WriteTime(z.LastUpdate) - if err != nil { - err = msgp.WrapError(err, "LastUpdate") - return - } - // write "retryAttempts" - err = en.Append(0xad, 0x72, 0x65, 0x74, 0x72, 0x79, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73) - if err != nil { - return - } - err = en.WriteInt(z.RetryAttempts) - if err != nil { - err = msgp.WrapError(err, "RetryAttempts") - return - } - // write "complete" - err = en.Append(0xa8, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65) - if err != nil { - return - } - err = en.WriteBool(z.Complete) - if err != nil { - err = msgp.WrapError(err, "Complete") - return - } - // write "failed" - err = en.Append(0xa6, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64) - if err != nil { - return - } - err = en.WriteBool(z.Failed) - if err != nil { - err = msgp.WrapError(err, "Failed") - return - } - if (zb0001Mask & 0x80) == 0 { // if not omitted - // write "replicate" - err = en.Append(0xa9, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // write "jobID" + err = en.Append(0xa5, 0x6a, 0x6f, 0x62, 0x49, 0x44) if err != nil { return } - if z.Replicate == nil { - err = en.WriteNil() - if err != nil { - return - } - } else { - err = z.Replicate.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "Replicate") - return - } + err = en.WriteString(z.JobID) + if err != nil { + err = msgp.WrapError(err, "JobID") + return } - } - if (zb0001Mask & 0x100) == 0 { // if not omitted - // write "rotation" - err = en.Append(0xa8, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e) + // write "jobType" + err = en.Append(0xa7, 0x6a, 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65) + if err != nil { + return + } + err = en.WriteString(z.JobType) + if err != nil { + err = msgp.WrapError(err, "JobType") + return + } + // write "startTime" + err = en.Append(0xa9, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65) + if err != nil { + return + } + err = en.WriteTime(z.StartTime) + if err != nil { + err = msgp.WrapError(err, "StartTime") + return + } + // write "lastUpdate" + err = en.Append(0xaa, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65) + if err != nil { + return + } + err = en.WriteTime(z.LastUpdate) + if err != nil { + err = msgp.WrapError(err, "LastUpdate") + return + } + // write "retryAttempts" + err = en.Append(0xad, 0x72, 0x65, 0x74, 0x72, 0x79, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73) + if err != nil { + return + } + err = en.WriteInt(z.RetryAttempts) + if err != nil { + err = msgp.WrapError(err, "RetryAttempts") + return + } + // write "complete" + err = en.Append(0xa8, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65) + if err != nil { + return + } + err = en.WriteBool(z.Complete) + if err != nil { + err = msgp.WrapError(err, "Complete") + return + } + // write "failed" + err = en.Append(0xa6, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64) + if err != nil { + return + } + err = en.WriteBool(z.Failed) if err != nil { + err = msgp.WrapError(err, "Failed") return } - if z.KeyRotate == nil { - err = en.WriteNil() + if (zb0001Mask & 0x80) == 0 { // if not omitted + // write "replicate" + err = en.Append(0xa9, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65) if err != nil { return } - } else { - err = z.KeyRotate.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "KeyRotate") - return + if z.Replicate == nil { + err = en.WriteNil() + if err != nil { + return + } + } else { + err = z.Replicate.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "Replicate") + return + } } } - } - if (zb0001Mask & 0x200) == 0 { // if not omitted - // write "expired" - err = en.Append(0xa7, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64) - if err != nil { - return - } - if z.Expired == nil { - err = en.WriteNil() + if (zb0001Mask & 0x100) == 0 { // if not omitted + // write "rotation" + err = en.Append(0xa8, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e) if err != nil { return } - } else { - err = z.Expired.EncodeMsg(en) + if z.KeyRotate == nil { + err = en.WriteNil() + if err != nil { + return + } + } else { + err = z.KeyRotate.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "KeyRotate") + return + } + } + } + if (zb0001Mask & 0x200) == 0 { // if not omitted + // write "expired" + err = en.Append(0xa7, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64) if err != nil { - err = msgp.WrapError(err, "Expired") return } + if z.Expired == nil { + err = en.WriteNil() + if err != nil { + return + } + } else { + err = z.Expired.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "Expired") + return + } + } } } return @@ -2076,66 +2077,67 @@ func (z *JobMetric) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } - // string "jobID" - o = append(o, 0xa5, 0x6a, 0x6f, 0x62, 0x49, 0x44) - o = msgp.AppendString(o, z.JobID) - // string "jobType" - o = append(o, 0xa7, 0x6a, 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65) - o = msgp.AppendString(o, z.JobType) - // string "startTime" - o = append(o, 0xa9, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65) - o = msgp.AppendTime(o, z.StartTime) - // string "lastUpdate" - o = append(o, 0xaa, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65) - o = msgp.AppendTime(o, z.LastUpdate) - // string "retryAttempts" - o = append(o, 0xad, 0x72, 0x65, 0x74, 0x72, 0x79, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73) - o = msgp.AppendInt(o, z.RetryAttempts) - // string "complete" - o = append(o, 0xa8, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65) - o = msgp.AppendBool(o, z.Complete) - // string "failed" - o = append(o, 0xa6, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64) - o = msgp.AppendBool(o, z.Failed) - if (zb0001Mask & 0x80) == 0 { // if not omitted - // string "replicate" - o = append(o, 0xa9, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65) - if z.Replicate == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.Replicate.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "Replicate") - return + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // string "jobID" + o = append(o, 0xa5, 0x6a, 0x6f, 0x62, 0x49, 0x44) + o = msgp.AppendString(o, z.JobID) + // string "jobType" + o = append(o, 0xa7, 0x6a, 0x6f, 0x62, 0x54, 0x79, 0x70, 0x65) + o = msgp.AppendString(o, z.JobType) + // string "startTime" + o = append(o, 0xa9, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65) + o = msgp.AppendTime(o, z.StartTime) + // string "lastUpdate" + o = append(o, 0xaa, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65) + o = msgp.AppendTime(o, z.LastUpdate) + // string "retryAttempts" + o = append(o, 0xad, 0x72, 0x65, 0x74, 0x72, 0x79, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73) + o = msgp.AppendInt(o, z.RetryAttempts) + // string "complete" + o = append(o, 0xa8, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65) + o = msgp.AppendBool(o, z.Complete) + // string "failed" + o = append(o, 0xa6, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64) + o = msgp.AppendBool(o, z.Failed) + if (zb0001Mask & 0x80) == 0 { // if not omitted + // string "replicate" + o = append(o, 0xa9, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65) + if z.Replicate == nil { + o = msgp.AppendNil(o) + } else { + o, err = z.Replicate.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "Replicate") + return + } } } - } - if (zb0001Mask & 0x100) == 0 { // if not omitted - // string "rotation" - o = append(o, 0xa8, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e) - if z.KeyRotate == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.KeyRotate.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "KeyRotate") - return + if (zb0001Mask & 0x100) == 0 { // if not omitted + // string "rotation" + o = append(o, 0xa8, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e) + if z.KeyRotate == nil { + o = msgp.AppendNil(o) + } else { + o, err = z.KeyRotate.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "KeyRotate") + return + } } } - } - if (zb0001Mask & 0x200) == 0 { // if not omitted - // string "expired" - o = append(o, 0xa7, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64) - if z.Expired == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.Expired.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "Expired") - return + if (zb0001Mask & 0x200) == 0 { // if not omitted + // string "expired" + o = append(o, 0xa7, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64) + if z.Expired == nil { + o = msgp.AppendNil(o) + } else { + o, err = z.Expired.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "Expired") + return + } } } } @@ -2674,137 +2676,138 @@ func (z *MemInfo) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - // write "NodeCommon" - err = en.Append(0xaa, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e) - if err != nil { - return - } - err = z.NodeCommon.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "NodeCommon") - return - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // write "total" - err = en.Append(0xa5, 0x74, 0x6f, 0x74, 0x61, 0x6c) - if err != nil { - return - } - err = en.WriteUint64(z.Total) - if err != nil { - err = msgp.WrapError(err, "Total") - return - } - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // write "used" - err = en.Append(0xa4, 0x75, 0x73, 0x65, 0x64) - if err != nil { - return - } - err = en.WriteUint64(z.Used) - if err != nil { - err = msgp.WrapError(err, "Used") - return - } - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // write "free" - err = en.Append(0xa4, 0x66, 0x72, 0x65, 0x65) - if err != nil { - return - } - err = en.WriteUint64(z.Free) - if err != nil { - err = msgp.WrapError(err, "Free") - return - } - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // write "available" - err = en.Append(0xa9, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65) - if err != nil { - return - } - err = en.WriteUint64(z.Available) - if err != nil { - err = msgp.WrapError(err, "Available") - return - } - } - if (zb0001Mask & 0x20) == 0 { // if not omitted - // write "shared" - err = en.Append(0xa6, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // write "NodeCommon" + err = en.Append(0xaa, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e) if err != nil { return } - err = en.WriteUint64(z.Shared) + err = z.NodeCommon.EncodeMsg(en) if err != nil { - err = msgp.WrapError(err, "Shared") + err = msgp.WrapError(err, "NodeCommon") return } - } - if (zb0001Mask & 0x40) == 0 { // if not omitted - // write "cache" - err = en.Append(0xa5, 0x63, 0x61, 0x63, 0x68, 0x65) - if err != nil { - return + if (zb0001Mask & 0x2) == 0 { // if not omitted + // write "total" + err = en.Append(0xa5, 0x74, 0x6f, 0x74, 0x61, 0x6c) + if err != nil { + return + } + err = en.WriteUint64(z.Total) + if err != nil { + err = msgp.WrapError(err, "Total") + return + } } - err = en.WriteUint64(z.Cache) - if err != nil { - err = msgp.WrapError(err, "Cache") - return + if (zb0001Mask & 0x4) == 0 { // if not omitted + // write "used" + err = en.Append(0xa4, 0x75, 0x73, 0x65, 0x64) + if err != nil { + return + } + err = en.WriteUint64(z.Used) + if err != nil { + err = msgp.WrapError(err, "Used") + return + } } - } - if (zb0001Mask & 0x80) == 0 { // if not omitted - // write "buffer" - err = en.Append(0xa6, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72) - if err != nil { - return + if (zb0001Mask & 0x8) == 0 { // if not omitted + // write "free" + err = en.Append(0xa4, 0x66, 0x72, 0x65, 0x65) + if err != nil { + return + } + err = en.WriteUint64(z.Free) + if err != nil { + err = msgp.WrapError(err, "Free") + return + } } - err = en.WriteUint64(z.Buffers) - if err != nil { - err = msgp.WrapError(err, "Buffers") - return + if (zb0001Mask & 0x10) == 0 { // if not omitted + // write "available" + err = en.Append(0xa9, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65) + if err != nil { + return + } + err = en.WriteUint64(z.Available) + if err != nil { + err = msgp.WrapError(err, "Available") + return + } } - } - if (zb0001Mask & 0x100) == 0 { // if not omitted - // write "swap_space_total" - err = en.Append(0xb0, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c) - if err != nil { - return + if (zb0001Mask & 0x20) == 0 { // if not omitted + // write "shared" + err = en.Append(0xa6, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64) + if err != nil { + return + } + err = en.WriteUint64(z.Shared) + if err != nil { + err = msgp.WrapError(err, "Shared") + return + } } - err = en.WriteUint64(z.SwapSpaceTotal) - if err != nil { - err = msgp.WrapError(err, "SwapSpaceTotal") - return + if (zb0001Mask & 0x40) == 0 { // if not omitted + // write "cache" + err = en.Append(0xa5, 0x63, 0x61, 0x63, 0x68, 0x65) + if err != nil { + return + } + err = en.WriteUint64(z.Cache) + if err != nil { + err = msgp.WrapError(err, "Cache") + return + } } - } - if (zb0001Mask & 0x200) == 0 { // if not omitted - // write "swap_space_free" - err = en.Append(0xaf, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x66, 0x72, 0x65, 0x65) - if err != nil { - return + if (zb0001Mask & 0x80) == 0 { // if not omitted + // write "buffer" + err = en.Append(0xa6, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72) + if err != nil { + return + } + err = en.WriteUint64(z.Buffers) + if err != nil { + err = msgp.WrapError(err, "Buffers") + return + } } - err = en.WriteUint64(z.SwapSpaceFree) - if err != nil { - err = msgp.WrapError(err, "SwapSpaceFree") - return + if (zb0001Mask & 0x100) == 0 { // if not omitted + // write "swap_space_total" + err = en.Append(0xb0, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c) + if err != nil { + return + } + err = en.WriteUint64(z.SwapSpaceTotal) + if err != nil { + err = msgp.WrapError(err, "SwapSpaceTotal") + return + } } - } - if (zb0001Mask & 0x400) == 0 { // if not omitted - // write "limit" - err = en.Append(0xa5, 0x6c, 0x69, 0x6d, 0x69, 0x74) - if err != nil { - return + if (zb0001Mask & 0x200) == 0 { // if not omitted + // write "swap_space_free" + err = en.Append(0xaf, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x66, 0x72, 0x65, 0x65) + if err != nil { + return + } + err = en.WriteUint64(z.SwapSpaceFree) + if err != nil { + err = msgp.WrapError(err, "SwapSpaceFree") + return + } } - err = en.WriteUint64(z.Limit) - if err != nil { - err = msgp.WrapError(err, "Limit") - return + if (zb0001Mask & 0x400) == 0 { // if not omitted + // write "limit" + err = en.Append(0xa5, 0x6c, 0x69, 0x6d, 0x69, 0x74) + if err != nil { + return + } + err = en.WriteUint64(z.Limit) + if err != nil { + err = msgp.WrapError(err, "Limit") + return + } } } return @@ -2859,65 +2862,66 @@ func (z *MemInfo) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } - // string "NodeCommon" - o = append(o, 0xaa, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e) - o, err = z.NodeCommon.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "NodeCommon") - return - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // string "total" - o = append(o, 0xa5, 0x74, 0x6f, 0x74, 0x61, 0x6c) - o = msgp.AppendUint64(o, z.Total) - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // string "used" - o = append(o, 0xa4, 0x75, 0x73, 0x65, 0x64) - o = msgp.AppendUint64(o, z.Used) - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // string "free" - o = append(o, 0xa4, 0x66, 0x72, 0x65, 0x65) - o = msgp.AppendUint64(o, z.Free) - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // string "available" - o = append(o, 0xa9, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65) - o = msgp.AppendUint64(o, z.Available) - } - if (zb0001Mask & 0x20) == 0 { // if not omitted - // string "shared" - o = append(o, 0xa6, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64) - o = msgp.AppendUint64(o, z.Shared) - } - if (zb0001Mask & 0x40) == 0 { // if not omitted - // string "cache" - o = append(o, 0xa5, 0x63, 0x61, 0x63, 0x68, 0x65) - o = msgp.AppendUint64(o, z.Cache) - } - if (zb0001Mask & 0x80) == 0 { // if not omitted - // string "buffer" - o = append(o, 0xa6, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72) - o = msgp.AppendUint64(o, z.Buffers) - } - if (zb0001Mask & 0x100) == 0 { // if not omitted - // string "swap_space_total" - o = append(o, 0xb0, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c) - o = msgp.AppendUint64(o, z.SwapSpaceTotal) - } - if (zb0001Mask & 0x200) == 0 { // if not omitted - // string "swap_space_free" - o = append(o, 0xaf, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x66, 0x72, 0x65, 0x65) - o = msgp.AppendUint64(o, z.SwapSpaceFree) - } - if (zb0001Mask & 0x400) == 0 { // if not omitted - // string "limit" - o = append(o, 0xa5, 0x6c, 0x69, 0x6d, 0x69, 0x74) - o = msgp.AppendUint64(o, z.Limit) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // string "NodeCommon" + o = append(o, 0xaa, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e) + o, err = z.NodeCommon.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "NodeCommon") + return + } + if (zb0001Mask & 0x2) == 0 { // if not omitted + // string "total" + o = append(o, 0xa5, 0x74, 0x6f, 0x74, 0x61, 0x6c) + o = msgp.AppendUint64(o, z.Total) + } + if (zb0001Mask & 0x4) == 0 { // if not omitted + // string "used" + o = append(o, 0xa4, 0x75, 0x73, 0x65, 0x64) + o = msgp.AppendUint64(o, z.Used) + } + if (zb0001Mask & 0x8) == 0 { // if not omitted + // string "free" + o = append(o, 0xa4, 0x66, 0x72, 0x65, 0x65) + o = msgp.AppendUint64(o, z.Free) + } + if (zb0001Mask & 0x10) == 0 { // if not omitted + // string "available" + o = append(o, 0xa9, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65) + o = msgp.AppendUint64(o, z.Available) + } + if (zb0001Mask & 0x20) == 0 { // if not omitted + // string "shared" + o = append(o, 0xa6, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64) + o = msgp.AppendUint64(o, z.Shared) + } + if (zb0001Mask & 0x40) == 0 { // if not omitted + // string "cache" + o = append(o, 0xa5, 0x63, 0x61, 0x63, 0x68, 0x65) + o = msgp.AppendUint64(o, z.Cache) + } + if (zb0001Mask & 0x80) == 0 { // if not omitted + // string "buffer" + o = append(o, 0xa6, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72) + o = msgp.AppendUint64(o, z.Buffers) + } + if (zb0001Mask & 0x100) == 0 { // if not omitted + // string "swap_space_total" + o = append(o, 0xb0, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c) + o = msgp.AppendUint64(o, z.SwapSpaceTotal) + } + if (zb0001Mask & 0x200) == 0 { // if not omitted + // string "swap_space_free" + o = append(o, 0xaf, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x66, 0x72, 0x65, 0x65) + o = msgp.AppendUint64(o, z.SwapSpaceFree) + } + if (zb0001Mask & 0x400) == 0 { // if not omitted + // string "limit" + o = append(o, 0xa5, 0x6c, 0x69, 0x6d, 0x69, 0x74) + o = msgp.AppendUint64(o, z.Limit) + } } return } @@ -3596,219 +3600,220 @@ func (z *Metrics) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - if (zb0001Mask & 0x1) == 0 { // if not omitted - // write "scanner" - err = en.Append(0xa7, 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x72) - if err != nil { - return - } - if z.Scanner == nil { - err = en.WriteNil() + + // skip if no fields are to be emitted + if zb0001Len != 0 { + if (zb0001Mask & 0x1) == 0 { // if not omitted + // write "scanner" + err = en.Append(0xa7, 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x72) if err != nil { return } - } else { - err = z.Scanner.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "Scanner") - return + if z.Scanner == nil { + err = en.WriteNil() + if err != nil { + return + } + } else { + err = z.Scanner.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "Scanner") + return + } } } - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // write "disk" - err = en.Append(0xa4, 0x64, 0x69, 0x73, 0x6b) - if err != nil { - return - } - if z.Disk == nil { - err = en.WriteNil() + if (zb0001Mask & 0x2) == 0 { // if not omitted + // write "disk" + err = en.Append(0xa4, 0x64, 0x69, 0x73, 0x6b) if err != nil { return } - } else { - err = z.Disk.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "Disk") - return + if z.Disk == nil { + err = en.WriteNil() + if err != nil { + return + } + } else { + err = z.Disk.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "Disk") + return + } } } - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // write "os" - err = en.Append(0xa2, 0x6f, 0x73) - if err != nil { - return - } - if z.OS == nil { - err = en.WriteNil() + if (zb0001Mask & 0x4) == 0 { // if not omitted + // write "os" + err = en.Append(0xa2, 0x6f, 0x73) if err != nil { return } - } else { - err = z.OS.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "OS") - return + if z.OS == nil { + err = en.WriteNil() + if err != nil { + return + } + } else { + err = z.OS.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "OS") + return + } } } - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // write "batchJobs" - err = en.Append(0xa9, 0x62, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x73) - if err != nil { - return - } - if z.BatchJobs == nil { - err = en.WriteNil() + if (zb0001Mask & 0x8) == 0 { // if not omitted + // write "batchJobs" + err = en.Append(0xa9, 0x62, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x73) if err != nil { return } - } else { - err = z.BatchJobs.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "BatchJobs") - return + if z.BatchJobs == nil { + err = en.WriteNil() + if err != nil { + return + } + } else { + err = z.BatchJobs.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "BatchJobs") + return + } } } - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // write "siteResync" - err = en.Append(0xaa, 0x73, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63) - if err != nil { - return - } - if z.SiteResync == nil { - err = en.WriteNil() + if (zb0001Mask & 0x10) == 0 { // if not omitted + // write "siteResync" + err = en.Append(0xaa, 0x73, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63) if err != nil { return } - } else { - err = z.SiteResync.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "SiteResync") - return + if z.SiteResync == nil { + err = en.WriteNil() + if err != nil { + return + } + } else { + err = z.SiteResync.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "SiteResync") + return + } } } - } - if (zb0001Mask & 0x20) == 0 { // if not omitted - // write "net" - err = en.Append(0xa3, 0x6e, 0x65, 0x74) - if err != nil { - return - } - if z.Net == nil { - err = en.WriteNil() + if (zb0001Mask & 0x20) == 0 { // if not omitted + // write "net" + err = en.Append(0xa3, 0x6e, 0x65, 0x74) if err != nil { return } - } else { - // map header, size 3 - // write "collected" - err = en.Append(0x83, 0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) - if err != nil { - return - } - err = en.WriteTime(z.Net.CollectedAt) - if err != nil { - err = msgp.WrapError(err, "Net", "CollectedAt") - return - } - // write "interfaceName" - err = en.Append(0xad, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65) - if err != nil { - return + if z.Net == nil { + err = en.WriteNil() + if err != nil { + return + } + } else { + // map header, size 3 + // write "collected" + err = en.Append(0x83, 0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) + if err != nil { + return + } + err = en.WriteTime(z.Net.CollectedAt) + if err != nil { + err = msgp.WrapError(err, "Net", "CollectedAt") + return + } + // write "interfaceName" + err = en.Append(0xad, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65) + if err != nil { + return + } + err = en.WriteString(z.Net.InterfaceName) + if err != nil { + err = msgp.WrapError(err, "Net", "InterfaceName") + return + } + // write "netstats" + err = en.Append(0xa8, 0x6e, 0x65, 0x74, 0x73, 0x74, 0x61, 0x74, 0x73) + if err != nil { + return + } + err = (*procfsNetDevLine)(&z.Net.NetStats).EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "Net", "NetStats") + return + } } - err = en.WriteString(z.Net.InterfaceName) + } + if (zb0001Mask & 0x40) == 0 { // if not omitted + // write "mem" + err = en.Append(0xa3, 0x6d, 0x65, 0x6d) if err != nil { - err = msgp.WrapError(err, "Net", "InterfaceName") return } - // write "netstats" - err = en.Append(0xa8, 0x6e, 0x65, 0x74, 0x73, 0x74, 0x61, 0x74, 0x73) - if err != nil { - return - } - err = (*procfsNetDevLine)(&z.Net.NetStats).EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "Net", "NetStats") - return - } - } - } - if (zb0001Mask & 0x40) == 0 { // if not omitted - // write "mem" - err = en.Append(0xa3, 0x6d, 0x65, 0x6d) - if err != nil { - return - } - if z.Mem == nil { - err = en.WriteNil() - if err != nil { - return - } - } else { - // map header, size 2 - // write "collected" - err = en.Append(0x82, 0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) - if err != nil { - return - } - err = en.WriteTime(z.Mem.CollectedAt) - if err != nil { - err = msgp.WrapError(err, "Mem", "CollectedAt") - return - } - // write "memInfo" - err = en.Append(0xa7, 0x6d, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f) - if err != nil { - return - } - err = z.Mem.Info.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "Mem", "Info") - return + if z.Mem == nil { + err = en.WriteNil() + if err != nil { + return + } + } else { + // map header, size 2 + // write "collected" + err = en.Append(0x82, 0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) + if err != nil { + return + } + err = en.WriteTime(z.Mem.CollectedAt) + if err != nil { + err = msgp.WrapError(err, "Mem", "CollectedAt") + return + } + // write "memInfo" + err = en.Append(0xa7, 0x6d, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f) + if err != nil { + return + } + err = z.Mem.Info.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "Mem", "Info") + return + } } } - } - if (zb0001Mask & 0x80) == 0 { // if not omitted - // write "cpu" - err = en.Append(0xa3, 0x63, 0x70, 0x75) - if err != nil { - return - } - if z.CPU == nil { - err = en.WriteNil() + if (zb0001Mask & 0x80) == 0 { // if not omitted + // write "cpu" + err = en.Append(0xa3, 0x63, 0x70, 0x75) if err != nil { return } - } else { - err = z.CPU.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "CPU") - return + if z.CPU == nil { + err = en.WriteNil() + if err != nil { + return + } + } else { + err = z.CPU.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "CPU") + return + } } } - } - if (zb0001Mask & 0x100) == 0 { // if not omitted - // write "rpc" - err = en.Append(0xa3, 0x72, 0x70, 0x63) - if err != nil { - return - } - if z.RPC == nil { - err = en.WriteNil() + if (zb0001Mask & 0x100) == 0 { // if not omitted + // write "rpc" + err = en.Append(0xa3, 0x72, 0x70, 0x63) if err != nil { return } - } else { - err = z.RPC.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "RPC") - return + if z.RPC == nil { + err = en.WriteNil() + if err != nil { + return + } + } else { + err = z.RPC.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "RPC") + return + } } } } @@ -3860,138 +3865,139 @@ func (z *Metrics) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } - if (zb0001Mask & 0x1) == 0 { // if not omitted - // string "scanner" - o = append(o, 0xa7, 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x72) - if z.Scanner == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.Scanner.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "Scanner") - return + + // skip if no fields are to be emitted + if zb0001Len != 0 { + if (zb0001Mask & 0x1) == 0 { // if not omitted + // string "scanner" + o = append(o, 0xa7, 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x72) + if z.Scanner == nil { + o = msgp.AppendNil(o) + } else { + o, err = z.Scanner.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "Scanner") + return + } } } - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // string "disk" - o = append(o, 0xa4, 0x64, 0x69, 0x73, 0x6b) - if z.Disk == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.Disk.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "Disk") - return + if (zb0001Mask & 0x2) == 0 { // if not omitted + // string "disk" + o = append(o, 0xa4, 0x64, 0x69, 0x73, 0x6b) + if z.Disk == nil { + o = msgp.AppendNil(o) + } else { + o, err = z.Disk.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "Disk") + return + } } } - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // string "os" - o = append(o, 0xa2, 0x6f, 0x73) - if z.OS == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.OS.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "OS") - return + if (zb0001Mask & 0x4) == 0 { // if not omitted + // string "os" + o = append(o, 0xa2, 0x6f, 0x73) + if z.OS == nil { + o = msgp.AppendNil(o) + } else { + o, err = z.OS.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "OS") + return + } } } - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // string "batchJobs" - o = append(o, 0xa9, 0x62, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x73) - if z.BatchJobs == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.BatchJobs.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "BatchJobs") - return + if (zb0001Mask & 0x8) == 0 { // if not omitted + // string "batchJobs" + o = append(o, 0xa9, 0x62, 0x61, 0x74, 0x63, 0x68, 0x4a, 0x6f, 0x62, 0x73) + if z.BatchJobs == nil { + o = msgp.AppendNil(o) + } else { + o, err = z.BatchJobs.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "BatchJobs") + return + } } } - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // string "siteResync" - o = append(o, 0xaa, 0x73, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63) - if z.SiteResync == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.SiteResync.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "SiteResync") - return + if (zb0001Mask & 0x10) == 0 { // if not omitted + // string "siteResync" + o = append(o, 0xaa, 0x73, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63) + if z.SiteResync == nil { + o = msgp.AppendNil(o) + } else { + o, err = z.SiteResync.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "SiteResync") + return + } } } - } - if (zb0001Mask & 0x20) == 0 { // if not omitted - // string "net" - o = append(o, 0xa3, 0x6e, 0x65, 0x74) - if z.Net == nil { - o = msgp.AppendNil(o) - } else { - // map header, size 3 - // string "collected" - o = append(o, 0x83, 0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) - o = msgp.AppendTime(o, z.Net.CollectedAt) - // string "interfaceName" - o = append(o, 0xad, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65) - o = msgp.AppendString(o, z.Net.InterfaceName) - // string "netstats" - o = append(o, 0xa8, 0x6e, 0x65, 0x74, 0x73, 0x74, 0x61, 0x74, 0x73) - o, err = (*procfsNetDevLine)(&z.Net.NetStats).MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "Net", "NetStats") - return + if (zb0001Mask & 0x20) == 0 { // if not omitted + // string "net" + o = append(o, 0xa3, 0x6e, 0x65, 0x74) + if z.Net == nil { + o = msgp.AppendNil(o) + } else { + // map header, size 3 + // string "collected" + o = append(o, 0x83, 0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) + o = msgp.AppendTime(o, z.Net.CollectedAt) + // string "interfaceName" + o = append(o, 0xad, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65) + o = msgp.AppendString(o, z.Net.InterfaceName) + // string "netstats" + o = append(o, 0xa8, 0x6e, 0x65, 0x74, 0x73, 0x74, 0x61, 0x74, 0x73) + o, err = (*procfsNetDevLine)(&z.Net.NetStats).MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "Net", "NetStats") + return + } } } - } - if (zb0001Mask & 0x40) == 0 { // if not omitted - // string "mem" - o = append(o, 0xa3, 0x6d, 0x65, 0x6d) - if z.Mem == nil { - o = msgp.AppendNil(o) - } else { - // map header, size 2 - // string "collected" - o = append(o, 0x82, 0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) - o = msgp.AppendTime(o, z.Mem.CollectedAt) - // string "memInfo" - o = append(o, 0xa7, 0x6d, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f) - o, err = z.Mem.Info.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "Mem", "Info") - return + if (zb0001Mask & 0x40) == 0 { // if not omitted + // string "mem" + o = append(o, 0xa3, 0x6d, 0x65, 0x6d) + if z.Mem == nil { + o = msgp.AppendNil(o) + } else { + // map header, size 2 + // string "collected" + o = append(o, 0x82, 0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) + o = msgp.AppendTime(o, z.Mem.CollectedAt) + // string "memInfo" + o = append(o, 0xa7, 0x6d, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f) + o, err = z.Mem.Info.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "Mem", "Info") + return + } } } - } - if (zb0001Mask & 0x80) == 0 { // if not omitted - // string "cpu" - o = append(o, 0xa3, 0x63, 0x70, 0x75) - if z.CPU == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.CPU.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "CPU") - return + if (zb0001Mask & 0x80) == 0 { // if not omitted + // string "cpu" + o = append(o, 0xa3, 0x63, 0x70, 0x75) + if z.CPU == nil { + o = msgp.AppendNil(o) + } else { + o, err = z.CPU.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "CPU") + return + } } } - } - if (zb0001Mask & 0x100) == 0 { // if not omitted - // string "rpc" - o = append(o, 0xa3, 0x72, 0x70, 0x63) - if z.RPC == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.RPC.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "RPC") - return + if (zb0001Mask & 0x100) == 0 { // if not omitted + // string "rpc" + o = append(o, 0xa3, 0x72, 0x70, 0x63) + if z.RPC == nil { + o = msgp.AppendNil(o) + } else { + o, err = z.RPC.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "RPC") + return + } } } } @@ -5007,11 +5013,10 @@ func (z *OSMetrics) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0003Mask != 0x1 { - if (zb0003Mask & 0x1) == 0 { - z.LastMinute.Operations = nil - } + if (zb0003Mask & 0x1) == 0 { + z.LastMinute.Operations = nil } + default: err = dc.Skip() if err != nil { @@ -5021,11 +5026,10 @@ func (z *OSMetrics) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { - if (zb0001Mask & 0x1) == 0 { - z.LifeTimeOps = nil - } + if (zb0001Mask & 0x1) == 0 { + z.LifeTimeOps = nil } + return } @@ -5044,83 +5048,84 @@ func (z *OSMetrics) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - // write "collected" - err = en.Append(0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) - if err != nil { - return - } - err = en.WriteTime(z.CollectedAt) - if err != nil { - err = msgp.WrapError(err, "CollectedAt") - return - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // write "life_time_ops" - err = en.Append(0xad, 0x6c, 0x69, 0x66, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x70, 0x73) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // write "collected" + err = en.Append(0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) if err != nil { return } - err = en.WriteMapHeader(uint32(len(z.LifeTimeOps))) + err = en.WriteTime(z.CollectedAt) if err != nil { - err = msgp.WrapError(err, "LifeTimeOps") + err = msgp.WrapError(err, "CollectedAt") return } - for za0001, za0002 := range z.LifeTimeOps { - err = en.WriteString(za0001) + if (zb0001Mask & 0x2) == 0 { // if not omitted + // write "life_time_ops" + err = en.Append(0xad, 0x6c, 0x69, 0x66, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x70, 0x73) if err != nil { - err = msgp.WrapError(err, "LifeTimeOps") return } - err = en.WriteUint64(za0002) + err = en.WriteMapHeader(uint32(len(z.LifeTimeOps))) if err != nil { - err = msgp.WrapError(err, "LifeTimeOps", za0001) + err = msgp.WrapError(err, "LifeTimeOps") return } + for za0001, za0002 := range z.LifeTimeOps { + err = en.WriteString(za0001) + if err != nil { + err = msgp.WrapError(err, "LifeTimeOps") + return + } + err = en.WriteUint64(za0002) + if err != nil { + err = msgp.WrapError(err, "LifeTimeOps", za0001) + return + } + } } - } - // write "last_minute" - err = en.Append(0xab, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65) - if err != nil { - return - } - // check for omitted fields - zb0002Len := uint32(1) - var zb0002Mask uint8 /* 1 bits */ - _ = zb0002Mask - if z.LastMinute.Operations == nil { - zb0002Len-- - zb0002Mask |= 0x1 - } - // variable map header, size zb0002Len - err = en.Append(0x80 | uint8(zb0002Len)) - if err != nil { - return - } - if (zb0002Mask & 0x1) == 0 { // if not omitted - // write "operations" - err = en.Append(0xaa, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73) + // write "last_minute" + err = en.Append(0xab, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65) if err != nil { return } - err = en.WriteMapHeader(uint32(len(z.LastMinute.Operations))) + // check for omitted fields + zb0002Len := uint32(1) + var zb0002Mask uint8 /* 1 bits */ + _ = zb0002Mask + if z.LastMinute.Operations == nil { + zb0002Len-- + zb0002Mask |= 0x1 + } + // variable map header, size zb0002Len + err = en.Append(0x80 | uint8(zb0002Len)) if err != nil { - err = msgp.WrapError(err, "LastMinute", "Operations") return } - for za0003, za0004 := range z.LastMinute.Operations { - err = en.WriteString(za0003) + if (zb0002Mask & 0x1) == 0 { // if not omitted + // write "operations" + err = en.Append(0xaa, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73) if err != nil { - err = msgp.WrapError(err, "LastMinute", "Operations") return } - err = za0004.EncodeMsg(en) + err = en.WriteMapHeader(uint32(len(z.LastMinute.Operations))) if err != nil { - err = msgp.WrapError(err, "LastMinute", "Operations", za0003) + err = msgp.WrapError(err, "LastMinute", "Operations") return } + for za0003, za0004 := range z.LastMinute.Operations { + err = en.WriteString(za0003) + if err != nil { + err = msgp.WrapError(err, "LastMinute", "Operations") + return + } + err = za0004.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "LastMinute", "Operations", za0003) + return + } + } } } return @@ -5139,43 +5144,44 @@ func (z *OSMetrics) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } - // string "collected" - o = append(o, 0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) - o = msgp.AppendTime(o, z.CollectedAt) - if (zb0001Mask & 0x2) == 0 { // if not omitted - // string "life_time_ops" - o = append(o, 0xad, 0x6c, 0x69, 0x66, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x70, 0x73) - o = msgp.AppendMapHeader(o, uint32(len(z.LifeTimeOps))) - for za0001, za0002 := range z.LifeTimeOps { - o = msgp.AppendString(o, za0001) - o = msgp.AppendUint64(o, za0002) - } - } - // string "last_minute" - o = append(o, 0xab, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65) - // check for omitted fields - zb0002Len := uint32(1) - var zb0002Mask uint8 /* 1 bits */ - _ = zb0002Mask - if z.LastMinute.Operations == nil { - zb0002Len-- - zb0002Mask |= 0x1 - } - // variable map header, size zb0002Len - o = append(o, 0x80|uint8(zb0002Len)) - if (zb0002Mask & 0x1) == 0 { // if not omitted - // string "operations" - o = append(o, 0xaa, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73) - o = msgp.AppendMapHeader(o, uint32(len(z.LastMinute.Operations))) - for za0003, za0004 := range z.LastMinute.Operations { - o = msgp.AppendString(o, za0003) - o, err = za0004.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "LastMinute", "Operations", za0003) - return + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // string "collected" + o = append(o, 0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) + o = msgp.AppendTime(o, z.CollectedAt) + if (zb0001Mask & 0x2) == 0 { // if not omitted + // string "life_time_ops" + o = append(o, 0xad, 0x6c, 0x69, 0x66, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x70, 0x73) + o = msgp.AppendMapHeader(o, uint32(len(z.LifeTimeOps))) + for za0001, za0002 := range z.LifeTimeOps { + o = msgp.AppendString(o, za0001) + o = msgp.AppendUint64(o, za0002) + } + } + // string "last_minute" + o = append(o, 0xab, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65) + // check for omitted fields + zb0002Len := uint32(1) + var zb0002Mask uint8 /* 1 bits */ + _ = zb0002Mask + if z.LastMinute.Operations == nil { + zb0002Len-- + zb0002Mask |= 0x1 + } + // variable map header, size zb0002Len + o = append(o, 0x80|uint8(zb0002Len)) + if (zb0002Mask & 0x1) == 0 { // if not omitted + // string "operations" + o = append(o, 0xaa, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73) + o = msgp.AppendMapHeader(o, uint32(len(z.LastMinute.Operations))) + for za0003, za0004 := range z.LastMinute.Operations { + o = msgp.AppendString(o, za0003) + o, err = za0004.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "LastMinute", "Operations", za0003) + return + } } } } @@ -5296,11 +5302,10 @@ func (z *OSMetrics) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0003Mask != 0x1 { - if (zb0003Mask & 0x1) == 0 { - z.LastMinute.Operations = nil - } + if (zb0003Mask & 0x1) == 0 { + z.LastMinute.Operations = nil } + default: bts, err = msgp.Skip(bts) if err != nil { @@ -5310,11 +5315,10 @@ func (z *OSMetrics) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { - if (zb0001Mask & 0x1) == 0 { - z.LifeTimeOps = nil - } + if (zb0001Mask & 0x1) == 0 { + z.LifeTimeOps = nil } + o = bts return } @@ -5549,205 +5553,206 @@ func (z *RPCMetrics) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - // write "collectedAt" - err = en.Append(0xab, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x41, 0x74) - if err != nil { - return - } - err = en.WriteTime(z.CollectedAt) - if err != nil { - err = msgp.WrapError(err, "CollectedAt") - return - } - // write "connected" - err = en.Append(0xa9, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64) - if err != nil { - return - } - err = en.WriteInt(z.Connected) - if err != nil { - err = msgp.WrapError(err, "Connected") - return - } - // write "reconnectCount" - err = en.Append(0xae, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74) - if err != nil { - return - } - err = en.WriteInt(z.ReconnectCount) - if err != nil { - err = msgp.WrapError(err, "ReconnectCount") - return - } - // write "disconnected" - err = en.Append(0xac, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64) - if err != nil { - return - } - err = en.WriteInt(z.Disconnected) - if err != nil { - err = msgp.WrapError(err, "Disconnected") - return - } - // write "outgoingStreams" - err = en.Append(0xaf, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73) - if err != nil { - return - } - err = en.WriteInt(z.OutgoingStreams) - if err != nil { - err = msgp.WrapError(err, "OutgoingStreams") - return - } - // write "incomingStreams" - err = en.Append(0xaf, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73) - if err != nil { - return - } - err = en.WriteInt(z.IncomingStreams) - if err != nil { - err = msgp.WrapError(err, "IncomingStreams") - return - } - // write "outgoingBytes" - err = en.Append(0xad, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73) - if err != nil { - return - } - err = en.WriteInt64(z.OutgoingBytes) - if err != nil { - err = msgp.WrapError(err, "OutgoingBytes") - return - } - // write "incomingBytes" - err = en.Append(0xad, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73) - if err != nil { - return - } - err = en.WriteInt64(z.IncomingBytes) - if err != nil { - err = msgp.WrapError(err, "IncomingBytes") - return - } - // write "outgoingMessages" - err = en.Append(0xb0, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73) - if err != nil { - return - } - err = en.WriteInt64(z.OutgoingMessages) - if err != nil { - err = msgp.WrapError(err, "OutgoingMessages") - return - } - // write "incomingMessages" - err = en.Append(0xb0, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73) - if err != nil { - return - } - err = en.WriteInt64(z.IncomingMessages) - if err != nil { - err = msgp.WrapError(err, "IncomingMessages") - return - } - // write "outQueue" - err = en.Append(0xa8, 0x6f, 0x75, 0x74, 0x51, 0x75, 0x65, 0x75, 0x65) - if err != nil { - return - } - err = en.WriteInt(z.OutQueue) - if err != nil { - err = msgp.WrapError(err, "OutQueue") - return - } - // write "lastPongTime" - err = en.Append(0xac, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x6f, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65) - if err != nil { - return - } - err = en.WriteTime(z.LastPongTime) - if err != nil { - err = msgp.WrapError(err, "LastPongTime") - return - } - // write "lastPingMS" - err = en.Append(0xaa, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x69, 0x6e, 0x67, 0x4d, 0x53) - if err != nil { - return - } - err = en.WriteFloat64(z.LastPingMS) - if err != nil { - err = msgp.WrapError(err, "LastPingMS") - return - } - // write "maxPingDurMS" - err = en.Append(0xac, 0x6d, 0x61, 0x78, 0x50, 0x69, 0x6e, 0x67, 0x44, 0x75, 0x72, 0x4d, 0x53) - if err != nil { - return - } - err = en.WriteFloat64(z.MaxPingDurMS) - if err != nil { - err = msgp.WrapError(err, "MaxPingDurMS") - return - } - // write "lastConnectTime" - err = en.Append(0xaf, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65) - if err != nil { - return - } - err = en.WriteTime(z.LastConnectTime) - if err != nil { - err = msgp.WrapError(err, "LastConnectTime") - return - } - if (zb0001Mask & 0x8000) == 0 { // if not omitted - // write "byDestination" - err = en.Append(0xad, 0x62, 0x79, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // write "collectedAt" + err = en.Append(0xab, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x41, 0x74) if err != nil { return } - err = en.WriteMapHeader(uint32(len(z.ByDestination))) + err = en.WriteTime(z.CollectedAt) if err != nil { - err = msgp.WrapError(err, "ByDestination") + err = msgp.WrapError(err, "CollectedAt") return } - for za0001, za0002 := range z.ByDestination { - err = en.WriteString(za0001) - if err != nil { - err = msgp.WrapError(err, "ByDestination") - return - } - err = za0002.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "ByDestination", za0001) - return - } + // write "connected" + err = en.Append(0xa9, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64) + if err != nil { + return } - } - if (zb0001Mask & 0x10000) == 0 { // if not omitted - // write "byCaller" - err = en.Append(0xa8, 0x62, 0x79, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72) + err = en.WriteInt(z.Connected) if err != nil { + err = msgp.WrapError(err, "Connected") return } - err = en.WriteMapHeader(uint32(len(z.ByCaller))) + // write "reconnectCount" + err = en.Append(0xae, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74) if err != nil { - err = msgp.WrapError(err, "ByCaller") return } - for za0003, za0004 := range z.ByCaller { - err = en.WriteString(za0003) + err = en.WriteInt(z.ReconnectCount) + if err != nil { + err = msgp.WrapError(err, "ReconnectCount") + return + } + // write "disconnected" + err = en.Append(0xac, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64) + if err != nil { + return + } + err = en.WriteInt(z.Disconnected) + if err != nil { + err = msgp.WrapError(err, "Disconnected") + return + } + // write "outgoingStreams" + err = en.Append(0xaf, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73) + if err != nil { + return + } + err = en.WriteInt(z.OutgoingStreams) + if err != nil { + err = msgp.WrapError(err, "OutgoingStreams") + return + } + // write "incomingStreams" + err = en.Append(0xaf, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73) + if err != nil { + return + } + err = en.WriteInt(z.IncomingStreams) + if err != nil { + err = msgp.WrapError(err, "IncomingStreams") + return + } + // write "outgoingBytes" + err = en.Append(0xad, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73) + if err != nil { + return + } + err = en.WriteInt64(z.OutgoingBytes) + if err != nil { + err = msgp.WrapError(err, "OutgoingBytes") + return + } + // write "incomingBytes" + err = en.Append(0xad, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73) + if err != nil { + return + } + err = en.WriteInt64(z.IncomingBytes) + if err != nil { + err = msgp.WrapError(err, "IncomingBytes") + return + } + // write "outgoingMessages" + err = en.Append(0xb0, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73) + if err != nil { + return + } + err = en.WriteInt64(z.OutgoingMessages) + if err != nil { + err = msgp.WrapError(err, "OutgoingMessages") + return + } + // write "incomingMessages" + err = en.Append(0xb0, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73) + if err != nil { + return + } + err = en.WriteInt64(z.IncomingMessages) + if err != nil { + err = msgp.WrapError(err, "IncomingMessages") + return + } + // write "outQueue" + err = en.Append(0xa8, 0x6f, 0x75, 0x74, 0x51, 0x75, 0x65, 0x75, 0x65) + if err != nil { + return + } + err = en.WriteInt(z.OutQueue) + if err != nil { + err = msgp.WrapError(err, "OutQueue") + return + } + // write "lastPongTime" + err = en.Append(0xac, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x6f, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65) + if err != nil { + return + } + err = en.WriteTime(z.LastPongTime) + if err != nil { + err = msgp.WrapError(err, "LastPongTime") + return + } + // write "lastPingMS" + err = en.Append(0xaa, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x69, 0x6e, 0x67, 0x4d, 0x53) + if err != nil { + return + } + err = en.WriteFloat64(z.LastPingMS) + if err != nil { + err = msgp.WrapError(err, "LastPingMS") + return + } + // write "maxPingDurMS" + err = en.Append(0xac, 0x6d, 0x61, 0x78, 0x50, 0x69, 0x6e, 0x67, 0x44, 0x75, 0x72, 0x4d, 0x53) + if err != nil { + return + } + err = en.WriteFloat64(z.MaxPingDurMS) + if err != nil { + err = msgp.WrapError(err, "MaxPingDurMS") + return + } + // write "lastConnectTime" + err = en.Append(0xaf, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65) + if err != nil { + return + } + err = en.WriteTime(z.LastConnectTime) + if err != nil { + err = msgp.WrapError(err, "LastConnectTime") + return + } + if (zb0001Mask & 0x8000) == 0 { // if not omitted + // write "byDestination" + err = en.Append(0xad, 0x62, 0x79, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e) + if err != nil { + return + } + err = en.WriteMapHeader(uint32(len(z.ByDestination))) + if err != nil { + err = msgp.WrapError(err, "ByDestination") + return + } + for za0001, za0002 := range z.ByDestination { + err = en.WriteString(za0001) + if err != nil { + err = msgp.WrapError(err, "ByDestination") + return + } + err = za0002.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "ByDestination", za0001) + return + } + } + } + if (zb0001Mask & 0x10000) == 0 { // if not omitted + // write "byCaller" + err = en.Append(0xa8, 0x62, 0x79, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72) if err != nil { - err = msgp.WrapError(err, "ByCaller") return } - err = za0004.EncodeMsg(en) + err = en.WriteMapHeader(uint32(len(z.ByCaller))) if err != nil { - err = msgp.WrapError(err, "ByCaller", za0003) + err = msgp.WrapError(err, "ByCaller") return } + for za0003, za0004 := range z.ByCaller { + err = en.WriteString(za0003) + if err != nil { + err = msgp.WrapError(err, "ByCaller") + return + } + err = za0004.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "ByCaller", za0003) + return + } + } } } return @@ -5770,77 +5775,78 @@ func (z *RPCMetrics) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = msgp.AppendMapHeader(o, zb0001Len) - if zb0001Len == 0 { - return - } - // string "collectedAt" - o = append(o, 0xab, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x41, 0x74) - o = msgp.AppendTime(o, z.CollectedAt) - // string "connected" - o = append(o, 0xa9, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64) - o = msgp.AppendInt(o, z.Connected) - // string "reconnectCount" - o = append(o, 0xae, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74) - o = msgp.AppendInt(o, z.ReconnectCount) - // string "disconnected" - o = append(o, 0xac, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64) - o = msgp.AppendInt(o, z.Disconnected) - // string "outgoingStreams" - o = append(o, 0xaf, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73) - o = msgp.AppendInt(o, z.OutgoingStreams) - // string "incomingStreams" - o = append(o, 0xaf, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73) - o = msgp.AppendInt(o, z.IncomingStreams) - // string "outgoingBytes" - o = append(o, 0xad, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73) - o = msgp.AppendInt64(o, z.OutgoingBytes) - // string "incomingBytes" - o = append(o, 0xad, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73) - o = msgp.AppendInt64(o, z.IncomingBytes) - // string "outgoingMessages" - o = append(o, 0xb0, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73) - o = msgp.AppendInt64(o, z.OutgoingMessages) - // string "incomingMessages" - o = append(o, 0xb0, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73) - o = msgp.AppendInt64(o, z.IncomingMessages) - // string "outQueue" - o = append(o, 0xa8, 0x6f, 0x75, 0x74, 0x51, 0x75, 0x65, 0x75, 0x65) - o = msgp.AppendInt(o, z.OutQueue) - // string "lastPongTime" - o = append(o, 0xac, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x6f, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65) - o = msgp.AppendTime(o, z.LastPongTime) - // string "lastPingMS" - o = append(o, 0xaa, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x69, 0x6e, 0x67, 0x4d, 0x53) - o = msgp.AppendFloat64(o, z.LastPingMS) - // string "maxPingDurMS" - o = append(o, 0xac, 0x6d, 0x61, 0x78, 0x50, 0x69, 0x6e, 0x67, 0x44, 0x75, 0x72, 0x4d, 0x53) - o = msgp.AppendFloat64(o, z.MaxPingDurMS) - // string "lastConnectTime" - o = append(o, 0xaf, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65) - o = msgp.AppendTime(o, z.LastConnectTime) - if (zb0001Mask & 0x8000) == 0 { // if not omitted - // string "byDestination" - o = append(o, 0xad, 0x62, 0x79, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e) - o = msgp.AppendMapHeader(o, uint32(len(z.ByDestination))) - for za0001, za0002 := range z.ByDestination { - o = msgp.AppendString(o, za0001) - o, err = za0002.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "ByDestination", za0001) - return + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // string "collectedAt" + o = append(o, 0xab, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x41, 0x74) + o = msgp.AppendTime(o, z.CollectedAt) + // string "connected" + o = append(o, 0xa9, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64) + o = msgp.AppendInt(o, z.Connected) + // string "reconnectCount" + o = append(o, 0xae, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74) + o = msgp.AppendInt(o, z.ReconnectCount) + // string "disconnected" + o = append(o, 0xac, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64) + o = msgp.AppendInt(o, z.Disconnected) + // string "outgoingStreams" + o = append(o, 0xaf, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73) + o = msgp.AppendInt(o, z.OutgoingStreams) + // string "incomingStreams" + o = append(o, 0xaf, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73) + o = msgp.AppendInt(o, z.IncomingStreams) + // string "outgoingBytes" + o = append(o, 0xad, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73) + o = msgp.AppendInt64(o, z.OutgoingBytes) + // string "incomingBytes" + o = append(o, 0xad, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73) + o = msgp.AppendInt64(o, z.IncomingBytes) + // string "outgoingMessages" + o = append(o, 0xb0, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73) + o = msgp.AppendInt64(o, z.OutgoingMessages) + // string "incomingMessages" + o = append(o, 0xb0, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73) + o = msgp.AppendInt64(o, z.IncomingMessages) + // string "outQueue" + o = append(o, 0xa8, 0x6f, 0x75, 0x74, 0x51, 0x75, 0x65, 0x75, 0x65) + o = msgp.AppendInt(o, z.OutQueue) + // string "lastPongTime" + o = append(o, 0xac, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x6f, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65) + o = msgp.AppendTime(o, z.LastPongTime) + // string "lastPingMS" + o = append(o, 0xaa, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x69, 0x6e, 0x67, 0x4d, 0x53) + o = msgp.AppendFloat64(o, z.LastPingMS) + // string "maxPingDurMS" + o = append(o, 0xac, 0x6d, 0x61, 0x78, 0x50, 0x69, 0x6e, 0x67, 0x44, 0x75, 0x72, 0x4d, 0x53) + o = msgp.AppendFloat64(o, z.MaxPingDurMS) + // string "lastConnectTime" + o = append(o, 0xaf, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65) + o = msgp.AppendTime(o, z.LastConnectTime) + if (zb0001Mask & 0x8000) == 0 { // if not omitted + // string "byDestination" + o = append(o, 0xad, 0x62, 0x79, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e) + o = msgp.AppendMapHeader(o, uint32(len(z.ByDestination))) + for za0001, za0002 := range z.ByDestination { + o = msgp.AppendString(o, za0001) + o, err = za0002.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "ByDestination", za0001) + return + } } } - } - if (zb0001Mask & 0x10000) == 0 { // if not omitted - // string "byCaller" - o = append(o, 0xa8, 0x62, 0x79, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72) - o = msgp.AppendMapHeader(o, uint32(len(z.ByCaller))) - for za0003, za0004 := range z.ByCaller { - o = msgp.AppendString(o, za0003) - o, err = za0004.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "ByCaller", za0003) - return + if (zb0001Mask & 0x10000) == 0 { // if not omitted + // string "byCaller" + o = append(o, 0xa8, 0x62, 0x79, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72) + o = msgp.AppendMapHeader(o, uint32(len(z.ByCaller))) + for za0003, za0004 := range z.ByCaller { + o = msgp.AppendString(o, za0003) + o, err = za0004.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "ByCaller", za0003) + return + } } } } @@ -6238,112 +6244,113 @@ func (z *RealtimeMetrics) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - if (zb0001Mask & 0x1) == 0 { // if not omitted - // write "errors" - err = en.Append(0xa6, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + if (zb0001Mask & 0x1) == 0 { // if not omitted + // write "errors" + err = en.Append(0xa6, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73) + if err != nil { + return + } + err = en.WriteArrayHeader(uint32(len(z.Errors))) + if err != nil { + err = msgp.WrapError(err, "Errors") + return + } + for za0001 := range z.Errors { + err = en.WriteString(z.Errors[za0001]) + if err != nil { + err = msgp.WrapError(err, "Errors", za0001) + return + } + } + } + // write "hosts" + err = en.Append(0xa5, 0x68, 0x6f, 0x73, 0x74, 0x73) if err != nil { return } - err = en.WriteArrayHeader(uint32(len(z.Errors))) + err = en.WriteArrayHeader(uint32(len(z.Hosts))) if err != nil { - err = msgp.WrapError(err, "Errors") + err = msgp.WrapError(err, "Hosts") return } - for za0001 := range z.Errors { - err = en.WriteString(z.Errors[za0001]) + for za0002 := range z.Hosts { + err = en.WriteString(z.Hosts[za0002]) if err != nil { - err = msgp.WrapError(err, "Errors", za0001) + err = msgp.WrapError(err, "Hosts", za0002) return } } - } - // write "hosts" - err = en.Append(0xa5, 0x68, 0x6f, 0x73, 0x74, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.Hosts))) - if err != nil { - err = msgp.WrapError(err, "Hosts") - return - } - for za0002 := range z.Hosts { - err = en.WriteString(z.Hosts[za0002]) - if err != nil { - err = msgp.WrapError(err, "Hosts", za0002) - return - } - } - // write "aggregated" - err = en.Append(0xaa, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64) - if err != nil { - return - } - err = z.Aggregated.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "Aggregated") - return - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // write "by_host" - err = en.Append(0xa7, 0x62, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74) + // write "aggregated" + err = en.Append(0xaa, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64) if err != nil { return } - err = en.WriteMapHeader(uint32(len(z.ByHost))) + err = z.Aggregated.EncodeMsg(en) if err != nil { - err = msgp.WrapError(err, "ByHost") + err = msgp.WrapError(err, "Aggregated") return } - for za0003, za0004 := range z.ByHost { - err = en.WriteString(za0003) + if (zb0001Mask & 0x8) == 0 { // if not omitted + // write "by_host" + err = en.Append(0xa7, 0x62, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74) if err != nil { - err = msgp.WrapError(err, "ByHost") return } - err = za0004.EncodeMsg(en) + err = en.WriteMapHeader(uint32(len(z.ByHost))) if err != nil { - err = msgp.WrapError(err, "ByHost", za0003) + err = msgp.WrapError(err, "ByHost") return } + for za0003, za0004 := range z.ByHost { + err = en.WriteString(za0003) + if err != nil { + err = msgp.WrapError(err, "ByHost") + return + } + err = za0004.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "ByHost", za0003) + return + } + } } - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // write "by_disk" - err = en.Append(0xa7, 0x62, 0x79, 0x5f, 0x64, 0x69, 0x73, 0x6b) - if err != nil { - return - } - err = en.WriteMapHeader(uint32(len(z.ByDisk))) - if err != nil { - err = msgp.WrapError(err, "ByDisk") - return - } - for za0005, za0006 := range z.ByDisk { - err = en.WriteString(za0005) + if (zb0001Mask & 0x10) == 0 { // if not omitted + // write "by_disk" + err = en.Append(0xa7, 0x62, 0x79, 0x5f, 0x64, 0x69, 0x73, 0x6b) if err != nil { - err = msgp.WrapError(err, "ByDisk") return } - err = za0006.EncodeMsg(en) + err = en.WriteMapHeader(uint32(len(z.ByDisk))) if err != nil { - err = msgp.WrapError(err, "ByDisk", za0005) + err = msgp.WrapError(err, "ByDisk") return } + for za0005, za0006 := range z.ByDisk { + err = en.WriteString(za0005) + if err != nil { + err = msgp.WrapError(err, "ByDisk") + return + } + err = za0006.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "ByDisk", za0005) + return + } + } + } + // write "final" + err = en.Append(0xa5, 0x66, 0x69, 0x6e, 0x61, 0x6c) + if err != nil { + return + } + err = en.WriteBool(z.Final) + if err != nil { + err = msgp.WrapError(err, "Final") + return } - } - // write "final" - err = en.Append(0xa5, 0x66, 0x69, 0x6e, 0x61, 0x6c) - if err != nil { - return - } - err = en.WriteBool(z.Final) - if err != nil { - err = msgp.WrapError(err, "Final") - return } return } @@ -6369,59 +6376,60 @@ func (z *RealtimeMetrics) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } - if (zb0001Mask & 0x1) == 0 { // if not omitted - // string "errors" - o = append(o, 0xa6, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.Errors))) - for za0001 := range z.Errors { - o = msgp.AppendString(o, z.Errors[za0001]) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + if (zb0001Mask & 0x1) == 0 { // if not omitted + // string "errors" + o = append(o, 0xa6, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73) + o = msgp.AppendArrayHeader(o, uint32(len(z.Errors))) + for za0001 := range z.Errors { + o = msgp.AppendString(o, z.Errors[za0001]) + } } - } - // string "hosts" - o = append(o, 0xa5, 0x68, 0x6f, 0x73, 0x74, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.Hosts))) - for za0002 := range z.Hosts { - o = msgp.AppendString(o, z.Hosts[za0002]) - } - // string "aggregated" - o = append(o, 0xaa, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64) - o, err = z.Aggregated.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "Aggregated") - return - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // string "by_host" - o = append(o, 0xa7, 0x62, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74) - o = msgp.AppendMapHeader(o, uint32(len(z.ByHost))) - for za0003, za0004 := range z.ByHost { - o = msgp.AppendString(o, za0003) - o, err = za0004.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "ByHost", za0003) - return + // string "hosts" + o = append(o, 0xa5, 0x68, 0x6f, 0x73, 0x74, 0x73) + o = msgp.AppendArrayHeader(o, uint32(len(z.Hosts))) + for za0002 := range z.Hosts { + o = msgp.AppendString(o, z.Hosts[za0002]) + } + // string "aggregated" + o = append(o, 0xaa, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64) + o, err = z.Aggregated.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "Aggregated") + return + } + if (zb0001Mask & 0x8) == 0 { // if not omitted + // string "by_host" + o = append(o, 0xa7, 0x62, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74) + o = msgp.AppendMapHeader(o, uint32(len(z.ByHost))) + for za0003, za0004 := range z.ByHost { + o = msgp.AppendString(o, za0003) + o, err = za0004.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "ByHost", za0003) + return + } } } - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // string "by_disk" - o = append(o, 0xa7, 0x62, 0x79, 0x5f, 0x64, 0x69, 0x73, 0x6b) - o = msgp.AppendMapHeader(o, uint32(len(z.ByDisk))) - for za0005, za0006 := range z.ByDisk { - o = msgp.AppendString(o, za0005) - o, err = za0006.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "ByDisk", za0005) - return + if (zb0001Mask & 0x10) == 0 { // if not omitted + // string "by_disk" + o = append(o, 0xa7, 0x62, 0x79, 0x5f, 0x64, 0x69, 0x73, 0x6b) + o = msgp.AppendMapHeader(o, uint32(len(z.ByDisk))) + for za0005, za0006 := range z.ByDisk { + o = msgp.AppendString(o, za0005) + o, err = za0006.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "ByDisk", za0005) + return + } } } + // string "final" + o = append(o, 0xa5, 0x66, 0x69, 0x6e, 0x61, 0x6c) + o = msgp.AppendBool(o, z.Final) } - // string "final" - o = append(o, 0xa5, 0x66, 0x69, 0x6e, 0x61, 0x6c) - o = msgp.AppendBool(o, z.Final) return } @@ -7176,232 +7184,237 @@ func (z *ScannerMetrics) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - // write "collected" - err = en.Append(0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) - if err != nil { - return - } - err = en.WriteTime(z.CollectedAt) - if err != nil { - err = msgp.WrapError(err, "CollectedAt") - return - } - // write "current_cycle" - err = en.Append(0xad, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x79, 0x63, 0x6c, 0x65) - if err != nil { - return - } - err = en.WriteUint64(z.CurrentCycle) - if err != nil { - err = msgp.WrapError(err, "CurrentCycle") - return - } - // write "current_started" - err = en.Append(0xaf, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64) - if err != nil { - return - } - err = en.WriteTime(z.CurrentStarted) - if err != nil { - err = msgp.WrapError(err, "CurrentStarted") - return - } - // write "cycle_complete_times" - err = en.Append(0xb4, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.CyclesCompletedAt))) - if err != nil { - err = msgp.WrapError(err, "CyclesCompletedAt") - return - } - for za0001 := range z.CyclesCompletedAt { - err = en.WriteTime(z.CyclesCompletedAt[za0001]) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // write "collected" + err = en.Append(0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) if err != nil { - err = msgp.WrapError(err, "CyclesCompletedAt", za0001) return } - } - // write "ongoing_buckets" - err = en.Append(0xaf, 0x6f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73) - if err != nil { - return - } - err = en.WriteInt(z.OngoingBuckets) - if err != nil { - err = msgp.WrapError(err, "OngoingBuckets") - return - } - if (zb0001Mask & 0x20) == 0 { // if not omitted - // write "per_bucket_stats" - err = en.Append(0xb0, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73) + err = en.WriteTime(z.CollectedAt) if err != nil { + err = msgp.WrapError(err, "CollectedAt") return } - err = en.WriteMapHeader(uint32(len(z.PerBucketStats))) + // write "current_cycle" + err = en.Append(0xad, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x79, 0x63, 0x6c, 0x65) if err != nil { - err = msgp.WrapError(err, "PerBucketStats") return } - for za0002, za0003 := range z.PerBucketStats { - err = en.WriteString(za0002) - if err != nil { - err = msgp.WrapError(err, "PerBucketStats") - return - } - err = en.WriteArrayHeader(uint32(len(za0003))) - if err != nil { - err = msgp.WrapError(err, "PerBucketStats", za0002) - return - } - for za0004 := range za0003 { - err = za0003[za0004].EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "PerBucketStats", za0002, za0004) - return - } - } + err = en.WriteUint64(z.CurrentCycle) + if err != nil { + err = msgp.WrapError(err, "CurrentCycle") + return } - } - if (zb0001Mask & 0x40) == 0 { // if not omitted - // write "life_time_ops" - err = en.Append(0xad, 0x6c, 0x69, 0x66, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x70, 0x73) + // write "current_started" + err = en.Append(0xaf, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64) if err != nil { return } - err = en.WriteMapHeader(uint32(len(z.LifeTimeOps))) + err = en.WriteTime(z.CurrentStarted) if err != nil { - err = msgp.WrapError(err, "LifeTimeOps") + err = msgp.WrapError(err, "CurrentStarted") return } - for za0005, za0006 := range z.LifeTimeOps { - err = en.WriteString(za0005) - if err != nil { - err = msgp.WrapError(err, "LifeTimeOps") - return - } - err = en.WriteUint64(za0006) + // write "cycle_complete_times" + err = en.Append(0xb4, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73) + if err != nil { + return + } + err = en.WriteArrayHeader(uint32(len(z.CyclesCompletedAt))) + if err != nil { + err = msgp.WrapError(err, "CyclesCompletedAt") + return + } + for za0001 := range z.CyclesCompletedAt { + err = en.WriteTime(z.CyclesCompletedAt[za0001]) if err != nil { - err = msgp.WrapError(err, "LifeTimeOps", za0005) + err = msgp.WrapError(err, "CyclesCompletedAt", za0001) return } } - } - if (zb0001Mask & 0x80) == 0 { // if not omitted - // write "ilm_ops" - err = en.Append(0xa7, 0x69, 0x6c, 0x6d, 0x5f, 0x6f, 0x70, 0x73) + // write "ongoing_buckets" + err = en.Append(0xaf, 0x6f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73) if err != nil { return } - err = en.WriteMapHeader(uint32(len(z.LifeTimeILM))) + err = en.WriteInt(z.OngoingBuckets) if err != nil { - err = msgp.WrapError(err, "LifeTimeILM") + err = msgp.WrapError(err, "OngoingBuckets") return } - for za0007, za0008 := range z.LifeTimeILM { - err = en.WriteString(za0007) + if (zb0001Mask & 0x20) == 0 { // if not omitted + // write "per_bucket_stats" + err = en.Append(0xb0, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73) if err != nil { - err = msgp.WrapError(err, "LifeTimeILM") return } - err = en.WriteUint64(za0008) + err = en.WriteMapHeader(uint32(len(z.PerBucketStats))) if err != nil { - err = msgp.WrapError(err, "LifeTimeILM", za0007) + err = msgp.WrapError(err, "PerBucketStats") return } + for za0002, za0003 := range z.PerBucketStats { + err = en.WriteString(za0002) + if err != nil { + err = msgp.WrapError(err, "PerBucketStats") + return + } + err = en.WriteArrayHeader(uint32(len(za0003))) + if err != nil { + err = msgp.WrapError(err, "PerBucketStats", za0002) + return + } + for za0004 := range za0003 { + err = za0003[za0004].EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "PerBucketStats", za0002, za0004) + return + } + } + } } - } - // write "last_minute" - err = en.Append(0xab, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65) - if err != nil { - return - } - // check for omitted fields - zb0002Len := uint32(2) - var zb0002Mask uint8 /* 2 bits */ - _ = zb0002Mask - if z.LastMinute.Actions == nil { - zb0002Len-- - zb0002Mask |= 0x1 - } - if z.LastMinute.ILM == nil { - zb0002Len-- - zb0002Mask |= 0x2 - } - // variable map header, size zb0002Len - err = en.Append(0x80 | uint8(zb0002Len)) - if err != nil { - return - } - if (zb0002Mask & 0x1) == 0 { // if not omitted - // write "actions" - err = en.Append(0xa7, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73) - if err != nil { - return - } - err = en.WriteMapHeader(uint32(len(z.LastMinute.Actions))) - if err != nil { - err = msgp.WrapError(err, "LastMinute", "Actions") - return + if (zb0001Mask & 0x40) == 0 { // if not omitted + // write "life_time_ops" + err = en.Append(0xad, 0x6c, 0x69, 0x66, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x70, 0x73) + if err != nil { + return + } + err = en.WriteMapHeader(uint32(len(z.LifeTimeOps))) + if err != nil { + err = msgp.WrapError(err, "LifeTimeOps") + return + } + for za0005, za0006 := range z.LifeTimeOps { + err = en.WriteString(za0005) + if err != nil { + err = msgp.WrapError(err, "LifeTimeOps") + return + } + err = en.WriteUint64(za0006) + if err != nil { + err = msgp.WrapError(err, "LifeTimeOps", za0005) + return + } + } } - for za0009, za0010 := range z.LastMinute.Actions { - err = en.WriteString(za0009) + if (zb0001Mask & 0x80) == 0 { // if not omitted + // write "ilm_ops" + err = en.Append(0xa7, 0x69, 0x6c, 0x6d, 0x5f, 0x6f, 0x70, 0x73) if err != nil { - err = msgp.WrapError(err, "LastMinute", "Actions") return } - err = za0010.EncodeMsg(en) + err = en.WriteMapHeader(uint32(len(z.LifeTimeILM))) if err != nil { - err = msgp.WrapError(err, "LastMinute", "Actions", za0009) + err = msgp.WrapError(err, "LifeTimeILM") return } + for za0007, za0008 := range z.LifeTimeILM { + err = en.WriteString(za0007) + if err != nil { + err = msgp.WrapError(err, "LifeTimeILM") + return + } + err = en.WriteUint64(za0008) + if err != nil { + err = msgp.WrapError(err, "LifeTimeILM", za0007) + return + } + } } - } - if (zb0002Mask & 0x2) == 0 { // if not omitted - // write "ilm" - err = en.Append(0xa3, 0x69, 0x6c, 0x6d) + // write "last_minute" + err = en.Append(0xab, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65) if err != nil { return } - err = en.WriteMapHeader(uint32(len(z.LastMinute.ILM))) + // check for omitted fields + zb0002Len := uint32(2) + var zb0002Mask uint8 /* 2 bits */ + _ = zb0002Mask + if z.LastMinute.Actions == nil { + zb0002Len-- + zb0002Mask |= 0x1 + } + if z.LastMinute.ILM == nil { + zb0002Len-- + zb0002Mask |= 0x2 + } + // variable map header, size zb0002Len + err = en.Append(0x80 | uint8(zb0002Len)) if err != nil { - err = msgp.WrapError(err, "LastMinute", "ILM") return } - for za0011, za0012 := range z.LastMinute.ILM { - err = en.WriteString(za0011) - if err != nil { - err = msgp.WrapError(err, "LastMinute", "ILM") - return + + // skip if no fields are to be emitted + if zb0002Len != 0 { + if (zb0002Mask & 0x1) == 0 { // if not omitted + // write "actions" + err = en.Append(0xa7, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73) + if err != nil { + return + } + err = en.WriteMapHeader(uint32(len(z.LastMinute.Actions))) + if err != nil { + err = msgp.WrapError(err, "LastMinute", "Actions") + return + } + for za0009, za0010 := range z.LastMinute.Actions { + err = en.WriteString(za0009) + if err != nil { + err = msgp.WrapError(err, "LastMinute", "Actions") + return + } + err = za0010.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "LastMinute", "Actions", za0009) + return + } + } + } + if (zb0002Mask & 0x2) == 0 { // if not omitted + // write "ilm" + err = en.Append(0xa3, 0x69, 0x6c, 0x6d) + if err != nil { + return + } + err = en.WriteMapHeader(uint32(len(z.LastMinute.ILM))) + if err != nil { + err = msgp.WrapError(err, "LastMinute", "ILM") + return + } + for za0011, za0012 := range z.LastMinute.ILM { + err = en.WriteString(za0011) + if err != nil { + err = msgp.WrapError(err, "LastMinute", "ILM") + return + } + err = za0012.EncodeMsg(en) + if err != nil { + err = msgp.WrapError(err, "LastMinute", "ILM", za0011) + return + } + } } - err = za0012.EncodeMsg(en) + } + if (zb0001Mask & 0x200) == 0 { // if not omitted + // write "active" + err = en.Append(0xa6, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65) if err != nil { - err = msgp.WrapError(err, "LastMinute", "ILM", za0011) return } - } - } - if (zb0001Mask & 0x200) == 0 { // if not omitted - // write "active" - err = en.Append(0xa6, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.ActivePaths))) - if err != nil { - err = msgp.WrapError(err, "ActivePaths") - return - } - for za0013 := range z.ActivePaths { - err = en.WriteString(z.ActivePaths[za0013]) + err = en.WriteArrayHeader(uint32(len(z.ActivePaths))) if err != nil { - err = msgp.WrapError(err, "ActivePaths", za0013) + err = msgp.WrapError(err, "ActivePaths") return } + for za0013 := range z.ActivePaths { + err = en.WriteString(z.ActivePaths[za0013]) + if err != nil { + err = msgp.WrapError(err, "ActivePaths", za0013) + return + } + } } } return @@ -7432,109 +7445,114 @@ func (z *ScannerMetrics) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } - // string "collected" - o = append(o, 0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) - o = msgp.AppendTime(o, z.CollectedAt) - // string "current_cycle" - o = append(o, 0xad, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x79, 0x63, 0x6c, 0x65) - o = msgp.AppendUint64(o, z.CurrentCycle) - // string "current_started" - o = append(o, 0xaf, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64) - o = msgp.AppendTime(o, z.CurrentStarted) - // string "cycle_complete_times" - o = append(o, 0xb4, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.CyclesCompletedAt))) - for za0001 := range z.CyclesCompletedAt { - o = msgp.AppendTime(o, z.CyclesCompletedAt[za0001]) - } - // string "ongoing_buckets" - o = append(o, 0xaf, 0x6f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73) - o = msgp.AppendInt(o, z.OngoingBuckets) - if (zb0001Mask & 0x20) == 0 { // if not omitted - // string "per_bucket_stats" - o = append(o, 0xb0, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73) - o = msgp.AppendMapHeader(o, uint32(len(z.PerBucketStats))) - for za0002, za0003 := range z.PerBucketStats { - o = msgp.AppendString(o, za0002) - o = msgp.AppendArrayHeader(o, uint32(len(za0003))) - for za0004 := range za0003 { - o, err = za0003[za0004].MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "PerBucketStats", za0002, za0004) - return + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // string "collected" + o = append(o, 0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) + o = msgp.AppendTime(o, z.CollectedAt) + // string "current_cycle" + o = append(o, 0xad, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x79, 0x63, 0x6c, 0x65) + o = msgp.AppendUint64(o, z.CurrentCycle) + // string "current_started" + o = append(o, 0xaf, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64) + o = msgp.AppendTime(o, z.CurrentStarted) + // string "cycle_complete_times" + o = append(o, 0xb4, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73) + o = msgp.AppendArrayHeader(o, uint32(len(z.CyclesCompletedAt))) + for za0001 := range z.CyclesCompletedAt { + o = msgp.AppendTime(o, z.CyclesCompletedAt[za0001]) + } + // string "ongoing_buckets" + o = append(o, 0xaf, 0x6f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73) + o = msgp.AppendInt(o, z.OngoingBuckets) + if (zb0001Mask & 0x20) == 0 { // if not omitted + // string "per_bucket_stats" + o = append(o, 0xb0, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73) + o = msgp.AppendMapHeader(o, uint32(len(z.PerBucketStats))) + for za0002, za0003 := range z.PerBucketStats { + o = msgp.AppendString(o, za0002) + o = msgp.AppendArrayHeader(o, uint32(len(za0003))) + for za0004 := range za0003 { + o, err = za0003[za0004].MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "PerBucketStats", za0002, za0004) + return + } } } } - } - if (zb0001Mask & 0x40) == 0 { // if not omitted - // string "life_time_ops" - o = append(o, 0xad, 0x6c, 0x69, 0x66, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x70, 0x73) - o = msgp.AppendMapHeader(o, uint32(len(z.LifeTimeOps))) - for za0005, za0006 := range z.LifeTimeOps { - o = msgp.AppendString(o, za0005) - o = msgp.AppendUint64(o, za0006) - } - } - if (zb0001Mask & 0x80) == 0 { // if not omitted - // string "ilm_ops" - o = append(o, 0xa7, 0x69, 0x6c, 0x6d, 0x5f, 0x6f, 0x70, 0x73) - o = msgp.AppendMapHeader(o, uint32(len(z.LifeTimeILM))) - for za0007, za0008 := range z.LifeTimeILM { - o = msgp.AppendString(o, za0007) - o = msgp.AppendUint64(o, za0008) + if (zb0001Mask & 0x40) == 0 { // if not omitted + // string "life_time_ops" + o = append(o, 0xad, 0x6c, 0x69, 0x66, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x70, 0x73) + o = msgp.AppendMapHeader(o, uint32(len(z.LifeTimeOps))) + for za0005, za0006 := range z.LifeTimeOps { + o = msgp.AppendString(o, za0005) + o = msgp.AppendUint64(o, za0006) + } } - } - // string "last_minute" - o = append(o, 0xab, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65) - // check for omitted fields - zb0002Len := uint32(2) - var zb0002Mask uint8 /* 2 bits */ - _ = zb0002Mask - if z.LastMinute.Actions == nil { - zb0002Len-- - zb0002Mask |= 0x1 - } - if z.LastMinute.ILM == nil { - zb0002Len-- - zb0002Mask |= 0x2 - } - // variable map header, size zb0002Len - o = append(o, 0x80|uint8(zb0002Len)) - if (zb0002Mask & 0x1) == 0 { // if not omitted - // string "actions" - o = append(o, 0xa7, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73) - o = msgp.AppendMapHeader(o, uint32(len(z.LastMinute.Actions))) - for za0009, za0010 := range z.LastMinute.Actions { - o = msgp.AppendString(o, za0009) - o, err = za0010.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "LastMinute", "Actions", za0009) - return + if (zb0001Mask & 0x80) == 0 { // if not omitted + // string "ilm_ops" + o = append(o, 0xa7, 0x69, 0x6c, 0x6d, 0x5f, 0x6f, 0x70, 0x73) + o = msgp.AppendMapHeader(o, uint32(len(z.LifeTimeILM))) + for za0007, za0008 := range z.LifeTimeILM { + o = msgp.AppendString(o, za0007) + o = msgp.AppendUint64(o, za0008) } } - } - if (zb0002Mask & 0x2) == 0 { // if not omitted - // string "ilm" - o = append(o, 0xa3, 0x69, 0x6c, 0x6d) - o = msgp.AppendMapHeader(o, uint32(len(z.LastMinute.ILM))) - for za0011, za0012 := range z.LastMinute.ILM { - o = msgp.AppendString(o, za0011) - o, err = za0012.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "LastMinute", "ILM", za0011) - return + // string "last_minute" + o = append(o, 0xab, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65) + // check for omitted fields + zb0002Len := uint32(2) + var zb0002Mask uint8 /* 2 bits */ + _ = zb0002Mask + if z.LastMinute.Actions == nil { + zb0002Len-- + zb0002Mask |= 0x1 + } + if z.LastMinute.ILM == nil { + zb0002Len-- + zb0002Mask |= 0x2 + } + // variable map header, size zb0002Len + o = append(o, 0x80|uint8(zb0002Len)) + + // skip if no fields are to be emitted + if zb0002Len != 0 { + if (zb0002Mask & 0x1) == 0 { // if not omitted + // string "actions" + o = append(o, 0xa7, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73) + o = msgp.AppendMapHeader(o, uint32(len(z.LastMinute.Actions))) + for za0009, za0010 := range z.LastMinute.Actions { + o = msgp.AppendString(o, za0009) + o, err = za0010.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "LastMinute", "Actions", za0009) + return + } + } + } + if (zb0002Mask & 0x2) == 0 { // if not omitted + // string "ilm" + o = append(o, 0xa3, 0x69, 0x6c, 0x6d) + o = msgp.AppendMapHeader(o, uint32(len(z.LastMinute.ILM))) + for za0011, za0012 := range z.LastMinute.ILM { + o = msgp.AppendString(o, za0011) + o, err = za0012.MarshalMsg(o) + if err != nil { + err = msgp.WrapError(err, "LastMinute", "ILM", za0011) + return + } + } } } - } - if (zb0001Mask & 0x200) == 0 { // if not omitted - // string "active" - o = append(o, 0xa6, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65) - o = msgp.AppendArrayHeader(o, uint32(len(z.ActivePaths))) - for za0013 := range z.ActivePaths { - o = msgp.AppendString(o, z.ActivePaths[za0013]) + if (zb0001Mask & 0x200) == 0 { // if not omitted + // string "active" + o = append(o, 0xa6, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65) + o = msgp.AppendArrayHeader(o, uint32(len(z.ActivePaths))) + for za0013 := range z.ActivePaths { + o = msgp.AppendString(o, z.ActivePaths[za0013]) + } } } return @@ -8065,161 +8083,162 @@ func (z *SiteResyncMetrics) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - // write "collected" - err = en.Append(0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) - if err != nil { - return - } - err = en.WriteTime(z.CollectedAt) - if err != nil { - err = msgp.WrapError(err, "CollectedAt") - return - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // write "resyncStatus" - err = en.Append(0xac, 0x72, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // write "collected" + err = en.Append(0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) if err != nil { return } - err = en.WriteString(z.ResyncStatus) + err = en.WriteTime(z.CollectedAt) if err != nil { - err = msgp.WrapError(err, "ResyncStatus") + err = msgp.WrapError(err, "CollectedAt") return } - } - // write "startTime" - err = en.Append(0xa9, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65) - if err != nil { - return - } - err = en.WriteTime(z.StartTime) - if err != nil { - err = msgp.WrapError(err, "StartTime") - return - } - // write "lastUpdate" - err = en.Append(0xaa, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65) - if err != nil { - return - } - err = en.WriteTime(z.LastUpdate) - if err != nil { - err = msgp.WrapError(err, "LastUpdate") - return - } - // write "numBuckets" - err = en.Append(0xaa, 0x6e, 0x75, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73) - if err != nil { - return - } - err = en.WriteInt64(z.NumBuckets) - if err != nil { - err = msgp.WrapError(err, "NumBuckets") - return - } - // write "resyncID" - err = en.Append(0xa8, 0x72, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x49, 0x44) - if err != nil { - return - } - err = en.WriteString(z.ResyncID) - if err != nil { - err = msgp.WrapError(err, "ResyncID") - return - } - // write "deplID" - err = en.Append(0xa6, 0x64, 0x65, 0x70, 0x6c, 0x49, 0x44) - if err != nil { - return - } - err = en.WriteString(z.DeplID) - if err != nil { - err = msgp.WrapError(err, "DeplID") - return - } - // write "completedReplicationSize" - err = en.Append(0xb8, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, 0x65) - if err != nil { - return - } - err = en.WriteInt64(z.ReplicatedSize) - if err != nil { - err = msgp.WrapError(err, "ReplicatedSize") - return - } - // write "replicationCount" - err = en.Append(0xb0, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74) - if err != nil { - return - } - err = en.WriteInt64(z.ReplicatedCount) - if err != nil { - err = msgp.WrapError(err, "ReplicatedCount") - return - } - // write "failedReplicationSize" - err = en.Append(0xb5, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, 0x65) - if err != nil { - return - } - err = en.WriteInt64(z.FailedSize) - if err != nil { - err = msgp.WrapError(err, "FailedSize") - return - } - // write "failedReplicationCount" - err = en.Append(0xb6, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74) - if err != nil { - return - } - err = en.WriteInt64(z.FailedCount) - if err != nil { - err = msgp.WrapError(err, "FailedCount") - return - } - // write "failedBuckets" - err = en.Append(0xad, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.FailedBuckets))) - if err != nil { - err = msgp.WrapError(err, "FailedBuckets") - return - } - for za0001 := range z.FailedBuckets { - err = en.WriteString(z.FailedBuckets[za0001]) + if (zb0001Mask & 0x2) == 0 { // if not omitted + // write "resyncStatus" + err = en.Append(0xac, 0x72, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73) + if err != nil { + return + } + err = en.WriteString(z.ResyncStatus) + if err != nil { + err = msgp.WrapError(err, "ResyncStatus") + return + } + } + // write "startTime" + err = en.Append(0xa9, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65) if err != nil { - err = msgp.WrapError(err, "FailedBuckets", za0001) return } - } - if (zb0001Mask & 0x1000) == 0 { // if not omitted - // write "bucket" - err = en.Append(0xa6, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74) + err = en.WriteTime(z.StartTime) if err != nil { + err = msgp.WrapError(err, "StartTime") return } - err = en.WriteString(z.Bucket) + // write "lastUpdate" + err = en.Append(0xaa, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65) if err != nil { - err = msgp.WrapError(err, "Bucket") return } - } - if (zb0001Mask & 0x2000) == 0 { // if not omitted - // write "object" - err = en.Append(0xa6, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74) + err = en.WriteTime(z.LastUpdate) + if err != nil { + err = msgp.WrapError(err, "LastUpdate") + return + } + // write "numBuckets" + err = en.Append(0xaa, 0x6e, 0x75, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73) + if err != nil { + return + } + err = en.WriteInt64(z.NumBuckets) + if err != nil { + err = msgp.WrapError(err, "NumBuckets") + return + } + // write "resyncID" + err = en.Append(0xa8, 0x72, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x49, 0x44) + if err != nil { + return + } + err = en.WriteString(z.ResyncID) + if err != nil { + err = msgp.WrapError(err, "ResyncID") + return + } + // write "deplID" + err = en.Append(0xa6, 0x64, 0x65, 0x70, 0x6c, 0x49, 0x44) + if err != nil { + return + } + err = en.WriteString(z.DeplID) + if err != nil { + err = msgp.WrapError(err, "DeplID") + return + } + // write "completedReplicationSize" + err = en.Append(0xb8, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, 0x65) + if err != nil { + return + } + err = en.WriteInt64(z.ReplicatedSize) + if err != nil { + err = msgp.WrapError(err, "ReplicatedSize") + return + } + // write "replicationCount" + err = en.Append(0xb0, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74) + if err != nil { + return + } + err = en.WriteInt64(z.ReplicatedCount) + if err != nil { + err = msgp.WrapError(err, "ReplicatedCount") + return + } + // write "failedReplicationSize" + err = en.Append(0xb5, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, 0x65) + if err != nil { + return + } + err = en.WriteInt64(z.FailedSize) + if err != nil { + err = msgp.WrapError(err, "FailedSize") + return + } + // write "failedReplicationCount" + err = en.Append(0xb6, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74) + if err != nil { + return + } + err = en.WriteInt64(z.FailedCount) if err != nil { + err = msgp.WrapError(err, "FailedCount") return } - err = en.WriteString(z.Object) + // write "failedBuckets" + err = en.Append(0xad, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73) if err != nil { - err = msgp.WrapError(err, "Object") return } + err = en.WriteArrayHeader(uint32(len(z.FailedBuckets))) + if err != nil { + err = msgp.WrapError(err, "FailedBuckets") + return + } + for za0001 := range z.FailedBuckets { + err = en.WriteString(z.FailedBuckets[za0001]) + if err != nil { + err = msgp.WrapError(err, "FailedBuckets", za0001) + return + } + } + if (zb0001Mask & 0x1000) == 0 { // if not omitted + // write "bucket" + err = en.Append(0xa6, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74) + if err != nil { + return + } + err = en.WriteString(z.Bucket) + if err != nil { + err = msgp.WrapError(err, "Bucket") + return + } + } + if (zb0001Mask & 0x2000) == 0 { // if not omitted + // write "object" + err = en.Append(0xa6, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74) + if err != nil { + return + } + err = en.WriteString(z.Object) + if err != nil { + err = msgp.WrapError(err, "Object") + return + } + } } return } @@ -8245,59 +8264,60 @@ func (z *SiteResyncMetrics) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } - // string "collected" - o = append(o, 0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) - o = msgp.AppendTime(o, z.CollectedAt) - if (zb0001Mask & 0x2) == 0 { // if not omitted - // string "resyncStatus" - o = append(o, 0xac, 0x72, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73) - o = msgp.AppendString(o, z.ResyncStatus) - } - // string "startTime" - o = append(o, 0xa9, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65) - o = msgp.AppendTime(o, z.StartTime) - // string "lastUpdate" - o = append(o, 0xaa, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65) - o = msgp.AppendTime(o, z.LastUpdate) - // string "numBuckets" - o = append(o, 0xaa, 0x6e, 0x75, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73) - o = msgp.AppendInt64(o, z.NumBuckets) - // string "resyncID" - o = append(o, 0xa8, 0x72, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x49, 0x44) - o = msgp.AppendString(o, z.ResyncID) - // string "deplID" - o = append(o, 0xa6, 0x64, 0x65, 0x70, 0x6c, 0x49, 0x44) - o = msgp.AppendString(o, z.DeplID) - // string "completedReplicationSize" - o = append(o, 0xb8, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, 0x65) - o = msgp.AppendInt64(o, z.ReplicatedSize) - // string "replicationCount" - o = append(o, 0xb0, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74) - o = msgp.AppendInt64(o, z.ReplicatedCount) - // string "failedReplicationSize" - o = append(o, 0xb5, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, 0x65) - o = msgp.AppendInt64(o, z.FailedSize) - // string "failedReplicationCount" - o = append(o, 0xb6, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74) - o = msgp.AppendInt64(o, z.FailedCount) - // string "failedBuckets" - o = append(o, 0xad, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.FailedBuckets))) - for za0001 := range z.FailedBuckets { - o = msgp.AppendString(o, z.FailedBuckets[za0001]) - } - if (zb0001Mask & 0x1000) == 0 { // if not omitted - // string "bucket" - o = append(o, 0xa6, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74) - o = msgp.AppendString(o, z.Bucket) - } - if (zb0001Mask & 0x2000) == 0 { // if not omitted - // string "object" - o = append(o, 0xa6, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74) - o = msgp.AppendString(o, z.Object) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // string "collected" + o = append(o, 0xa9, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64) + o = msgp.AppendTime(o, z.CollectedAt) + if (zb0001Mask & 0x2) == 0 { // if not omitted + // string "resyncStatus" + o = append(o, 0xac, 0x72, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73) + o = msgp.AppendString(o, z.ResyncStatus) + } + // string "startTime" + o = append(o, 0xa9, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65) + o = msgp.AppendTime(o, z.StartTime) + // string "lastUpdate" + o = append(o, 0xaa, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65) + o = msgp.AppendTime(o, z.LastUpdate) + // string "numBuckets" + o = append(o, 0xaa, 0x6e, 0x75, 0x6d, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73) + o = msgp.AppendInt64(o, z.NumBuckets) + // string "resyncID" + o = append(o, 0xa8, 0x72, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x49, 0x44) + o = msgp.AppendString(o, z.ResyncID) + // string "deplID" + o = append(o, 0xa6, 0x64, 0x65, 0x70, 0x6c, 0x49, 0x44) + o = msgp.AppendString(o, z.DeplID) + // string "completedReplicationSize" + o = append(o, 0xb8, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, 0x65) + o = msgp.AppendInt64(o, z.ReplicatedSize) + // string "replicationCount" + o = append(o, 0xb0, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74) + o = msgp.AppendInt64(o, z.ReplicatedCount) + // string "failedReplicationSize" + o = append(o, 0xb5, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x7a, 0x65) + o = msgp.AppendInt64(o, z.FailedSize) + // string "failedReplicationCount" + o = append(o, 0xb6, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74) + o = msgp.AppendInt64(o, z.FailedCount) + // string "failedBuckets" + o = append(o, 0xad, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x73) + o = msgp.AppendArrayHeader(o, uint32(len(z.FailedBuckets))) + for za0001 := range z.FailedBuckets { + o = msgp.AppendString(o, z.FailedBuckets[za0001]) + } + if (zb0001Mask & 0x1000) == 0 { // if not omitted + // string "bucket" + o = append(o, 0xa6, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74) + o = msgp.AppendString(o, z.Bucket) + } + if (zb0001Mask & 0x2000) == 0 { // if not omitted + // string "object" + o = append(o, 0xa6, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74) + o = msgp.AppendString(o, z.Object) + } } return } diff --git a/scanner_gen.go b/scanner_gen.go index a65718f..c74631b 100644 --- a/scanner_gen.go +++ b/scanner_gen.go @@ -93,11 +93,10 @@ func (z *BucketScanInfo) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { - if (zb0001Mask & 0x1) == 0 { - z.Completed = nil - } + if (zb0001Mask & 0x1) == 0 { + z.Completed = nil } + return } @@ -116,86 +115,87 @@ func (z *BucketScanInfo) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - // write "pool" - err = en.Append(0xa4, 0x70, 0x6f, 0x6f, 0x6c) - if err != nil { - return - } - err = en.WriteInt(z.Pool) - if err != nil { - err = msgp.WrapError(err, "Pool") - return - } - // write "set" - err = en.Append(0xa3, 0x73, 0x65, 0x74) - if err != nil { - return - } - err = en.WriteInt(z.Set) - if err != nil { - err = msgp.WrapError(err, "Set") - return - } - // write "cycle" - err = en.Append(0xa5, 0x63, 0x79, 0x63, 0x6c, 0x65) - if err != nil { - return - } - err = en.WriteUint64(z.Cycle) - if err != nil { - err = msgp.WrapError(err, "Cycle") - return - } - // write "ongoing" - err = en.Append(0xa7, 0x6f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67) - if err != nil { - return - } - err = en.WriteBool(z.Ongoing) - if err != nil { - err = msgp.WrapError(err, "Ongoing") - return - } - // write "last_update" - err = en.Append(0xab, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65) - if err != nil { - return - } - err = en.WriteTime(z.LastUpdate) - if err != nil { - err = msgp.WrapError(err, "LastUpdate") - return - } - // write "last_started" - err = en.Append(0xac, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64) - if err != nil { - return - } - err = en.WriteTime(z.LastStarted) - if err != nil { - err = msgp.WrapError(err, "LastStarted") - return - } - if (zb0001Mask & 0x40) == 0 { // if not omitted - // write "completed" - err = en.Append(0xa9, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // write "pool" + err = en.Append(0xa4, 0x70, 0x6f, 0x6f, 0x6c) + if err != nil { + return + } + err = en.WriteInt(z.Pool) if err != nil { + err = msgp.WrapError(err, "Pool") return } - err = en.WriteArrayHeader(uint32(len(z.Completed))) + // write "set" + err = en.Append(0xa3, 0x73, 0x65, 0x74) if err != nil { - err = msgp.WrapError(err, "Completed") return } - for za0001 := range z.Completed { - err = en.WriteTime(z.Completed[za0001]) + err = en.WriteInt(z.Set) + if err != nil { + err = msgp.WrapError(err, "Set") + return + } + // write "cycle" + err = en.Append(0xa5, 0x63, 0x79, 0x63, 0x6c, 0x65) + if err != nil { + return + } + err = en.WriteUint64(z.Cycle) + if err != nil { + err = msgp.WrapError(err, "Cycle") + return + } + // write "ongoing" + err = en.Append(0xa7, 0x6f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67) + if err != nil { + return + } + err = en.WriteBool(z.Ongoing) + if err != nil { + err = msgp.WrapError(err, "Ongoing") + return + } + // write "last_update" + err = en.Append(0xab, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65) + if err != nil { + return + } + err = en.WriteTime(z.LastUpdate) + if err != nil { + err = msgp.WrapError(err, "LastUpdate") + return + } + // write "last_started" + err = en.Append(0xac, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64) + if err != nil { + return + } + err = en.WriteTime(z.LastStarted) + if err != nil { + err = msgp.WrapError(err, "LastStarted") + return + } + if (zb0001Mask & 0x40) == 0 { // if not omitted + // write "completed" + err = en.Append(0xa9, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64) if err != nil { - err = msgp.WrapError(err, "Completed", za0001) return } + err = en.WriteArrayHeader(uint32(len(z.Completed))) + if err != nil { + err = msgp.WrapError(err, "Completed") + return + } + for za0001 := range z.Completed { + err = en.WriteTime(z.Completed[za0001]) + if err != nil { + err = msgp.WrapError(err, "Completed", za0001) + return + } + } } } return @@ -214,33 +214,34 @@ func (z *BucketScanInfo) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } - // string "pool" - o = append(o, 0xa4, 0x70, 0x6f, 0x6f, 0x6c) - o = msgp.AppendInt(o, z.Pool) - // string "set" - o = append(o, 0xa3, 0x73, 0x65, 0x74) - o = msgp.AppendInt(o, z.Set) - // string "cycle" - o = append(o, 0xa5, 0x63, 0x79, 0x63, 0x6c, 0x65) - o = msgp.AppendUint64(o, z.Cycle) - // string "ongoing" - o = append(o, 0xa7, 0x6f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67) - o = msgp.AppendBool(o, z.Ongoing) - // string "last_update" - o = append(o, 0xab, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65) - o = msgp.AppendTime(o, z.LastUpdate) - // string "last_started" - o = append(o, 0xac, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64) - o = msgp.AppendTime(o, z.LastStarted) - if (zb0001Mask & 0x40) == 0 { // if not omitted - // string "completed" - o = append(o, 0xa9, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64) - o = msgp.AppendArrayHeader(o, uint32(len(z.Completed))) - for za0001 := range z.Completed { - o = msgp.AppendTime(o, z.Completed[za0001]) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // string "pool" + o = append(o, 0xa4, 0x70, 0x6f, 0x6f, 0x6c) + o = msgp.AppendInt(o, z.Pool) + // string "set" + o = append(o, 0xa3, 0x73, 0x65, 0x74) + o = msgp.AppendInt(o, z.Set) + // string "cycle" + o = append(o, 0xa5, 0x63, 0x79, 0x63, 0x6c, 0x65) + o = msgp.AppendUint64(o, z.Cycle) + // string "ongoing" + o = append(o, 0xa7, 0x6f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67) + o = msgp.AppendBool(o, z.Ongoing) + // string "last_update" + o = append(o, 0xab, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65) + o = msgp.AppendTime(o, z.LastUpdate) + // string "last_started" + o = append(o, 0xac, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64) + o = msgp.AppendTime(o, z.LastStarted) + if (zb0001Mask & 0x40) == 0 { // if not omitted + // string "completed" + o = append(o, 0xa9, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64) + o = msgp.AppendArrayHeader(o, uint32(len(z.Completed))) + for za0001 := range z.Completed { + o = msgp.AppendTime(o, z.Completed[za0001]) + } } } return @@ -331,11 +332,10 @@ func (z *BucketScanInfo) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { - if (zb0001Mask & 0x1) == 0 { - z.Completed = nil - } + if (zb0001Mask & 0x1) == 0 { + z.Completed = nil } + o = bts return } diff --git a/utils.go b/utils.go index a67b905..11e2175 100644 --- a/utils.go +++ b/utils.go @@ -129,6 +129,8 @@ func closeResponse(resp *http.Response) { type TimedAction struct { Count uint64 `json:"count"` AccTime uint64 `json:"acc_time_ns"` + MinTime uint64 `json:"min_ns,omitempty"` + MaxTime uint64 `json:"max_ns,omitempty"` Bytes uint64 `json:"bytes,omitempty"` } @@ -153,6 +155,13 @@ func (t *TimedAction) Merge(other TimedAction) { t.Count += other.Count t.AccTime += other.AccTime t.Bytes += other.Bytes + if t.Count == 0 { + t.MinTime = other.MinTime + } + if other.Count > 0 { + t.MinTime = min(t.MinTime, other.MinTime) + } + t.MaxTime = max(t.MaxTime, other.MaxTime) } // NodeCommon - Common fields across most node-specific health structs diff --git a/utils_gen.go b/utils_gen.go index a5b780d..435611f 100644 --- a/utils_gen.go +++ b/utils_gen.go @@ -48,11 +48,10 @@ func (z *NodeCommon) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { - if (zb0001Mask & 0x1) == 0 { - z.Error = "" - } + if (zb0001Mask & 0x1) == 0 { + z.Error = "" } + return } @@ -71,30 +70,31 @@ func (z NodeCommon) EncodeMsg(en *msgp.Writer) (err error) { if err != nil { return } - if zb0001Len == 0 { - return - } - // write "addr" - err = en.Append(0xa4, 0x61, 0x64, 0x64, 0x72) - if err != nil { - return - } - err = en.WriteString(z.Addr) - if err != nil { - err = msgp.WrapError(err, "Addr") - return - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // write "error" - err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // write "addr" + err = en.Append(0xa4, 0x61, 0x64, 0x64, 0x72) if err != nil { return } - err = en.WriteString(z.Error) + err = en.WriteString(z.Addr) if err != nil { - err = msgp.WrapError(err, "Error") + err = msgp.WrapError(err, "Addr") return } + if (zb0001Mask & 0x2) == 0 { // if not omitted + // write "error" + err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + if err != nil { + return + } + err = en.WriteString(z.Error) + if err != nil { + err = msgp.WrapError(err, "Error") + return + } + } } return } @@ -112,16 +112,17 @@ func (z NodeCommon) MarshalMsg(b []byte) (o []byte, err error) { } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } - // string "addr" - o = append(o, 0xa4, 0x61, 0x64, 0x64, 0x72) - o = msgp.AppendString(o, z.Addr) - if (zb0001Mask & 0x2) == 0 { // if not omitted - // string "error" - o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) - o = msgp.AppendString(o, z.Error) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // string "addr" + o = append(o, 0xa4, 0x61, 0x64, 0x64, 0x72) + o = msgp.AppendString(o, z.Addr) + if (zb0001Mask & 0x2) == 0 { // if not omitted + // string "error" + o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) + o = msgp.AppendString(o, z.Error) + } } return } @@ -168,11 +169,10 @@ func (z *NodeCommon) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { - if (zb0001Mask & 0x1) == 0 { - z.Error = "" - } + if (zb0001Mask & 0x1) == 0 { + z.Error = "" } + o = bts return } @@ -193,7 +193,7 @@ func (z *TimedAction) DecodeMsg(dc *msgp.Reader) (err error) { err = msgp.WrapError(err) return } - var zb0001Mask uint8 /* 1 bits */ + var zb0001Mask uint8 /* 3 bits */ _ = zb0001Mask for zb0001 > 0 { zb0001-- @@ -215,13 +215,27 @@ func (z *TimedAction) DecodeMsg(dc *msgp.Reader) (err error) { err = msgp.WrapError(err, "AccTime") return } + case "min_ns": + z.MinTime, err = dc.ReadUint64() + if err != nil { + err = msgp.WrapError(err, "MinTime") + return + } + zb0001Mask |= 0x1 + case "max_ns": + z.MaxTime, err = dc.ReadUint64() + if err != nil { + err = msgp.WrapError(err, "MaxTime") + return + } + zb0001Mask |= 0x2 case "bytes": z.Bytes, err = dc.ReadUint64() if err != nil { err = msgp.WrapError(err, "Bytes") return } - zb0001Mask |= 0x1 + zb0001Mask |= 0x4 default: err = dc.Skip() if err != nil { @@ -231,8 +245,14 @@ func (z *TimedAction) DecodeMsg(dc *msgp.Reader) (err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { + if zb0001Mask != 0x7 { if (zb0001Mask & 0x1) == 0 { + z.MinTime = 0 + } + if (zb0001Mask & 0x2) == 0 { + z.MaxTime = 0 + } + if (zb0001Mask & 0x4) == 0 { z.Bytes = 0 } } @@ -240,84 +260,136 @@ func (z *TimedAction) DecodeMsg(dc *msgp.Reader) (err error) { } // EncodeMsg implements msgp.Encodable -func (z TimedAction) EncodeMsg(en *msgp.Writer) (err error) { +func (z *TimedAction) EncodeMsg(en *msgp.Writer) (err error) { // check for omitted fields - zb0001Len := uint32(3) - var zb0001Mask uint8 /* 3 bits */ + zb0001Len := uint32(5) + var zb0001Mask uint8 /* 5 bits */ _ = zb0001Mask - if z.Bytes == 0 { + if z.MinTime == 0 { zb0001Len-- zb0001Mask |= 0x4 } - // variable map header, size zb0001Len - err = en.Append(0x80 | uint8(zb0001Len)) - if err != nil { - return - } - if zb0001Len == 0 { - return - } - // write "count" - err = en.Append(0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) - if err != nil { - return - } - err = en.WriteUint64(z.Count) - if err != nil { - err = msgp.WrapError(err, "Count") - return + if z.MaxTime == 0 { + zb0001Len-- + zb0001Mask |= 0x8 } - // write "acc_time_ns" - err = en.Append(0xab, 0x61, 0x63, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x73) - if err != nil { - return + if z.Bytes == 0 { + zb0001Len-- + zb0001Mask |= 0x10 } - err = en.WriteUint64(z.AccTime) + // variable map header, size zb0001Len + err = en.Append(0x80 | uint8(zb0001Len)) if err != nil { - err = msgp.WrapError(err, "AccTime") return } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // write "bytes" - err = en.Append(0xa5, 0x62, 0x79, 0x74, 0x65, 0x73) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // write "count" + err = en.Append(0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) if err != nil { return } - err = en.WriteUint64(z.Bytes) + err = en.WriteUint64(z.Count) if err != nil { - err = msgp.WrapError(err, "Bytes") + err = msgp.WrapError(err, "Count") return } + // write "acc_time_ns" + err = en.Append(0xab, 0x61, 0x63, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x73) + if err != nil { + return + } + err = en.WriteUint64(z.AccTime) + if err != nil { + err = msgp.WrapError(err, "AccTime") + return + } + if (zb0001Mask & 0x4) == 0 { // if not omitted + // write "min_ns" + err = en.Append(0xa6, 0x6d, 0x69, 0x6e, 0x5f, 0x6e, 0x73) + if err != nil { + return + } + err = en.WriteUint64(z.MinTime) + if err != nil { + err = msgp.WrapError(err, "MinTime") + return + } + } + if (zb0001Mask & 0x8) == 0 { // if not omitted + // write "max_ns" + err = en.Append(0xa6, 0x6d, 0x61, 0x78, 0x5f, 0x6e, 0x73) + if err != nil { + return + } + err = en.WriteUint64(z.MaxTime) + if err != nil { + err = msgp.WrapError(err, "MaxTime") + return + } + } + if (zb0001Mask & 0x10) == 0 { // if not omitted + // write "bytes" + err = en.Append(0xa5, 0x62, 0x79, 0x74, 0x65, 0x73) + if err != nil { + return + } + err = en.WriteUint64(z.Bytes) + if err != nil { + err = msgp.WrapError(err, "Bytes") + return + } + } } return } // MarshalMsg implements msgp.Marshaler -func (z TimedAction) MarshalMsg(b []byte) (o []byte, err error) { +func (z *TimedAction) MarshalMsg(b []byte) (o []byte, err error) { o = msgp.Require(b, z.Msgsize()) // check for omitted fields - zb0001Len := uint32(3) - var zb0001Mask uint8 /* 3 bits */ + zb0001Len := uint32(5) + var zb0001Mask uint8 /* 5 bits */ _ = zb0001Mask - if z.Bytes == 0 { + if z.MinTime == 0 { zb0001Len-- zb0001Mask |= 0x4 } + if z.MaxTime == 0 { + zb0001Len-- + zb0001Mask |= 0x8 + } + if z.Bytes == 0 { + zb0001Len-- + zb0001Mask |= 0x10 + } // variable map header, size zb0001Len o = append(o, 0x80|uint8(zb0001Len)) - if zb0001Len == 0 { - return - } - // string "count" - o = append(o, 0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) - o = msgp.AppendUint64(o, z.Count) - // string "acc_time_ns" - o = append(o, 0xab, 0x61, 0x63, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x73) - o = msgp.AppendUint64(o, z.AccTime) - if (zb0001Mask & 0x4) == 0 { // if not omitted - // string "bytes" - o = append(o, 0xa5, 0x62, 0x79, 0x74, 0x65, 0x73) - o = msgp.AppendUint64(o, z.Bytes) + + // skip if no fields are to be emitted + if zb0001Len != 0 { + // string "count" + o = append(o, 0xa5, 0x63, 0x6f, 0x75, 0x6e, 0x74) + o = msgp.AppendUint64(o, z.Count) + // string "acc_time_ns" + o = append(o, 0xab, 0x61, 0x63, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x73) + o = msgp.AppendUint64(o, z.AccTime) + if (zb0001Mask & 0x4) == 0 { // if not omitted + // string "min_ns" + o = append(o, 0xa6, 0x6d, 0x69, 0x6e, 0x5f, 0x6e, 0x73) + o = msgp.AppendUint64(o, z.MinTime) + } + if (zb0001Mask & 0x8) == 0 { // if not omitted + // string "max_ns" + o = append(o, 0xa6, 0x6d, 0x61, 0x78, 0x5f, 0x6e, 0x73) + o = msgp.AppendUint64(o, z.MaxTime) + } + if (zb0001Mask & 0x10) == 0 { // if not omitted + // string "bytes" + o = append(o, 0xa5, 0x62, 0x79, 0x74, 0x65, 0x73) + o = msgp.AppendUint64(o, z.Bytes) + } } return } @@ -332,7 +404,7 @@ func (z *TimedAction) UnmarshalMsg(bts []byte) (o []byte, err error) { err = msgp.WrapError(err) return } - var zb0001Mask uint8 /* 1 bits */ + var zb0001Mask uint8 /* 3 bits */ _ = zb0001Mask for zb0001 > 0 { zb0001-- @@ -354,13 +426,27 @@ func (z *TimedAction) UnmarshalMsg(bts []byte) (o []byte, err error) { err = msgp.WrapError(err, "AccTime") return } + case "min_ns": + z.MinTime, bts, err = msgp.ReadUint64Bytes(bts) + if err != nil { + err = msgp.WrapError(err, "MinTime") + return + } + zb0001Mask |= 0x1 + case "max_ns": + z.MaxTime, bts, err = msgp.ReadUint64Bytes(bts) + if err != nil { + err = msgp.WrapError(err, "MaxTime") + return + } + zb0001Mask |= 0x2 case "bytes": z.Bytes, bts, err = msgp.ReadUint64Bytes(bts) if err != nil { err = msgp.WrapError(err, "Bytes") return } - zb0001Mask |= 0x1 + zb0001Mask |= 0x4 default: bts, err = msgp.Skip(bts) if err != nil { @@ -370,8 +456,14 @@ func (z *TimedAction) UnmarshalMsg(bts []byte) (o []byte, err error) { } } // Clear omitted fields. - if zb0001Mask != 0x1 { + if zb0001Mask != 0x7 { if (zb0001Mask & 0x1) == 0 { + z.MinTime = 0 + } + if (zb0001Mask & 0x2) == 0 { + z.MaxTime = 0 + } + if (zb0001Mask & 0x4) == 0 { z.Bytes = 0 } } @@ -380,7 +472,7 @@ func (z *TimedAction) 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 TimedAction) Msgsize() (s int) { - s = 1 + 6 + msgp.Uint64Size + 12 + msgp.Uint64Size + 6 + msgp.Uint64Size +func (z *TimedAction) Msgsize() (s int) { + s = 1 + 6 + msgp.Uint64Size + 12 + msgp.Uint64Size + 7 + msgp.Uint64Size + 7 + msgp.Uint64Size + 6 + msgp.Uint64Size return }