MobDev.Connector (mob_dev v0.7.2)

Copy Markdown View Source

Orchestrates device discovery, tunnel setup, app restart, and node connection.

Summary

Functions

Discovers all connected devices, sets up tunnels, restarts apps, and waits for Erlang nodes to come online.

Reads the :name option from connect_all/1's keyword list and returns it as an atom. Falls back to :"mob_dev@127.0.0.1" when unset — the historical default.

Functions

connect_all(opts \\ [])

@spec connect_all(keyword()) :: {[MobDev.Device.t()], [MobDev.Device.t()]}

Discovers all connected devices, sets up tunnels, restarts apps, and waits for Erlang nodes to come online.

Returns {connected, failed} lists of %Device{}.

local_name_from_opts(opts)

@spec local_name_from_opts(keyword()) :: node()

Reads the :name option from connect_all/1's keyword list and returns it as an atom. Falls back to :"mob_dev@127.0.0.1" when unset — the historical default.

Public so the option-plumbing is unit-testable without needing to actually call Node.start/2 (which would mutate BEAM-global distribution state and require an async: false test module). See MOB-69.