mcl_core_lan_sup (mcl_core v1.0.0)
View SourceThe LAN transport's tree (docs/DESIGN.md §2), started by mcl_core_sup only when the lan app env is configured.
Before any child starts, the node must be distributed, must hold a stable identity key (its node id is the caller it writes), and must hold the cluster's secrets (mcl_core_lan_secrets); the cookie is then set. Each refusal stops mcl_core's start and names itself.
rest_for_one, in order: the pg scope, this node's id in it, the capability hosts and subscribers, which join groups in the scope and so restart with it (mcl_core_lan_hosts keeps what it hosts outside its own tree and starts it all again), the entry point when one is configured (its challenges, then its listener, whose event streams join topic groups in the scope: mcl_core_lan_entry, mcl-core#4), and last macula's gossip, which dials every peer it hears with the same secret and whose restart restarts nothing else.