forked from TrueCloudLab/frostfs-node
[#1214] *: Use single Object
type in whole project
Remove `Object` and `RawObject` types from `pkg/core/object` package. Use `Object` type from NeoFS SDK Go library everywhere. Avoid using the deprecated elements. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
19ad349b27
commit
7ccd1625af
100 changed files with 847 additions and 965 deletions
|
@ -5,13 +5,14 @@ import (
|
|||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/core/object"
|
||||
storagelog "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/internal/log"
|
||||
objectSDK "github.com/nspcc-dev/neofs-sdk-go/object"
|
||||
)
|
||||
|
||||
// ErrBigObject is returned when object is too big to be placed in cache.
|
||||
var ErrBigObject = errors.New("too big object")
|
||||
|
||||
// Put puts object to write-cache.
|
||||
func (c *cache) Put(o *object.Object) error {
|
||||
func (c *cache) Put(o *objectSDK.Object) error {
|
||||
c.modeMtx.RLock()
|
||||
defer c.modeMtx.RUnlock()
|
||||
if c.mode == ModeReadOnly {
|
||||
|
@ -29,7 +30,7 @@ func (c *cache) Put(o *object.Object) error {
|
|||
}
|
||||
|
||||
oi := objectInfo{
|
||||
addr: o.Address().String(),
|
||||
addr: object.AddressOf(o).String(),
|
||||
obj: o,
|
||||
data: data,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue