BB.TUI.Rpc (BB.TUI v0.1.0)

Copy Markdown View Source

Thin wrapper around :rpc.call/4 and Node.spawn_link/2.

This module exists purely so the cross-node code paths in BB.TUI.Robot can be exercised in tests by mocking a normal Elixir module — :rpc itself is a sticky kernel module and cannot be swapped out at runtime.

In production this is a transparent passthrough; in tests Mimic replaces it.

Summary

Functions

Synchronous remote function call. Mirrors :rpc.call/4.

Spawns a linked process on a remote node. Mirrors Node.spawn_link/2.

Functions

call(node, mod, fun, args)

@spec call(node(), module(), atom(), [term()]) :: term()

Synchronous remote function call. Mirrors :rpc.call/4.

spawn_link(node, fun)

@spec spawn_link(node(), (-> any())) :: pid()

Spawns a linked process on a remote node. Mirrors Node.spawn_link/2.