|
|
|
@ -8,205 +8,129 @@ import ( |
|
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
|
func (z *DiskInfo) DecodeMsg(dc *msgp.Reader) (err error) { |
|
|
|
|
var field []byte |
|
|
|
|
_ = field |
|
|
|
|
var zb0001 uint32 |
|
|
|
|
zb0001, err = dc.ReadMapHeader() |
|
|
|
|
zb0001, err = dc.ReadArrayHeader() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
for zb0001 > 0 { |
|
|
|
|
zb0001-- |
|
|
|
|
field, err = dc.ReadMapKeyPtr() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
switch msgp.UnsafeString(field) { |
|
|
|
|
case "Total": |
|
|
|
|
z.Total, err = dc.ReadUint64() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Total") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "Free": |
|
|
|
|
z.Free, err = dc.ReadUint64() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Free") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "Used": |
|
|
|
|
z.Used, err = dc.ReadUint64() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Used") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "UsedInodes": |
|
|
|
|
z.UsedInodes, err = dc.ReadUint64() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "UsedInodes") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "FSType": |
|
|
|
|
z.FSType, err = dc.ReadString() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "FSType") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "RootDisk": |
|
|
|
|
z.RootDisk, err = dc.ReadBool() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "RootDisk") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "Healing": |
|
|
|
|
z.Healing, err = dc.ReadBool() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Healing") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "Endpoint": |
|
|
|
|
z.Endpoint, err = dc.ReadString() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Endpoint") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "MountPath": |
|
|
|
|
z.MountPath, err = dc.ReadString() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "MountPath") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "ID": |
|
|
|
|
z.ID, err = dc.ReadString() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "ID") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "Error": |
|
|
|
|
z.Error, err = dc.ReadString() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Error") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
default: |
|
|
|
|
err = dc.Skip() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if zb0001 != 11 { |
|
|
|
|
err = msgp.ArrayError{Wanted: 11, Got: zb0001} |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
|
func (z *DiskInfo) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
|
// map header, size 11
|
|
|
|
|
// write "Total"
|
|
|
|
|
err = en.Append(0x8b, 0xa5, 0x54, 0x6f, 0x74, 0x61, 0x6c) |
|
|
|
|
z.Total, err = dc.ReadUint64() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Total") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
err = en.WriteUint64(z.Total) |
|
|
|
|
z.Free, err = dc.ReadUint64() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Total") |
|
|
|
|
err = msgp.WrapError(err, "Free") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
// write "Free"
|
|
|
|
|
err = en.Append(0xa4, 0x46, 0x72, 0x65, 0x65) |
|
|
|
|
z.Used, err = dc.ReadUint64() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Used") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
err = en.WriteUint64(z.Free) |
|
|
|
|
z.UsedInodes, err = dc.ReadUint64() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Free") |
|
|
|
|
err = msgp.WrapError(err, "UsedInodes") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
// write "Used"
|
|
|
|
|
err = en.Append(0xa4, 0x55, 0x73, 0x65, 0x64) |
|
|
|
|
z.FSType, err = dc.ReadString() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "FSType") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
err = en.WriteUint64(z.Used) |
|
|
|
|
z.RootDisk, err = dc.ReadBool() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Used") |
|
|
|
|
err = msgp.WrapError(err, "RootDisk") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
// write "UsedInodes"
|
|
|
|
|
err = en.Append(0xaa, 0x55, 0x73, 0x65, 0x64, 0x49, 0x6e, 0x6f, 0x64, 0x65, 0x73) |
|
|
|
|
z.Healing, err = dc.ReadBool() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Healing") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
err = en.WriteUint64(z.UsedInodes) |
|
|
|
|
z.Endpoint, err = dc.ReadString() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "UsedInodes") |
|
|
|
|
err = msgp.WrapError(err, "Endpoint") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
// write "FSType"
|
|
|
|
|
err = en.Append(0xa6, 0x46, 0x53, 0x54, 0x79, 0x70, 0x65) |
|
|
|
|
z.MountPath, err = dc.ReadString() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "MountPath") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
err = en.WriteString(z.FSType) |
|
|
|
|
z.ID, err = dc.ReadString() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "FSType") |
|
|
|
|
err = msgp.WrapError(err, "ID") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
// write "RootDisk"
|
|
|
|
|
err = en.Append(0xa8, 0x52, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x73, 0x6b) |
|
|
|
|
z.Error, err = dc.ReadString() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Error") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
err = en.WriteBool(z.RootDisk) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
|
func (z *DiskInfo) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
|
// array header, size 11
|
|
|
|
|
err = en.Append(0x9b) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "RootDisk") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
// write "Healing"
|
|
|
|
|
err = en.Append(0xa7, 0x48, 0x65, 0x61, 0x6c, 0x69, 0x6e, 0x67) |
|
|
|
|
err = en.WriteUint64(z.Total) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Total") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
err = en.WriteBool(z.Healing) |
|
|
|
|
err = en.WriteUint64(z.Free) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Healing") |
|
|
|
|
err = msgp.WrapError(err, "Free") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
// write "Endpoint"
|
|
|
|
|
err = en.Append(0xa8, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) |
|
|
|
|
err = en.WriteUint64(z.Used) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Used") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
err = en.WriteString(z.Endpoint) |
|
|
|
|
err = en.WriteUint64(z.UsedInodes) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Endpoint") |
|
|
|
|
err = msgp.WrapError(err, "UsedInodes") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
// write "MountPath"
|
|
|
|
|
err = en.Append(0xa9, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68) |
|
|
|
|
err = en.WriteString(z.FSType) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "FSType") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
err = en.WriteString(z.MountPath) |
|
|
|
|
err = en.WriteBool(z.RootDisk) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "MountPath") |
|
|
|
|
err = msgp.WrapError(err, "RootDisk") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
// write "ID"
|
|
|
|
|
err = en.Append(0xa2, 0x49, 0x44) |
|
|
|
|
err = en.WriteBool(z.Healing) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Healing") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
err = en.WriteString(z.ID) |
|
|
|
|
err = en.WriteString(z.Endpoint) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "ID") |
|
|
|
|
err = msgp.WrapError(err, "Endpoint") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
// write "Error"
|
|
|
|
|
err = en.Append(0xa5, 0x45, 0x72, 0x72, 0x6f, 0x72) |
|
|
|
|
err = en.WriteString(z.MountPath) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "MountPath") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
err = en.WriteString(z.ID) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "ID") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
err = en.WriteString(z.Error) |
|
|
|
@ -220,134 +144,88 @@ func (z *DiskInfo) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
|
func (z *DiskInfo) MarshalMsg(b []byte) (o []byte, err error) { |
|
|
|
|
o = msgp.Require(b, z.Msgsize()) |
|
|
|
|
// map header, size 11
|
|
|
|
|
// string "Total"
|
|
|
|
|
o = append(o, 0x8b, 0xa5, 0x54, 0x6f, 0x74, 0x61, 0x6c) |
|
|
|
|
// array header, size 11
|
|
|
|
|
o = append(o, 0x9b) |
|
|
|
|
o = msgp.AppendUint64(o, z.Total) |
|
|
|
|
// string "Free"
|
|
|
|
|
o = append(o, 0xa4, 0x46, 0x72, 0x65, 0x65) |
|
|
|
|
o = msgp.AppendUint64(o, z.Free) |
|
|
|
|
// string "Used"
|
|
|
|
|
o = append(o, 0xa4, 0x55, 0x73, 0x65, 0x64) |
|
|
|
|
o = msgp.AppendUint64(o, z.Used) |
|
|
|
|
// string "UsedInodes"
|
|
|
|
|
o = append(o, 0xaa, 0x55, 0x73, 0x65, 0x64, 0x49, 0x6e, 0x6f, 0x64, 0x65, 0x73) |
|
|
|
|
o = msgp.AppendUint64(o, z.UsedInodes) |
|
|
|
|
// string "FSType"
|
|
|
|
|
o = append(o, 0xa6, 0x46, 0x53, 0x54, 0x79, 0x70, 0x65) |
|
|
|
|
o = msgp.AppendString(o, z.FSType) |
|
|
|
|
// string "RootDisk"
|
|
|
|
|
o = append(o, 0xa8, 0x52, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x73, 0x6b) |
|
|
|
|
o = msgp.AppendBool(o, z.RootDisk) |
|
|
|
|
// string "Healing"
|
|
|
|
|
o = append(o, 0xa7, 0x48, 0x65, 0x61, 0x6c, 0x69, 0x6e, 0x67) |
|
|
|
|
o = msgp.AppendBool(o, z.Healing) |
|
|
|
|
// string "Endpoint"
|
|
|
|
|
o = append(o, 0xa8, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74) |
|
|
|
|
o = msgp.AppendString(o, z.Endpoint) |
|
|
|
|
// string "MountPath"
|
|
|
|
|
o = append(o, 0xa9, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68) |
|
|
|
|
o = msgp.AppendString(o, z.MountPath) |
|
|
|
|
// string "ID"
|
|
|
|
|
o = append(o, 0xa2, 0x49, 0x44) |
|
|
|
|
o = msgp.AppendString(o, z.ID) |
|
|
|
|
// string "Error"
|
|
|
|
|
o = append(o, 0xa5, 0x45, 0x72, 0x72, 0x6f, 0x72) |
|
|
|
|
o = msgp.AppendString(o, z.Error) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
|
func (z *DiskInfo) UnmarshalMsg(bts []byte) (o []byte, err error) { |
|
|
|
|
var field []byte |
|
|
|
|
_ = field |
|
|
|
|
var zb0001 uint32 |
|
|
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) |
|
|
|
|
zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
for zb0001 > 0 { |
|
|
|
|
zb0001-- |
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
switch msgp.UnsafeString(field) { |
|
|
|
|
case "Total": |
|
|
|
|
z.Total, bts, err = msgp.ReadUint64Bytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Total") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "Free": |
|
|
|
|
z.Free, bts, err = msgp.ReadUint64Bytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Free") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "Used": |
|
|
|
|
z.Used, bts, err = msgp.ReadUint64Bytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Used") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "UsedInodes": |
|
|
|
|
z.UsedInodes, bts, err = msgp.ReadUint64Bytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "UsedInodes") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "FSType": |
|
|
|
|
z.FSType, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "FSType") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "RootDisk": |
|
|
|
|
z.RootDisk, bts, err = msgp.ReadBoolBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "RootDisk") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "Healing": |
|
|
|
|
z.Healing, bts, err = msgp.ReadBoolBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Healing") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "Endpoint": |
|
|
|
|
z.Endpoint, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Endpoint") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "MountPath": |
|
|
|
|
z.MountPath, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "MountPath") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "ID": |
|
|
|
|
z.ID, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "ID") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "Error": |
|
|
|
|
z.Error, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Error") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
default: |
|
|
|
|
bts, err = msgp.Skip(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if zb0001 != 11 { |
|
|
|
|
err = msgp.ArrayError{Wanted: 11, Got: zb0001} |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
z.Total, bts, err = msgp.ReadUint64Bytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Total") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
z.Free, bts, err = msgp.ReadUint64Bytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Free") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
z.Used, bts, err = msgp.ReadUint64Bytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Used") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
z.UsedInodes, bts, err = msgp.ReadUint64Bytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "UsedInodes") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
z.FSType, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "FSType") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
z.RootDisk, bts, err = msgp.ReadBoolBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "RootDisk") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
z.Healing, bts, err = msgp.ReadBoolBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Healing") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
z.Endpoint, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Endpoint") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
z.MountPath, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "MountPath") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
z.ID, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "ID") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
z.Error, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Error") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
o = bts |
|
|
|
|
return |
|
|
|
@ -355,7 +233,7 @@ func (z *DiskInfo) 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 *DiskInfo) Msgsize() (s int) { |
|
|
|
|
s = 1 + 6 + msgp.Uint64Size + 5 + msgp.Uint64Size + 5 + msgp.Uint64Size + 11 + msgp.Uint64Size + 7 + msgp.StringPrefixSize + len(z.FSType) + 9 + msgp.BoolSize + 8 + msgp.BoolSize + 9 + msgp.StringPrefixSize + len(z.Endpoint) + 10 + msgp.StringPrefixSize + len(z.MountPath) + 3 + msgp.StringPrefixSize + len(z.ID) + 6 + msgp.StringPrefixSize + len(z.Error) |
|
|
|
|
s = 1 + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.Uint64Size + msgp.StringPrefixSize + len(z.FSType) + msgp.BoolSize + msgp.BoolSize + msgp.StringPrefixSize + len(z.Endpoint) + msgp.StringPrefixSize + len(z.MountPath) + msgp.StringPrefixSize + len(z.ID) + msgp.StringPrefixSize + len(z.Error) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -367,8 +245,8 @@ func (z *FileInfo) DecodeMsg(dc *msgp.Reader) (err error) { |
|
|
|
|
err = msgp.WrapError(err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if zb0001 != 17 { |
|
|
|
|
err = msgp.ArrayError{Wanted: 17, Got: zb0001} |
|
|
|
|
if zb0001 != 18 { |
|
|
|
|
err = msgp.ArrayError{Wanted: 18, Got: zb0001} |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
z.Volume, err = dc.ReadString() |
|
|
|
@ -497,13 +375,18 @@ func (z *FileInfo) DecodeMsg(dc *msgp.Reader) (err error) { |
|
|
|
|
} |
|
|
|
|
z.VersionPurgeStatus = VersionPurgeStatusType(zb0004) |
|
|
|
|
} |
|
|
|
|
z.Data, err = dc.ReadBytes(z.Data) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Data") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
|
func (z *FileInfo) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
|
// array header, size 17
|
|
|
|
|
err = en.Append(0xdc, 0x0, 0x11) |
|
|
|
|
// array header, size 18
|
|
|
|
|
err = en.Append(0xdc, 0x0, 0x12) |
|
|
|
|
if err != nil { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
@ -611,14 +494,19 @@ func (z *FileInfo) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
|
err = msgp.WrapError(err, "VersionPurgeStatus") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
err = en.WriteBytes(z.Data) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Data") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
|
func (z *FileInfo) MarshalMsg(b []byte) (o []byte, err error) { |
|
|
|
|
o = msgp.Require(b, z.Msgsize()) |
|
|
|
|
// array header, size 17
|
|
|
|
|
o = append(o, 0xdc, 0x0, 0x11) |
|
|
|
|
// array header, size 18
|
|
|
|
|
o = append(o, 0xdc, 0x0, 0x12) |
|
|
|
|
o = msgp.AppendString(o, z.Volume) |
|
|
|
|
o = msgp.AppendString(o, z.Name) |
|
|
|
|
o = msgp.AppendString(o, z.VersionID) |
|
|
|
@ -651,6 +539,7 @@ func (z *FileInfo) MarshalMsg(b []byte) (o []byte, err error) { |
|
|
|
|
o = msgp.AppendBool(o, z.MarkDeleted) |
|
|
|
|
o = msgp.AppendString(o, z.DeleteMarkerReplicationStatus) |
|
|
|
|
o = msgp.AppendString(o, string(z.VersionPurgeStatus)) |
|
|
|
|
o = msgp.AppendBytes(o, z.Data) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -662,8 +551,8 @@ func (z *FileInfo) UnmarshalMsg(bts []byte) (o []byte, err error) { |
|
|
|
|
err = msgp.WrapError(err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if zb0001 != 17 { |
|
|
|
|
err = msgp.ArrayError{Wanted: 17, Got: zb0001} |
|
|
|
|
if zb0001 != 18 { |
|
|
|
|
err = msgp.ArrayError{Wanted: 18, Got: zb0001} |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
z.Volume, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
@ -792,6 +681,11 @@ func (z *FileInfo) UnmarshalMsg(bts []byte) (o []byte, err error) { |
|
|
|
|
} |
|
|
|
|
z.VersionPurgeStatus = VersionPurgeStatusType(zb0004) |
|
|
|
|
} |
|
|
|
|
z.Data, bts, err = msgp.ReadBytesBytes(bts, z.Data) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Data") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
o = bts |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
@ -809,7 +703,7 @@ func (z *FileInfo) Msgsize() (s int) { |
|
|
|
|
for za0003 := range z.Parts { |
|
|
|
|
s += z.Parts[za0003].Msgsize() |
|
|
|
|
} |
|
|
|
|
s += z.Erasure.Msgsize() + msgp.BoolSize + msgp.StringPrefixSize + len(z.DeleteMarkerReplicationStatus) + msgp.StringPrefixSize + len(string(z.VersionPurgeStatus)) |
|
|
|
|
s += z.Erasure.Msgsize() + msgp.BoolSize + msgp.StringPrefixSize + len(z.DeleteMarkerReplicationStatus) + msgp.StringPrefixSize + len(string(z.VersionPurgeStatus)) + msgp.BytesPrefixSize + len(z.Data) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1432,50 +1326,33 @@ func (z VersionPurgeStatusType) Msgsize() (s int) { |
|
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
|
func (z *VolInfo) DecodeMsg(dc *msgp.Reader) (err error) { |
|
|
|
|
var field []byte |
|
|
|
|
_ = field |
|
|
|
|
var zb0001 uint32 |
|
|
|
|
zb0001, err = dc.ReadMapHeader() |
|
|
|
|
zb0001, err = dc.ReadArrayHeader() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
for zb0001 > 0 { |
|
|
|
|
zb0001-- |
|
|
|
|
field, err = dc.ReadMapKeyPtr() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
switch msgp.UnsafeString(field) { |
|
|
|
|
case "Name": |
|
|
|
|
z.Name, err = dc.ReadString() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Name") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "Created": |
|
|
|
|
z.Created, err = dc.ReadTime() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Created") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
default: |
|
|
|
|
err = dc.Skip() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if zb0001 != 2 { |
|
|
|
|
err = msgp.ArrayError{Wanted: 2, Got: zb0001} |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
z.Name, err = dc.ReadString() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Name") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
z.Created, err = dc.ReadTime() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Created") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
|
func (z VolInfo) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
|
// map header, size 2
|
|
|
|
|
// write "Name"
|
|
|
|
|
err = en.Append(0x82, 0xa4, 0x4e, 0x61, 0x6d, 0x65) |
|
|
|
|
// array header, size 2
|
|
|
|
|
err = en.Append(0x92) |
|
|
|
|
if err != nil { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
@ -1484,11 +1361,6 @@ func (z VolInfo) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
|
err = msgp.WrapError(err, "Name") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
// write "Created"
|
|
|
|
|
err = en.Append(0xa7, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64) |
|
|
|
|
if err != nil { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
err = en.WriteTime(z.Created) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Created") |
|
|
|
@ -1500,53 +1372,34 @@ func (z VolInfo) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
|
func (z VolInfo) MarshalMsg(b []byte) (o []byte, err error) { |
|
|
|
|
o = msgp.Require(b, z.Msgsize()) |
|
|
|
|
// map header, size 2
|
|
|
|
|
// string "Name"
|
|
|
|
|
o = append(o, 0x82, 0xa4, 0x4e, 0x61, 0x6d, 0x65) |
|
|
|
|
// array header, size 2
|
|
|
|
|
o = append(o, 0x92) |
|
|
|
|
o = msgp.AppendString(o, z.Name) |
|
|
|
|
// string "Created"
|
|
|
|
|
o = append(o, 0xa7, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64) |
|
|
|
|
o = msgp.AppendTime(o, z.Created) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
|
func (z *VolInfo) UnmarshalMsg(bts []byte) (o []byte, err error) { |
|
|
|
|
var field []byte |
|
|
|
|
_ = field |
|
|
|
|
var zb0001 uint32 |
|
|
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) |
|
|
|
|
zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
for zb0001 > 0 { |
|
|
|
|
zb0001-- |
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
switch msgp.UnsafeString(field) { |
|
|
|
|
case "Name": |
|
|
|
|
z.Name, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Name") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "Created": |
|
|
|
|
z.Created, bts, err = msgp.ReadTimeBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Created") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
default: |
|
|
|
|
bts, err = msgp.Skip(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if zb0001 != 2 { |
|
|
|
|
err = msgp.ArrayError{Wanted: 2, Got: zb0001} |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
z.Name, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Name") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
z.Created, bts, err = msgp.ReadTimeBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, "Created") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
o = bts |
|
|
|
|
return |
|
|
|
@ -1554,7 +1407,7 @@ func (z *VolInfo) 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 VolInfo) Msgsize() (s int) { |
|
|
|
|
s = 1 + 5 + msgp.StringPrefixSize + len(z.Name) + 8 + msgp.TimeSize |
|
|
|
|
s = 1 + msgp.StringPrefixSize + len(z.Name) + msgp.TimeSize |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1572,41 +1425,25 @@ func (z *VolsInfo) DecodeMsg(dc *msgp.Reader) (err error) { |
|
|
|
|
(*z) = make(VolsInfo, zb0002) |
|
|
|
|
} |
|
|
|
|
for zb0001 := range *z { |
|
|
|
|
var field []byte |
|
|
|
|
_ = field |
|
|
|
|
var zb0003 uint32 |
|
|
|
|
zb0003, err = dc.ReadMapHeader() |
|
|
|
|
zb0003, err = dc.ReadArrayHeader() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, zb0001) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
for zb0003 > 0 { |
|
|
|
|
zb0003-- |
|
|
|
|
field, err = dc.ReadMapKeyPtr() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, zb0001) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
switch msgp.UnsafeString(field) { |
|
|
|
|
case "Name": |
|
|
|
|
(*z)[zb0001].Name, err = dc.ReadString() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, zb0001, "Name") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "Created": |
|
|
|
|
(*z)[zb0001].Created, err = dc.ReadTime() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, zb0001, "Created") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
default: |
|
|
|
|
err = dc.Skip() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, zb0001) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if zb0003 != 2 { |
|
|
|
|
err = msgp.ArrayError{Wanted: 2, Got: zb0003} |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
(*z)[zb0001].Name, err = dc.ReadString() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, zb0001, "Name") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
(*z)[zb0001].Created, err = dc.ReadTime() |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, zb0001, "Created") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return |
|
|
|
@ -1620,9 +1457,8 @@ func (z VolsInfo) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
for zb0004 := range z { |
|
|
|
|
// map header, size 2
|
|
|
|
|
// write "Name"
|
|
|
|
|
err = en.Append(0x82, 0xa4, 0x4e, 0x61, 0x6d, 0x65) |
|
|
|
|
// array header, size 2
|
|
|
|
|
err = en.Append(0x92) |
|
|
|
|
if err != nil { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
@ -1631,11 +1467,6 @@ func (z VolsInfo) EncodeMsg(en *msgp.Writer) (err error) { |
|
|
|
|
err = msgp.WrapError(err, zb0004, "Name") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
// write "Created"
|
|
|
|
|
err = en.Append(0xa7, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64) |
|
|
|
|
if err != nil { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
err = en.WriteTime(z[zb0004].Created) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, zb0004, "Created") |
|
|
|
@ -1650,12 +1481,9 @@ func (z VolsInfo) MarshalMsg(b []byte) (o []byte, err error) { |
|
|
|
|
o = msgp.Require(b, z.Msgsize()) |
|
|
|
|
o = msgp.AppendArrayHeader(o, uint32(len(z))) |
|
|
|
|
for zb0004 := range z { |
|
|
|
|
// map header, size 2
|
|
|
|
|
// string "Name"
|
|
|
|
|
o = append(o, 0x82, 0xa4, 0x4e, 0x61, 0x6d, 0x65) |
|
|
|
|
// array header, size 2
|
|
|
|
|
o = append(o, 0x92) |
|
|
|
|
o = msgp.AppendString(o, z[zb0004].Name) |
|
|
|
|
// string "Created"
|
|
|
|
|
o = append(o, 0xa7, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64) |
|
|
|
|
o = msgp.AppendTime(o, z[zb0004].Created) |
|
|
|
|
} |
|
|
|
|
return |
|
|
|
@ -1675,41 +1503,25 @@ func (z *VolsInfo) UnmarshalMsg(bts []byte) (o []byte, err error) { |
|
|
|
|
(*z) = make(VolsInfo, zb0002) |
|
|
|
|
} |
|
|
|
|
for zb0001 := range *z { |
|
|
|
|
var field []byte |
|
|
|
|
_ = field |
|
|
|
|
var zb0003 uint32 |
|
|
|
|
zb0003, bts, err = msgp.ReadMapHeaderBytes(bts) |
|
|
|
|
zb0003, bts, err = msgp.ReadArrayHeaderBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, zb0001) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
for zb0003 > 0 { |
|
|
|
|
zb0003-- |
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, zb0001) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
switch msgp.UnsafeString(field) { |
|
|
|
|
case "Name": |
|
|
|
|
(*z)[zb0001].Name, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, zb0001, "Name") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
case "Created": |
|
|
|
|
(*z)[zb0001].Created, bts, err = msgp.ReadTimeBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, zb0001, "Created") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
default: |
|
|
|
|
bts, err = msgp.Skip(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, zb0001) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if zb0003 != 2 { |
|
|
|
|
err = msgp.ArrayError{Wanted: 2, Got: zb0003} |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
(*z)[zb0001].Name, bts, err = msgp.ReadStringBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, zb0001, "Name") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
(*z)[zb0001].Created, bts, err = msgp.ReadTimeBytes(bts) |
|
|
|
|
if err != nil { |
|
|
|
|
err = msgp.WrapError(err, zb0001, "Created") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
o = bts |
|
|
|
@ -1720,7 +1532,7 @@ func (z *VolsInfo) UnmarshalMsg(bts []byte) (o []byte, err error) { |
|
|
|
|
func (z VolsInfo) Msgsize() (s int) { |
|
|
|
|
s = msgp.ArrayHeaderSize |
|
|
|
|
for zb0004 := range z { |
|
|
|
|
s += 1 + 5 + msgp.StringPrefixSize + len(z[zb0004].Name) + 8 + msgp.TimeSize |
|
|
|
|
s += 1 + msgp.StringPrefixSize + len(z[zb0004].Name) + msgp.TimeSize |
|
|
|
|
} |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|