[#1689] network,core/netmap: Replace Iterate*() functions with iterators
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m25s
Build / Build Components (push) Successful in 1m57s
Pre-commit hooks / Pre-commit (push) Successful in 1m58s
Tests and linters / Run gofumpt (push) Successful in 3m50s
Tests and linters / Staticcheck (push) Successful in 4m21s
Tests and linters / Lint (push) Successful in 4m25s
Tests and linters / gopls check (push) Successful in 4m27s
Tests and linters / Tests (push) Successful in 4m44s
OCI image / Build container images (push) Successful in 5m19s
Tests and linters / Tests with -race (push) Successful in 5m32s

Change-Id: I4842a3160d74c56d99ea9465d4be2f0662080605
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2025-04-04 20:31:35 +03:00
parent e65d578ba9
commit 2d1232ce6d
6 changed files with 33 additions and 27 deletions

View file

@ -3,6 +3,7 @@ package client
import (
"bytes"
"fmt"
"iter"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/network"
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/client"
@ -19,7 +20,7 @@ func nodeInfoFromKeyAddr(dst *NodeInfo, k []byte, a, external network.AddressGro
// Args must not be nil.
func NodeInfoFromRawNetmapElement(dst *NodeInfo, info interface {
PublicKey() []byte
IterateAddresses(func(string) bool)
Addresses() iter.Seq[string]
NumberOfAddresses() int
ExternalAddresses() []string
},