Documentation ¶
Overview ¶
Package peers provides helpers for managing TChannel peers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHRWScorer ¶
func NewHRWScorer(clientID uint32) tchannel.ScoreCalculator
NewHRWScorer returns a ScoreCalculator based on Rendezvous or Highest Random Weight hashing. It is useful for distributing load in peer-to-peer situations where we have many clients picking from a set of servers with "sticky" semantics that will spread load evenly as servers go down or new servers are added. The clientID is used to score the servers, so each client should pass in a unique client ID.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.