forked from TrueCloudLab/frostfs-node
[#52] object/range: Add full range option to parameters
Add FullRange option to get range operation parameters that allows to get payload range [0:object_size] w/o the actual knowledge of the object size. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
abf9ad3573
commit
3880315a3f
2 changed files with 16 additions and 4 deletions
|
@ -5,7 +5,7 @@ import (
|
|||
)
|
||||
|
||||
type Prm struct {
|
||||
local bool
|
||||
local, full bool
|
||||
|
||||
addr *object.Address
|
||||
|
||||
|
@ -37,3 +37,11 @@ func (p *Prm) WithRange(v *object.Range) *Prm {
|
|||
|
||||
return p
|
||||
}
|
||||
|
||||
func (p *Prm) FullRange() *Prm {
|
||||
if p != nil {
|
||||
p.full = true
|
||||
}
|
||||
|
||||
return p
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue