macula_mesh_client (macula v1.4.25)
View SourceMacula Mesh Client — connects a node to the relay mesh via QUIC.
Single gen_server managing ONE persistent QUIC connection to a relay with automatic failover across multiple relays. On disconnect, cycles to the next relay in the list with exponential backoff + jitter. Replays all subscriptions and procedure registrations on reconnect.
This is the SDK client module. It speaks the node role only — it cannot identify as a relay, cannot subscribe to _swim/_dht/_relay.*, and has no loop-prevention concerns. For relay-to-relay peering connections, see macula_peer_client in the macula-relay repository.
Usage:
{ok, Client} = macula_mesh_client:start_link(#{
relays => [<<"quic://boot.macula.io:443">>],
realm => <<"io.macula">>
}).