forked from TrueCloudLab/frostfs-http-gw
[#115] Update sdk version to support priority
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
1bb6c5f384
commit
71e846a4fc
7 changed files with 50 additions and 102 deletions
|
@ -9,6 +9,8 @@ import (
|
|||
"strconv"
|
||||
"time"
|
||||
|
||||
apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status"
|
||||
|
||||
"github.com/nspcc-dev/neofs-http-gw/response"
|
||||
"github.com/nspcc-dev/neofs-http-gw/tokens"
|
||||
"github.com/nspcc-dev/neofs-http-gw/utils"
|
||||
|
@ -196,9 +198,12 @@ func (pr *putResponse) encode(w io.Writer) error {
|
|||
func getEpochDurations(ctx context.Context, p pool.Pool) (*epochDurations, error) {
|
||||
if conn, _, err := p.Connection(); err != nil {
|
||||
return nil, err
|
||||
} else if networkInfo, err := conn.NetworkInfo(ctx); err != nil {
|
||||
} else if networkInfoRes, err := conn.NetworkInfo(ctx); err != nil {
|
||||
return nil, err
|
||||
} else if err = apistatus.ErrFromStatus(networkInfoRes.Status()); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
networkInfo := networkInfoRes.Info()
|
||||
res := &epochDurations{
|
||||
currentEpoch: networkInfo.CurrentEpoch(),
|
||||
msPerBlock: networkInfo.MsPerBlock(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue