Object.NetworkSupervisor (object v0.1.2)

Supervisor for all network-related components of the Object system.

Manages the lifecycle of network services including transport, protocol, DHT, encryption, NAT traversal, bootstrap, and Byzantine fault tolerance. Provides a unified interface for starting and configuring the P2P network.

Summary

Functions

Returns a specification to start this module under a supervisor.

Types

network_config()

@type network_config() :: %{
  node_id: binary() | nil,
  listen_port: non_neg_integer(),
  transport: %{pool_size: non_neg_integer(), timeout: timeout()},
  dht: %{
    enabled: boolean(),
    k_bucket_size: non_neg_integer(),
    bootstrap_nodes: [{String.t(), non_neg_integer()}]
  },
  encryption: %{
    enabled: boolean(),
    identity_file: String.t() | nil,
    require_trusted_certs: boolean()
  },
  nat: %{
    stun_servers: [{String.t(), non_neg_integer()}],
    turn_servers: [{String.t(), non_neg_integer(), map()}],
    enable_upnp: boolean()
  },
  bootstrap: %{
    dns_seeds: [String.t()],
    enable_mdns: boolean(),
    enable_dht: boolean()
  },
  byzantine: %{
    enabled: boolean(),
    require_pow: boolean(),
    min_reputation: float()
  }
}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(config \\ %{})