When you want a Familiar's loom replicated across BEAM nodes, connect the nodes with normal BEAM tooling first, then use these helpers to wire Mnesia across them.
Helpers for explicit BEAM-cluster setup.
Cantrip does not perform cluster discovery. Operators still use the normal
BEAM tools (--name / --sname, cookies, Node.connect/1, libcluster,
Kubernetes headless services, etc.). This module covers the Cantrip-specific
handoff once nodes are connected: make Mnesia aware of extra DB nodes and
replicate loom tables across them.
Summary
Functions
Connects Mnesia to already-connected DB nodes.
Replicates a Mnesia loom table to the given nodes.
Types
Functions
Connects Mnesia to already-connected DB nodes.
Returns {:ok, connected_nodes} using Mnesia's
change_config(:extra_db_nodes, nodes) result. This intentionally does not
discover or connect distributed Erlang nodes; do that before calling this.
Replicates a Mnesia loom table to the given nodes.
The local node is converted to copy_type via
change_table_copy_type/3; remote nodes are added via
add_table_copy/3. Existing copies are treated as success.