forked from TrueCloudLab/frostfs-s3-gw
[#416] Use tree service to list objects
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
7e8b57605a
commit
25477cdaf8
6 changed files with 342 additions and 35 deletions
14
api/cache/objectslist.go
vendored
14
api/cache/objectslist.go
vendored
|
@ -33,8 +33,9 @@ type (
|
|||
|
||||
// ObjectsListKey is a key to find a ObjectsListCache's entry.
|
||||
ObjectsListKey struct {
|
||||
cid string
|
||||
prefix string
|
||||
cid string
|
||||
prefix string
|
||||
latestOnly bool
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -103,11 +104,12 @@ func (l *ObjectsListCache) CleanCacheEntriesContainingObject(objectName string,
|
|||
}
|
||||
}
|
||||
|
||||
// CreateObjectsListCacheKey returns ObjectsListKey with the given CID and prefix.
|
||||
func CreateObjectsListCacheKey(cnr cid.ID, prefix string) ObjectsListKey {
|
||||
// CreateObjectsListCacheKey returns ObjectsListKey with the given CID, prefix and latestOnly flag.
|
||||
func CreateObjectsListCacheKey(cnr *cid.ID, prefix string, latestOnly bool) ObjectsListKey {
|
||||
p := ObjectsListKey{
|
||||
cid: cnr.EncodeToString(),
|
||||
prefix: prefix,
|
||||
cid: cnr.EncodeToString(),
|
||||
prefix: prefix,
|
||||
latestOnly: latestOnly,
|
||||
}
|
||||
|
||||
return p
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue