[#250] v2/container: Add epoch field to size announce body
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
5566081d2d
commit
e27d76e804
7 changed files with 127 additions and 78 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue