defmodule Memcache.Cluster.Hash do def start_link(cluster_options, connections_options, supervisor_options) do import Supervisor.Spec children = Enum.map(Enum.with_index(connections_options), fn connection_options, i -> worker(Connection, [connection_options], id: i) end) opts = Keyword.merge([strategy: :one_for_one], supervisor_options) Supervisor.start_link(children, opts) end end