View Source Wayfarer.Target.Selector (wayfarer v0.6.1)

Given a list of targets and an algorithm decide which target the request should be forwarded to.

Summary

Types

The algorithm used to select which target to forward requests to (when there is more than one matching target).

Functions

Tries to choose a target from the list of targets to send the request to based on the chosen algorithm.

A guard for testing if an algorithm is supported.

Types

@type algorithm() :: :least_connections | :random | :round_robin | :sticky

The algorithm used to select which target to forward requests to (when there is more than one matching target).

Functions

Link to this function

choose(conn, targets, arg3)

View Source

Tries to choose a target from the list of targets to send the request to based on the chosen algorithm.

Link to this macro

is_algorithm(algorithm)

View Source (macro)
@spec is_algorithm(any()) :: Macro.output()

A guard for testing if an algorithm is supported.