2020-09-25 13:04:55 +00:00
|
|
|
package rangesvc
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/nspcc-dev/neofs-api-go/pkg/object"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Prm struct {
|
2020-09-26 07:53:08 +00:00
|
|
|
local, full bool
|
2020-09-25 13:04:55 +00:00
|
|
|
|
|
|
|
addr *object.Address
|
|
|
|
|
|
|
|
rng *object.Range
|
|
|
|
|
|
|
|
traverser *rangeTraverser
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Prm) OnlyLocal(v bool) *Prm {
|
|
|
|
if p != nil {
|
|
|
|
p.local = v
|
|
|
|
}
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Prm) WithAddress(v *object.Address) *Prm {
|
|
|
|
if p != nil {
|
|
|
|
p.addr = v
|
|
|
|
}
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Prm) WithRange(v *object.Range) *Prm {
|
|
|
|
if p != nil {
|
|
|
|
p.rng = v
|
|
|
|
}
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|
2020-09-26 07:53:08 +00:00
|
|
|
|
|
|
|
func (p *Prm) FullRange() *Prm {
|
|
|
|
if p != nil {
|
|
|
|
p.full = true
|
|
|
|
}
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|