EasyRpc.NodeUtils (EasyRpc v0.2.0)

View Source

NodeUtils is a helper module to help get target node in Elixir cluster. Support strategies: random, round-robin, hash. For case round-robin, the module will using process dictionary to store the current index.

Summary

Functions

Helper function to calculate target node by random, round-robin, or hash.

Functions

select_node(nodes, strategy, arg)

@spec select_node([node()], :random | :round_robin | :hash, {atom(), any()}) :: node()

Helper function to calculate target node by random, round-robin, or hash.