Fact.BootstrapFile (Fact v0.3.1)

View Source

This module encapsulates the adapters used for working with the bootstrap record file.

Summary

Types

A small subset of a Fact.Context.t/0 containing the following keys with .

Functions

Reads the bootstrap file.

Writes a minimal amount of the Fact.Context structure to the bootstrap file.

Types

bootstrap_record()

(since 0.2.0)
@type bootstrap_record() :: map()

A small subset of a Fact.Context.t/0 containing the following keys with .

Functions

read(path)

(since 0.2.0)
@spec read(Path.t()) :: {:ok, bootstrap_record()}

Reads the bootstrap file.

write(path, arg)

(since 0.2.0)
@spec write(Path.t(), genesis_record :: Fact.record()) :: :ok | {:error, term()}

Writes a minimal amount of the Fact.Context structure to the bootstrap file.

It writes just enough configuration, so that the genesis record (Fact.Genesis.Event.DatabaseCreated.V1) can be read and a full Fact.Context can be loaded.