herd v0.4.2 API Reference

Modules

A herd consists of three modules, a Cluster, a Pool, and a Supervisor. The cluster manages an ets table of all the current nodes to balance across, the pool supervises connection pools to each node, and a Supervisor supervises the cluster and the pool. They can be created more or less like so

Macro for generating a cluster manager. It will create, populate and refresh a Herd.Balancer in an ets table by polling the configured Herd.Discovery implementation

Behaviour for implementing service discovery on a given cluster. This will be polled regularly to keep the cluster’s state in sync

Config based service discovery for static clusters

Builds a connection pool manager for a given herd. The manager has a number of overrideable functions, including

Manages load balancing between nodes in the cluster, for example through a hash ring

Hash Ring implementation of the Herd.Router behavior

Creates a Supervisor for the herd’s internal registry, it’s pool of pools, and the cluster. Use with