EndpointBuilder

A mutable handle to an endpoint builder, handed to `Preset::apply`.

Mirrors the chainable surface of iroh::endpoint::Builder that a preset cares about. The three apply_* methods replay the corresponding upstream iroh::endpoint::presets impl (which, importantly, install the crypto provider) — a custom preset will almost always call one of them as a baseline before layering its own configuration.

Functions

Link copied to clipboard
open override fun alpns(alpns: List<ByteArray>)

Set the advertised ALPNs.

Link copied to clipboard
open override fun applyMinimal()

Replay the minimal preset (crypto provider only, no external deps).

Link copied to clipboard
open override fun applyN0()

Replay the n0 production preset (relays + discovery + crypto provider).

Link copied to clipboard
open override fun applyN0DisableRelay()

Replay the n0 preset with relays disabled.

Link copied to clipboard
open override fun bindAddr(addr: String)

Set the address the endpoint binds to (host:port).

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun destroy()
Link copied to clipboard
open override fun relayMode(mode: RelayMode)

Set the relay mode.

Link copied to clipboard
open override fun secretKey(bytes: ByteArray)

Set the endpoint secret key (32 bytes).