ASM.Remote.NodeConnector (ASM v0.9.2)

Copy Markdown View Source

Remote node connection and preflight checks.

Summary

Types

remote_cfg()

@type remote_cfg() :: %{
  :remote_node => atom(),
  optional(:remote_cookie) => atom() | nil,
  optional(:remote_connect_timeout_ms) => pos_integer(),
  optional(:remote_rpc_timeout_ms) => pos_integer(),
  optional(:remote_boot_lease_timeout_ms) => pos_integer(),
  optional(:remote_bootstrap_mode) => :require_prestarted | :ensure_started,
  optional(:remote_cwd) => String.t() | nil
}

Functions

ensure_connected(cfg, opts \\ [])

@spec ensure_connected(
  remote_cfg(),
  keyword()
) ::
  :ok
  | {:error,
     :distribution_not_enabled
     | :remote_connect_timeout
     | :remote_connect_failed
     | :cookie_conflict}

preflight(cfg, opts \\ [])

@spec preflight(
  remote_cfg(),
  keyword()
) ::
  :ok
  | {:error,
     :remote_not_ready | :remote_rpc_timeout | {:remote_rpc_failed, term()}}
  | {:error, {:remote_capability_mismatch, map()}}
  | {:error, {:remote_version_mismatch, map()}}