Search documentation of macula

# macula_gateway_mdns_discovery (macula v0.44.2)

View Source

Macula Gateway mDNS Discovery.

Discovers LAN peers advertising the _macula-mesh._udp service via mDNS and populates the direct routing table with their endpoints.

This enables LAN pubsub delivery WITHOUT going through the bootstrap DHT. When the pubsub router checks the direct routing table, it finds LAN peers there and connects directly.

The module subscribes to mDNS discovery events via gproc and processes DNS SRV/TXT records to extract node_id and endpoint.

# Summary

## Functions

handle_call(Request, From, State)
handle_cast(Msg, State)
handle_info(Info, State)

Handle mDNS discovery events. The mdns library sends messages via gproc when services are discovered.

init(_)
start_link(Opts)
terminate(Reason, State)

# Functions

# handle_call(Request, From, State)

# handle_cast(Msg, State)

# handle_info(Info, State)

Handle mDNS discovery events. The mdns library sends messages via gproc when services are discovered.

# init(_)

# start_link(Opts)

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

# terminate(Reason, State)