forked from TrueCloudLab/frostfs-node
[#1648] morph: Change endpoint priority order
The lowest value means the highest priority. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
2467be0117
commit
a97dee008c
10 changed files with 67 additions and 17 deletions
|
@ -19,7 +19,7 @@ type endpoints struct {
|
|||
|
||||
func (e *endpoints) init(ee []Endpoint) {
|
||||
sort.SliceStable(ee, func(i, j int) bool {
|
||||
return ee[i].Priority > ee[j].Priority
|
||||
return ee[i].Priority < ee[j].Priority
|
||||
})
|
||||
|
||||
e.curr = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue