peers

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: MIT Imports: 1 Imported by: 0

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.

Jump to

Keyboard shortcuts

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