diff options
author | Hassan Shaikley <hassan.shaikley@gmail.com> | 2019-08-08 01:07:54 -0700 |
---|---|---|
committer | Fernando Tapia Rico <fertapric@gmail.com> | 2019-08-08 10:07:53 +0200 |
commit | 9c5bc2c2053f5956b5fd03de484ac8131ff32f25 (patch) | |
tree | 11d70fcb80cf73723aa368a64b2711bca06026ab | |
parent | 52a8795d8647c413aeeee01d6343206f21afa6e9 (diff) | |
download | elixir-9c5bc2c2053f5956b5fd03de484ac8131ff32f25.tar.gz |
Improve Node.start/3 documentation (#9272)
-rw-r--r-- | lib/elixir/lib/node.ex | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/elixir/lib/node.ex b/lib/elixir/lib/node.ex index de64fcd93..9a08dcd2e 100644 --- a/lib/elixir/lib/node.ex +++ b/lib/elixir/lib/node.ex @@ -13,8 +13,23 @@ defmodule Node do @doc """ Turns a non-distributed node into a distributed node. - This functionality starts the `:net_kernel` and other - related processes. + This functionality starts the `:net_kernel` and other related + processes. + + This function is rarely invoked in practice. Instead, nodes are + named and started via the command line by using the `--sname` and + `--name` flags. If you need to use this function to dynamically + name a node, please make sure the `epmd` operating system process + is running by calling `epmd -daemon`. + + Invoking this function when the distribution has already been started, + either via the command line interface or dynamically, will return an + error. + + ## Examples + + {:ok, pid} = Node.start(:example, :shortnames, 15000) + """ @spec start(node, :longnames | :shortnames, non_neg_integer) :: {:ok, pid} | {:error, term} def start(name, type \\ :longnames, tick_time \\ 15000) do |