Current section

Files

Jump to
spawn lib actors registry load_balancer.ex
Raw

lib/actors/registry/load_balancer.ex

defmodule Actors.Registry.LoadBalancer do
@moduledoc """
`LoadBalance` to call hosts
"""
@strategy Application.compile_env(
:spawn,
:load_blance_strategy,
Actors.Registry.LoadBalance.Strategies.Random
)
defdelegate next_host(hosts), to: @strategy, as: :next_host
end