forked from TrueCloudLab/frostfs-http-gw
[#185] Update SDK to support new tree/pool version
Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
This commit is contained in:
parent
e1b670a727
commit
1db62f9d95
15 changed files with 299 additions and 38 deletions
|
@ -65,6 +65,7 @@ type (
|
|||
services []*metrics.Service
|
||||
settings *appSettings
|
||||
loggerSettings *loggerSettings
|
||||
bucketCache *cache.BucketCache
|
||||
|
||||
servers []Server
|
||||
unbindServers []ServerInfo
|
||||
|
@ -134,6 +135,7 @@ func newApp(ctx context.Context, v *viper.Viper) App {
|
|||
loggerSettings: logSettings,
|
||||
webServer: new(fasthttp.Server),
|
||||
webDone: make(chan struct{}),
|
||||
bucketCache: cache.NewBucketCache(getBucketCacheOptions(v, log.logger), v.GetBool(cfgFeaturesTreePoolNetmapSupport)),
|
||||
}
|
||||
|
||||
a.initAppSettings()
|
||||
|
@ -151,7 +153,7 @@ func newApp(ctx context.Context, v *viper.Viper) App {
|
|||
a.webServer.DisablePreParseMultipartForm = true
|
||||
a.webServer.StreamRequestBody = a.cfg.GetBool(cfgWebStreamRequestBody)
|
||||
// -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||
a.pool, a.treePool, a.key = getPools(ctx, a.log, a.cfg, a.settings.dialerSource)
|
||||
a.initPools(ctx)
|
||||
|
||||
var owner user.ID
|
||||
user.IDFromKey(&owner, a.key.PrivateKey.PublicKey)
|
||||
|
@ -839,7 +841,7 @@ func (a *app) AppParams() *handler.AppParams {
|
|||
FrostFS: frostfs.NewFrostFS(a.pool),
|
||||
Owner: a.owner,
|
||||
Resolver: a.resolver,
|
||||
Cache: cache.NewBucketCache(getCacheOptions(a.cfg, a.log)),
|
||||
Cache: a.bucketCache,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue