View Source LibRedis.SlotStore behaviour (lib_redis v0.1.0)

slot store behaviour, used to store slots layer

Link to this section Summary

Link to this section Types

@type node_info() :: %{ip: bitstring(), port: non_neg_integer()}
@type opts() :: keyword()
@type slot() :: %{
  start_slot: non_neg_integer(),
  end_slot: non_neg_integer(),
  master: node_info(),
  replicas: [node_info()]
}
@type t() :: struct()

Link to this section Callbacks

@callback get(t()) :: [slot()]
@callback new(opts()) :: t()
@callback put(t(), [slot()]) :: :ok | {:error, any()}
@callback start_link([{:store, t()}]) :: GenServer.on_start()

Link to this section Functions