[#1559] shard: Use Set prefix for parameter setting

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-07-13 15:43:04 +03:00 committed by fyrchik
parent 7b882b26d8
commit d8ba954aff
34 changed files with 114 additions and 142 deletions

View file

@ -24,25 +24,21 @@ type RngRes struct {
hasMeta bool
}
// WithAddress is a Rng option to set the address of the requested object.
// SetAddress is a Rng option to set the address of the requested object.
//
// Option is required.
func (p *RngPrm) WithAddress(addr oid.Address) {
if p != nil {
p.addr = addr
}
func (p *RngPrm) SetAddress(addr oid.Address) {
p.addr = addr
}
// WithRange is a GetRange option to set range of requested payload data.
func (p *RngPrm) WithRange(off uint64, ln uint64) {
if p != nil {
p.off, p.ln = off, ln
}
// SetRange is a GetRange option to set range of requested payload data.
func (p *RngPrm) SetRange(off uint64, ln uint64) {
p.off, p.ln = off, ln
}
// WithIgnoreMeta is a Get option try to fetch object from blobstor directly,
// SetIgnoreMeta is a Get option try to fetch object from blobstor directly,
// without accessing metabase.
func (p *RngPrm) WithIgnoreMeta(ignore bool) {
func (p *RngPrm) SetIgnoreMeta(ignore bool) {
p.skipMeta = ignore
}