IrohBeam. Endpoint
(iroh_beam v0.2.0)
View Source
Supervised ownership and lifecycle for one embedded Iroh endpoint.
Each endpoint is an OTP process with its own private identity and native
resource. :direct uses no relay or address-lookup infrastructure; :n0
uses Iroh's public defaults; :no_relay keeps n0 address lookup but disables
relays; and {:custom, relays} uses only the supplied relay records.
Summary
Functions
Returns a specification to start this module under a supervisor.
Types
@type server() :: GenServer.server()
Functions
@spec accept( server(), keyword() ) :: {:ok, IrohBeam.Connection.t()} | {:error, IrohBeam.Error.t()}
@spec addr(server()) :: {:ok, IrohBeam.EndpointAddr.t()} | {:error, IrohBeam.Error.t()}
@spec await_online(server()) :: :ok | {:error, IrohBeam.Error.t()}
@spec await_online(server(), timeout()) :: :ok | {:error, IrohBeam.Error.t()}
@spec bound_sockets(server()) :: {:ok, [String.t()]} | {:error, IrohBeam.Error.t()}
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec close(server()) :: :ok | {:error, IrohBeam.Error.t()}
@spec close(server(), timeout()) :: :ok | {:error, IrohBeam.Error.t()}
@spec connect( server(), IrohBeam.EndpointId.t() | IrohBeam.EndpointAddr.t() | IrohBeam.EndpointTicket.t(), binary(), keyword() ) :: {:ok, IrohBeam.Connection.t()} | {:error, IrohBeam.Error.t()}
@spec id(server()) :: {:ok, IrohBeam.EndpointId.t()} | {:error, IrohBeam.Error.t()}
@spec start_link(keyword()) :: GenServer.on_start()
@spec status(server()) :: {:ok, map()} | {:error, IrohBeam.Error.t()}