Packages
This module replaces the standard `:inet_tcp_dist` from Erlang and introduces a new callback. The EPMD module is required to have `address_and_port_please(node)` implemented which should return `{ip, port}`. It is not checked during compilation since the callback is done dynamically.
Current section
Files
Jump to
Current section
Files
lib/eapmd/node.ex
defmodule EAPMD.Node do
@moduledoc """
Properties of a node.
- `:ip` - IP address of the node
- `:port` - port that the node is listening on
- `:name` - full name of the node, eg. _foo@example_
- `:domain` - full domain of the node, eg. _example.local_
"""
@typedoc """
IP address
"""
@type ip_address :: {integer, integer, integer, integer}
@type t :: %__MODULE__{
ip: ip_address,
port: integer,
name: atom,
domain: charlist
}
defstruct ip: nil,
port: -1,
name: nil,
domain: nil
end