Vik.Store (Vik v0.0.1-rc1)
View SourceThe Store is a key-value store that holds the compile
results (Vik.Result
) by slug.
Summary
Types
@type state() :: %{required(Vik.slug()) => Vik.Result.t()}
@type status() :: :up | :down | :stale
Functions
@spec fetch(Vik.Shard.t()) :: {:ok, Vik.Result.t()} | {:error, term()}
@spec fetch(Vik.slug()) :: {:ok, Vik.Result.t()} | {:error, term()}
@spec fetch!(Vik.Shard.t()) :: Vik.Result.t()
@spec fetch!(Vik.slug()) :: Vik.Result.t()
@spec get(Vik.Shard.t()) :: Vik.Result.t() | nil
@spec get(Vik.slug()) :: Vik.Result.t() | nil
@spec mark_stale(Vik.Shard.t()) :: :ok
@spec mark_stale(Vik.slug()) :: :ok
@spec put(Vik.Shard.t(), Vik.Result.t()) :: :ok
@spec put(Vik.slug(), Vik.Result.t()) :: :ok
@spec status(Vik.Shard.t()) :: status()
@spec status(Vik.slug()) :: status()