[#227] netmap: Do not export default weightFunc initializer

`GetDefaultWeightFunc` is not usable outside placement context.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-06-07 09:01:25 +03:00 committed by LeL
parent 6796b4a29a
commit 86bdc670d5
2 changed files with 4 additions and 4 deletions

View file

@ -146,7 +146,7 @@ func flattenNodes(ns []nodes) nodes {
// GetPlacementVectors returns placement vectors for an object given containerNodes cnt.
func (m *Netmap) GetPlacementVectors(vectors [][]NodeInfo, pivot []byte) ([][]NodeInfo, error) {
h := hrw.Hash(pivot)
wf := GetDefaultWeightFunc(m.nodes)
wf := defaultWeightFunc(m.nodes)
result := make([][]NodeInfo, len(vectors))
for i := range vectors {