RelayMapInterface

A collection of relay servers an endpoint should consider.

Mirrors iroh::RelayMap. Construct with `Self::empty` or `Self::from_urls` and mutate with `Self::insert` / `Self::remove`.

Inheritors

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun contains(url: String): Boolean

Check whether the given relay URL is in the map.

Link copied to clipboard
abstract fun get(url: String): RelayConfig?

Look up the configuration for the given relay URL.

Link copied to clipboard
abstract fun insert(config: RelayConfig)

Insert a relay (replacing any prior entry for the same URL).

Link copied to clipboard
abstract fun isEmpty(): Boolean

True if the map has no relays.

Link copied to clipboard
abstract fun len(): UInt

Number of relays in the map.

Link copied to clipboard
abstract fun remove(url: String): Boolean

Remove the entry for the given relay URL. Returns true if something was removed.

Link copied to clipboard
abstract fun urls(): List<String>

All relay URLs currently in the map.