[#250] v2/container: Add epoch field to size announce body

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-01-26 21:32:33 +03:00 committed by Alex Vanin
parent 5566081d2d
commit e27d76e804
7 changed files with 127 additions and 78 deletions

View file

@ -94,6 +94,8 @@ type GetExtendedACLResponseBody struct {
}
type UsedSpaceAnnouncement struct {
epoch uint64
cid *refs.ContainerID
usedSpace uint64
@ -917,6 +919,20 @@ func (r *GetExtendedACLResponse) SetVerificationHeader(v *session.ResponseVerifi
}
}
func (a *UsedSpaceAnnouncement) GetEpoch() uint64 {
if a != nil {
return a.epoch
}
return 0
}
func (a *UsedSpaceAnnouncement) SetEpoch(v uint64) {
if a != nil {
a.epoch = v
}
}
func (a *UsedSpaceAnnouncement) GetUsedSpace() uint64 {
if a != nil {
return a.usedSpace