util

package
v0.0.0-...-6646f2c Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: MIT 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