Distributed RPC load balancer built on :pg.
Acts as a per-instance Supervisor that starts the caches and GenServer
needed for a single load balancer. Also provides the public API for
node selection, RPC calls/casts, and low-level :erpc wrappers.
Starting a load balancer
RpcLoadBalancer.start_link(
name: :my_lb,
selection_algorithm: RpcLoadBalancer.LoadBalancer.SelectionAlgorithm.RoundRobin,
algorithm_opts: [weights: %{node() => 1}]
)
Summary
Functions
Returns a specification to start this module under a supervisor.
Types
@type name() :: atom()
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec get_members(name()) :: {:ok, [node()]} | {:error, ErrorMessage.t()}
@spec select_node( name(), keyword() ) :: {:ok, node()} | {:error, ErrorMessage.t()}
@spec start_link(keyword()) :: Supervisor.on_start()