Search documentation of macula

# macula_bridge_system (macula v0.44.2)

View Source

Macula Bridge System - Supervision tree for Bridge Nodes.

Bridge Nodes provide: - Connection to parent mesh level (street to neighborhood to city to etc.) - DHT query escalation when local DHT misses - Mesh formation with other Bridge Nodes at the same level - Result caching from parent queries

# Summary

## Functions

get_bridge_pid()

Get Bridge Node PID.

get_mesh_pid()

Get Bridge Mesh PID.

get_stats()

Get bridge system statistics.

init(Config)
is_bridge_enabled()

Check if bridge functionality is enabled.

start_link(Config)

Start bridge system supervisor. Config should include: - parent_bridges: list of parent bridge endpoints (required for escalation) - mesh_level: atom indicating level (cluster, street, neighborhood, city, etc.) - bridge_enabled: boolean to enable/disable bridge functionality

# Functions

# get_bridge_pid()

    -spec get_bridge_pid() -> {ok, pid()} | {error, not_started}.

Get Bridge Node PID.

# get_mesh_pid()

    -spec get_mesh_pid() -> {ok, pid()} | {error, not_started}.

Get Bridge Mesh PID.

# get_stats()

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

Get bridge system statistics.

# init(Config)

# is_bridge_enabled()

    -spec is_bridge_enabled() -> boolean().

Check if bridge functionality is enabled.

# start_link(Config)

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

Start bridge system supervisor. Config should include: - parent_bridges: list of parent bridge endpoints (required for escalation) - mesh_level: atom indicating level (cluster, street, neighborhood, city, etc.) - bridge_enabled: boolean to enable/disable bridge functionality