Elixium Core v0.4.11 Elixium.Node.Supervisor View Source

Responsible for getting peer information and launching connection handlers

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor

Given a peer supervisor, return a list of all the handlers that are currently connected to another peer

On Connection, fetch our local ip

On Connection, fetch our public ip

Broadcast a message to all peers

Callback invoked to start the supervisor and during hot code upgrades

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function connected_handlers() View Source
connected_handlers() :: List

Given a peer supervisor, return a list of all the handlers that are currently connected to another peer

Link to this function fetch_local_ip() View Source
fetch_local_ip() :: String.t()

On Connection, fetch our local ip

Link to this function fetch_peers_from_registry(port_conf) View Source
fetch_peers_from_registry(integer()) :: List | :not_found
Link to this function fetch_public_ip() View Source
fetch_public_ip() :: String.t()

On Connection, fetch our public ip

Link to this function gossip(type, message) View Source
gossip(String.t(), map()) :: none()

Broadcast a message to all peers

Callback invoked to start the supervisor and during hot code upgrades.

Developers typically invoke Supervisor.init/2 at the end of their init callback to return the proper supervision flags.

Callback implementation for Supervisor.init/1.

Link to this function start_link(router_pid, port) View Source
Link to this function validate_own_ip_port(peer, ip, port, port_conf) View Source