class Scraper : CoroutineScope
(source)
Discovery scraper that will continue asking peers for peers, and iterate over them, until told to stop.
The scraper sends events of discoveries to listeners.
<init> |
Discovery scraper that will continue asking peers for peers, and iterate over them, until told to stop. Scraper(coroutineContext: CoroutineContext = Executors.newFixedThreadPool(100).asCoroutineDispatcher(), vertx: Vertx = Vertx.vertx(), initialENRs: List<EthereumNodeRecord>, bindAddress: InetSocketAddress, listeners: List<(EthereumNodeRecord, List<EthereumNodeRecord>) -> Unit>, maxWaitForNewPeers: Long = 20, waitBetweenScrapes: Long = 5 * 60) |
bindAddress |
val bindAddress: InetSocketAddress |
coroutineContext |
val coroutineContext: CoroutineContext |
initialENRs |
val initialENRs: List<EthereumNodeRecord> |
listeners |
val listeners: List<(EthereumNodeRecord, List<EthereumNodeRecord>) -> Unit> |
maxWaitForNewPeers |
val maxWaitForNewPeers: Long |
vertx |
val vertx: Vertx |
waitBetweenScrapes |
val waitBetweenScrapes: Long |
discover |
fun discover(maxWaitForNewPeers: Long): Deferred<Unit> |
start |
fun start(): Deferred<Unit> |
stop |
fun stop(): Deferred<Unit> |