forked from TrueCloudLab/frostfs-node
[#1418] engine: Do not use pointers as parameters
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
5f57db6bf8
commit
14366bbd89
5 changed files with 6 additions and 6 deletions
|
@ -70,7 +70,7 @@ func (e *StorageEngine) containerSize(prm ContainerSizePrm) (*ContainerSizeRes,
|
||||||
defer elapsed(e.metrics.AddEstimateContainerSizeDuration)()
|
defer elapsed(e.metrics.AddEstimateContainerSizeDuration)()
|
||||||
}
|
}
|
||||||
|
|
||||||
var res ContainerSizeRes
|
res := new(ContainerSizeRes)
|
||||||
|
|
||||||
e.iterateOverUnsortedShards(func(sh hashedShard) (stop bool) {
|
e.iterateOverUnsortedShards(func(sh hashedShard) (stop bool) {
|
||||||
size, err := shard.ContainerSize(sh.Shard, prm.cnr)
|
size, err := shard.ContainerSize(sh.Shard, prm.cnr)
|
||||||
|
@ -86,7 +86,7 @@ func (e *StorageEngine) containerSize(prm ContainerSizePrm) (*ContainerSizeRes,
|
||||||
return false
|
return false
|
||||||
})
|
})
|
||||||
|
|
||||||
return &res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ListContainers returns a unique container IDs presented in the engine objects.
|
// ListContainers returns a unique container IDs presented in the engine objects.
|
||||||
|
|
|
@ -31,7 +31,7 @@ func (p *GetPrm) WithAddress(addr oid.Address) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Object returns the requested object.
|
// Object returns the requested object.
|
||||||
func (r *GetRes) Object() *objectSDK.Object {
|
func (r GetRes) Object() *objectSDK.Object {
|
||||||
return r.obj
|
return r.obj
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ func (p *HeadPrm) WithRaw(raw bool) {
|
||||||
// Header returns the requested object header.
|
// Header returns the requested object header.
|
||||||
//
|
//
|
||||||
// Instance has empty payload.
|
// Instance has empty payload.
|
||||||
func (r *HeadRes) Header() *objectSDK.Object {
|
func (r HeadRes) Header() *objectSDK.Object {
|
||||||
return r.head
|
return r.head
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ func (p *RngPrm) WithPayloadRange(rng *objectSDK.Range) {
|
||||||
// Object returns the requested object part.
|
// Object returns the requested object part.
|
||||||
//
|
//
|
||||||
// Instance payload contains the requested range of the original object.
|
// Instance payload contains the requested range of the original object.
|
||||||
func (r *RngRes) Object() *objectSDK.Object {
|
func (r RngRes) Object() *objectSDK.Object {
|
||||||
return r.obj
|
return r.obj
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ func (p *SelectPrm) WithFilters(fs object.SearchFilters) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddressList returns list of addresses of the selected objects.
|
// AddressList returns list of addresses of the selected objects.
|
||||||
func (r *SelectRes) AddressList() []oid.Address {
|
func (r SelectRes) AddressList() []oid.Address {
|
||||||
return r.addrList
|
return r.addrList
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue