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.
get |
Get a peer. abstract suspend fun get(nodeId: PublicKey): Peer
Get a Peer based on a URI. abstract suspend fun get(uri: URI): Peer
Get a Peer based on a URI string. open suspend fun get(uri: String): Peer |
getAsync |
Get a peer. abstract fun getAsync(nodeId: PublicKey): AsyncResult<Peer>
Get a Peer based on a URI. abstract fun getAsync(uri: URI): AsyncResult<Peer>
Get a Peer based on a URI string. abstract fun getAsync(uri: String): AsyncResult<Peer> |
EphemeralPeerRepository |
An in-memory peer repository. class EphemeralPeerRepository : PeerRepository |