ranker_strategy

package
v0.0.0-...-4adfca9 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2020 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_DELAY_BETWEEN_LATENCY_CHECK_ICMP = 2000
View Source
const HEALTH_PORT = 23800
View Source
const LATENCY_HISTORY_LEN = 50

Variables

This section is empty.

Functions

This section is empty.

Types

type LatencyRankingStrategy

type LatencyRankingStrategy struct {
	// contains filtered or unexported fields
}
	Ranking keeps track of node health statistics
	and helps to rank nodes based on those statistics
    implements Ranker interface

func (*LatencyRankingStrategy) AddNode

func (l *LatencyRankingStrategy) AddNode(ipAddr string)

Add nodes to be tested by ranker

func (*LatencyRankingStrategy) GetTopNodes

func (l *LatencyRankingStrategy) GetTopNodes(num int) []string

Return the top N nodes

func (*LatencyRankingStrategy) Initialize

func (l *LatencyRankingStrategy) Initialize()

Create ranking strategy

func (*LatencyRankingStrategy) RemoveNode

func (l *LatencyRankingStrategy) RemoveNode(ipAddr string)

remove nodes that should no longer be tested by ranker

func (*LatencyRankingStrategy) StartLatencyChecks

func (l *LatencyRankingStrategy) StartLatencyChecks()

Performs a health check on nodes on an interval

Jump to

Keyboard shortcuts

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