[#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:
parent
6796b4a29a
commit
86bdc670d5
2 changed files with 4 additions and 4 deletions
|
@ -58,7 +58,7 @@ func newContext(nm *Netmap) *context {
|
|||
|
||||
numCache: make(map[string]uint64),
|
||||
aggregator: newMeanIQRAgg,
|
||||
weightFunc: GetDefaultWeightFunc(nm.nodes),
|
||||
weightFunc: defaultWeightFunc(nm.nodes),
|
||||
cbf: defaultCBF,
|
||||
}
|
||||
}
|
||||
|
@ -78,8 +78,8 @@ func (c *context) setCBF(cbf uint32) {
|
|||
}
|
||||
}
|
||||
|
||||
// GetDefaultWeightFunc returns default weighting function.
|
||||
func GetDefaultWeightFunc(ns nodes) weightFunc {
|
||||
// defaultWeightFunc returns default weighting function.
|
||||
func defaultWeightFunc(ns nodes) weightFunc {
|
||||
mean := newMeanAgg()
|
||||
min := newMinAgg()
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue