herd v0.3.0 Herd.Pool View Source
Builds a connection pool manager for a given herd. The manager has a number of overrideable functions, including:
- spec_for_node/1 - infers a child spec for a given node in the cluster
- nodename/1 - generates an atom for a given node
- poolname/1 - generates a {:via, Registry, {MyRegistry, name}} tuple for a given node
- workerconfig/1 - generates the worker config only for a given node. Note that pool config is inferred from `Application.getenv(app, __MODULE)` by default which might be sufficient for configuring poolboy.
Use with:
defmodule MyHerdPool do
use Herd.Pool, otp_app: :myapp, herd: :myherd
end