Horde v0.7.1 Horde.DistributionStrategy behaviour View Source

Define your own distribution strategy by implementing this behaviour and configuring Horde to use it.

See Horde.UniformQuorumDistribution and Horde.UniformDistribution for examples.

Link to this section Summary

Link to this section Types

Link to this section Callbacks

Link to this callback

choose_node(identifier, members) View Source
choose_node(
  identifier :: String.t(),
  members :: [Horde.DynamicSupervisor.Member.t()]
) :: {:ok, Horde.DynamicSupervisor.Member.t()} | {:error, reason :: String.t()}

Link to this callback

has_quorum?(members) View Source
has_quorum?(members :: [Horde.DynamicSupervisor.Member.t()]) :: boolean()