[#346] Upgrade NeoFS SDK Go library

Core changes:
  - `object.ID` moved to new package `oid`;
  - `object.Address` moved to new package `address`;
  - `pool.Object` interface changes.

Additionally:
  - Set container owner in `Agent.IssueSecret`.
  - Remove no longer needed fields from `GetObjectParams`
  - `Length` and `Offset` are never assigned. These values
  are set in `Range` field.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-02-08 19:54:04 +03:00 committed by LeL
parent 6a4fba4d09
commit 34a221c5c9
28 changed files with 430 additions and 518 deletions

View file

@ -5,6 +5,7 @@ import (
"github.com/bluele/gcache"
"github.com/nspcc-dev/neofs-sdk-go/object"
"github.com/nspcc-dev/neofs-sdk-go/object/address"
)
// ObjectsCache provides lru cache for objects.
@ -31,7 +32,7 @@ func New(config *Config) *ObjectsCache {
}
// Get returns cached object.
func (o *ObjectsCache) Get(address *object.Address) *object.Object {
func (o *ObjectsCache) Get(address *address.Address) *object.Object {
entry, err := o.cache.Get(address.String())
if err != nil {
return nil
@ -51,6 +52,6 @@ func (o *ObjectsCache) Put(obj object.Object) error {
}
// Delete deletes an object from cache.
func (o *ObjectsCache) Delete(address *object.Address) bool {
func (o *ObjectsCache) Delete(address *address.Address) bool {
return o.cache.Remove(address.String())
}