forked from TrueCloudLab/frostfs-http-gw
[#178] Update SDK to v1.0.0-rc.5
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
f46ee45843
commit
0fb75a1cde
10 changed files with 143 additions and 134 deletions
7
app.go
7
app.go
|
@ -18,6 +18,7 @@ import (
|
|||
"github.com/nspcc-dev/neofs-http-gw/uploader"
|
||||
"github.com/nspcc-dev/neofs-http-gw/utils"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/pool"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/user"
|
||||
"github.com/spf13/viper"
|
||||
"github.com/valyala/fasthttp"
|
||||
"go.uber.org/zap"
|
||||
|
@ -27,6 +28,7 @@ type (
|
|||
app struct {
|
||||
log *zap.Logger
|
||||
pool *pool.Pool
|
||||
owner *user.ID
|
||||
cfg *viper.Viper
|
||||
webServer *fasthttp.Server
|
||||
webDone chan struct{}
|
||||
|
@ -102,6 +104,10 @@ func newApp(ctx context.Context, opt ...Option) App {
|
|||
a.log.Fatal("failed to get neofs credentials", zap.Error(err))
|
||||
}
|
||||
|
||||
var owner user.ID
|
||||
user.IDFromKey(&owner, key.PublicKey)
|
||||
a.owner = &owner
|
||||
|
||||
var prm pool.InitParameters
|
||||
prm.SetKey(key)
|
||||
prm.SetNodeDialTimeout(a.cfg.GetDuration(cfgConTimeout))
|
||||
|
@ -319,6 +325,7 @@ func (a *app) AppParams() *utils.AppParams {
|
|||
return &utils.AppParams{
|
||||
Logger: a.log,
|
||||
Pool: a.pool,
|
||||
Owner: a.owner,
|
||||
Resolver: a.resolver,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue