forked from TrueCloudLab/frostfs-s3-gw
[#269] Create frostfsid wrapper with cache
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
parent
43a687b572
commit
5315f7b733
5 changed files with 143 additions and 9 deletions
7
api/cache/frostfsid.go
vendored
7
api/cache/frostfsid.go
vendored
|
@ -6,8 +6,6 @@ import (
|
|||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-contract/frostfsid/client"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-s3-gw/internal/logs"
|
||||
"git.frostfs.info/TrueCloudLab/policy-engine/pkg/chain"
|
||||
"git.frostfs.info/TrueCloudLab/policy-engine/pkg/engine"
|
||||
"github.com/bluele/gcache"
|
||||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||
|
@ -20,11 +18,6 @@ type FrostfsIDCache struct {
|
|||
logger *zap.Logger
|
||||
}
|
||||
|
||||
type FrostfsIDCacheKey struct {
|
||||
Target engine.Target
|
||||
Name chain.Name
|
||||
}
|
||||
|
||||
const (
|
||||
// DefaultFrostfsIDCacheSize is a default maximum number of entries in cache.
|
||||
DefaultFrostfsIDCacheSize = 1e4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue