exhtml v0.4.0-beta.3 Exhtml.Repo

Exhtml.Repo holds the core K/V data of the contents.

Link to this section Summary

Functions

Accpets a new node into the current repo (mnesia database cluster)

Returns a specification to start this module under a supervisor

Joins an existing mnesia database cluster

Starts a mnesia repo

Stops a mnesia repo

Link to this section Functions

Link to this function accept(new_node)
accept(node()) :: :ok | {:error, any()}

Accpets a new node into the current repo (mnesia database cluster).

Link to this function child_spec(arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function join(remote_node, opts)
join(node(), [{:key, any()}]) :: {:ok, pid()} | {:error, any()}

Joins an existing mnesia database cluster.

  • remote_node - the node to connect, which should be running the mnesia database.
  • opts - options to start local mnesia database.
Link to this function start_link(opts)

Starts a mnesia repo.

  • opts - options for starting the process:

    • data_dir indicates which path the data will be persited in.
    • data_nodes indicates which nodes will hold persisted data. Other nodes will only hold data in memories. Returns {:ok, pid} if succeed, {:error, reason} otherwise.
Link to this function stop(repo)
stop(GenServer.server()) :: :ok | {:error, any()}

Stops a mnesia repo.