forked from TrueCloudLab/frostfs-s3-gw
[#458] *: Refactor working with NeoFS identities
Pull latest changes from NeoFS SDK Go library. Decrease redundant and unsafe usage of ID pointers. Use `EncodeToString` method in order to calculate protocol strings. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
3f0dbcc995
commit
087d500c5f
34 changed files with 259 additions and 280 deletions
8
api/cache/objectslist.go
vendored
8
api/cache/objectslist.go
vendored
|
@ -79,8 +79,8 @@ func (l *ObjectsListCache) Put(key ObjectsListKey, oids []oid.ID) error {
|
|||
}
|
||||
|
||||
// CleanCacheEntriesContainingObject deletes entries containing specified object.
|
||||
func (l *ObjectsListCache) CleanCacheEntriesContainingObject(objectName string, cid *cid.ID) {
|
||||
cidStr := cid.String()
|
||||
func (l *ObjectsListCache) CleanCacheEntriesContainingObject(objectName string, cnr cid.ID) {
|
||||
cidStr := cnr.EncodeToString()
|
||||
keys := l.cache.Keys(true)
|
||||
for _, key := range keys {
|
||||
k, ok := key.(ObjectsListKey)
|
||||
|
@ -94,9 +94,9 @@ func (l *ObjectsListCache) CleanCacheEntriesContainingObject(objectName string,
|
|||
}
|
||||
|
||||
// CreateObjectsListCacheKey returns ObjectsListKey with the given CID and prefix.
|
||||
func CreateObjectsListCacheKey(cid *cid.ID, prefix string) ObjectsListKey {
|
||||
func CreateObjectsListCacheKey(cnr cid.ID, prefix string) ObjectsListKey {
|
||||
p := ObjectsListKey{
|
||||
cid: cid.String(),
|
||||
cid: cnr.EncodeToString(),
|
||||
prefix: prefix,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue