Search documentation of macula

# macula_dist_system (macula v4.4.9)

View Source

Macula Distribution System Supervisor.

This supervisor manages the distribution subsystem components:

- macula_dist_bridge_sup - Supervisor for relay tunnel bridges - macula_dist_discovery - Decentralized node discovery (replaces EPMD) - macula_cluster_strategy - Automatic cluster formation (optional)

The bridge supervisor hosts `macula_dist_bridge` gen_server children (one per relay tunnel). When `macula_dist_system` is not started (standalone relay mode), `macula_dist_relay:advertise_dist_accept/0` starts the bridge supervisor on demand.

Configuration options (in sys.config): dist_port - QUIC port (default 4433) discovery_type - mdns, dht, or both auto_cluster - automatically form cluster

# Summary

## Functions

start_dist_relay_client(Url, NodeName)

Dynamically start the dist_relay_client under this supervisor. Used by `macula:join_dist_relay/1` when the relay URL is chosen at runtime rather than at application boot.

start_link()

Start the distribution system supervisor with default options.

start_link(Opts)

Start the distribution system supervisor with options.

# Functions

# start_dist_relay_client(Url, NodeName)

    -spec start_dist_relay_client(binary() | string(), binary()) -> {ok, pid()} | {error, term()}.

Dynamically start the dist_relay_client under this supervisor. Used by `macula:join_dist_relay/1` when the relay URL is chosen at runtime rather than at application boot.

# start_link()

    -spec start_link() -> {ok, pid()} | {error, term()}.

Start the distribution system supervisor with default options.

# start_link(Opts)

    -spec start_link(map()) -> {ok, pid()} | {error, term()}.

Start the distribution system supervisor with options.