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
Click to show internal directories.
Click to hide internal directories.