Shardex.Adapter.Generic (shardex v0.1.0)

Copy Markdown View Source

Adapter for any pool: you provide the child spec and the ref.

es_1: {Shardex.Adapter.Generic,
       child_spec: {MyApp.ES.Cluster1, []},
       ref: MyApp.ES.Cluster1}

Options:

  • :ref (required) - value passed to callers
  • :child_spec - any Supervisor.child_spec/2 input; omit for pools started elsewhere
  • :run - optional (ref, fun -> result) function, or {m, f, a} called as apply(m, f, [ref, fun | a]), to wrap calls in context