Fact.Seam.Storage.Standard.V1 (Fact v0.3.1)

View Source

Standard V1 implementation of the Fact.Seam.Storage seam.

This module provides file-system–based storage paths for a database context. It defines where event records, indices, ledgers, and locks are stored on disk.

Options:

  • :path – the root directory for the database storage. All sub-paths are derived from this.

Summary

Types

t()

The configuration options for the Standard v1 storage seam impl.

Functions

Gets the path to the base directory for all indexes.

Creates the directory structure used for events and indexes.

Gets the path to the directory containing the ledger.

Gets the path to the directory containing the database lock file.

Gets the path to the Merkle Mountain Range directory.

Gets the configured root path for the database.

Gets the path to base directory for records, or the path to a specific record.

Gets the path to the directory containing the write ahead log segment files.

Types

t()

(since 0.1.0)
@type t() :: %Fact.Seam.Storage.Standard.V1{path: Path.t()}

The configuration options for the Standard v1 storage seam impl.

Functions

indices_path(v1, opts)

(since 0.1.0)
@spec indices_path(
  t(),
  keyword()
) :: Path.t()

Gets the path to the base directory for all indexes.

initialize_storage(this, opts)

(since 0.2.0)
@spec initialize_storage(
  t(),
  keyword()
) :: {:ok, Path.t()} | {:error, term()}

Creates the directory structure used for events and indexes.

ledger_path(v1, opts)

(since 0.1.0)
@spec ledger_path(
  t(),
  keyword()
) :: Path.t()

Gets the path to the directory containing the ledger.

locks_path(v1, opts)

(since 0.1.0)
@spec locks_path(
  t(),
  keyword()
) :: Path.t()

Gets the path to the directory containing the database lock file.

merkle_mountain_range_path(v1, opts)

(since 0.3.0)
@spec merkle_mountain_range_path(
  t(),
  keyword()
) :: Path.t()

Gets the path to the Merkle Mountain Range directory.

path(v1, opts)

(since 0.1.0)
@spec path(
  t(),
  keyword()
) :: Path.t()

Gets the configured root path for the database.

records_path(v1, record_id, opts)

(since 0.2.0)
@spec records_path(t(), nil | Fact.record_id(), keyword()) :: Path.t()

Gets the path to base directory for records, or the path to a specific record.

validate_options(options, specs)

(since 0.1.0)

write_ahead_log_path(v1, opts)

(since 0.3.0)
@spec write_ahead_log_path(
  t(),
  keyword()
) :: Path.t()

Gets the path to the directory containing the write ahead log segment files.