forked from TrueCloudLab/frostfs-node
[#1613] morph: Add tracing for morph queries to neo-go
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
parent
4de5fca547
commit
9b113c3156
120 changed files with 623 additions and 562 deletions
|
@ -1,6 +1,7 @@
|
|||
package placement
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/sha256"
|
||||
"fmt"
|
||||
|
||||
|
@ -35,12 +36,12 @@ func NewNetworkMapSourceBuilder(nmSrc netmap.Source) Builder {
|
|||
}
|
||||
}
|
||||
|
||||
func (s *netMapSrc) GetNetMap(_ uint64) (*netmapSDK.NetMap, error) {
|
||||
func (s *netMapSrc) GetNetMap(_ context.Context, _ uint64) (*netmapSDK.NetMap, error) {
|
||||
return s.nm, nil
|
||||
}
|
||||
|
||||
func (b *netMapBuilder) BuildPlacement(cnr cid.ID, obj *oid.ID, p netmapSDK.PlacementPolicy) ([][]netmapSDK.NodeInfo, error) {
|
||||
nm, err := netmap.GetLatestNetworkMap(b.nmSrc)
|
||||
func (b *netMapBuilder) BuildPlacement(ctx context.Context, cnr cid.ID, obj *oid.ID, p netmapSDK.PlacementPolicy) ([][]netmapSDK.NodeInfo, error) {
|
||||
nm, err := netmap.GetLatestNetworkMap(ctx, b.nmSrc)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not get network map: %w", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue