util

package
v0.0.0-...-a52a6fd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2020 License: Apache-2.0, MIT, Apache-2.0, + 1 more Imports: 4 Imported by: 0

Documentation

Overview

Package util is a utility package used by the allocator implementations. This package provides the SortNumeric function, which may be used by an allocator to sort peers by their metric values (ascending or descending).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SortNumeric

func SortNumeric(candidates map[peer.ID]*api.Metric, reverse bool) []peer.ID

SortNumeric returns a list of peers sorted by their metric values. If reverse is false (true), peers will be sorted from smallest to largest (largest to smallest) metric

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL