util

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: Apache-2.0, 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