View Source LibRedis.SlotStore (lib_redis v0.1.3)

used to store slot topology

Summary

Functions

get slots layer

new storage the only argument is :name, which is the name of the storage

srore slots layer

Types

@opaque node_info()
@opaque opts()
@opaque slot()
@type t() :: %LibRedis.SlotStore{name: GenServer.name()}

Functions

@spec get(t()) :: [slot()]

get slots layer

Examples

iex> s = LibRedis.SlotStore.Default.new()
iex> LibRedis.SlotStore.Default.get(s)
@spec new(opts()) :: t()

new storage the only argument is :name, which is the name of the storage

Examples

iex> LibRedis.SlotStore.Default.new(name: :slot_agent)
@spec put(t(), [slot()]) :: :ok

srore slots layer

Examples

iex> s = LibRedis.SlotStore.Default.new()
iex> LibRedis.SlotStore.Default.put(s, [%{start_slot: 0, end_slot: 1}])
:ok