interface PeerRepository
(source)
A repository of peers in an Ethereum network.
Conceptually, this repository stores information about all peers in an Ethereum network, hence the retrieval methods always return a valid Peer. However, the Peer objects are only generated on demand and may be purged from underlying storage if they can be recreated easily.
abstract suspend fun get(nodeId: PublicKey): Peer
Get a peer. abstract suspend fun get(uri: URI): Peer
Get a Peer based on a URI. open suspend fun get(uri: String): Peer
Get a Peer based on a URI string. |
|
abstract fun getAsync(nodeId: PublicKey): AsyncResult<Peer>
Get a peer. abstract fun getAsync(uri: URI): AsyncResult<Peer>
Get a Peer based on a URI. abstract fun getAsync(uri: String): AsyncResult<Peer>
Get a Peer based on a URI string. |
class EphemeralPeerRepository : PeerRepository
An in-memory peer repository. |