adbbad0beb
`network.Address` structure in most cases created once and used read-only. Replace `AddressFromString` function with `Address.FromString` method with the same purpose and implementation. Make all libraries to work with value. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
31 lines
522 B
Go
31 lines
522 B
Go
package searchsvc
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/nspcc-dev/neofs-node/pkg/network"
|
|
"go.uber.org/zap"
|
|
)
|
|
|
|
func (exec *execCtx) processNode(ctx context.Context, addr network.Address) {
|
|
log := exec.log.With(zap.Stringer("remote node", addr))
|
|
|
|
log.Debug("processing node...")
|
|
|
|
client, ok := exec.remoteClient(addr)
|
|
if !ok {
|
|
return
|
|
}
|
|
|
|
ids, err := client.searchObjects(exec)
|
|
|
|
if err != nil {
|
|
exec.log.Debug("local operation failed",
|
|
zap.String("error", err.Error()),
|
|
)
|
|
|
|
return
|
|
}
|
|
|
|
exec.writeIDList(ids)
|
|
}
|