LemonCore. Checkpoint
(lemon_core v0.1.0)
View Source
Shared checkpoint store and filesystem rollback operations.
Summary
Functions
Directory checkpoints are written to; see LemonCore.Paths.checkpoint_dir/1.
Types
@type filesystem_snapshot() :: %{ path: String.t(), exists: boolean(), type: String.t() | nil, size: non_neg_integer() | nil, mode: non_neg_integer() | nil, content_b64: String.t() | nil }
Functions
@spec checkpoint_dir() :: String.t()
Directory checkpoints are written to; see LemonCore.Paths.checkpoint_dir/1.
@spec create( String.t(), keyword() ) :: {:ok, checkpoint()} | {:error, term()}
@spec create_filesystem(String.t(), [String.t()], keyword()) :: {:ok, checkpoint()} | {:error, term()}
@spec delete_all(String.t()) :: {:ok, non_neg_integer()}
@spec get_latest(String.t()) :: {:ok, checkpoint()} | {:error, :not_found}
@spec list(String.t()) :: [checkpoint()]
@spec load(String.t()) :: {:ok, checkpoint()} | {:error, term()}
@spec prune(String.t(), non_neg_integer()) :: {:ok, non_neg_integer()}