Nebulex.Adapters.Redis.Cluster (Nebulex.Adapters.Redis v3.0.0-rc.1)

View Source

Redis Cluster Manager

Summary

Types

Proxy type to the adapter meta

Types

adapter_meta()

@type adapter_meta() :: Nebulex.Adapter.adapter_meta()

Proxy type to the adapter meta

Functions

command(map, command, opts, init_acc \\ nil, reducer \\ fn res, _ -> res end)

@spec command(
  adapter_meta(),
  Redix.command(),
  keyword(),
  init_acc :: any(),
  (any(), any() -> any())
) :: any()

del_status_key(name)

@spec del_status_key(atom()) :: :ok

fetch_conn(map, key, opts)

@spec fetch_conn(adapter_meta(), {:"$hash_slot", any()} | any(), keyword()) ::
  {:ok, pid()} | {:error, Nebulex.Error.t()}

get_status(name, default \\ nil)

@spec get_status(atom(), atom()) :: atom()

group_keys_by_hash_slot(enum, keyslot, type)

@spec group_keys_by_hash_slot(
  Enum.t(),
  Nebulex.Adapters.Redis.Cluster.Keyslot.t(),
  atom()
) :: map()

hash_slot(key, keyslot \\ &Keyslot.hash_slot/2)

@spec hash_slot(any(), Nebulex.Adapters.Redis.Cluster.Keyslot.t()) ::
  {:"$hash_slot", non_neg_integer()}

init(adapter_meta, opts)

put_status(name, status)

@spec put_status(atom(), atom()) :: :ok

with_retry(name, retries, fun)

@spec with_retry(atom(), pos_integer() | :infinity, (-> any())) :: any()