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(), initialURIs: List<URI>, bindAddress: SocketAddress, repository: PeerRepository, listeners: List<(Peer) -> Unit>? = null, waitSecondsBetweenScrapes: Long = 30) |
bindAddress |
val bindAddress: SocketAddress |
coroutineContext |
val coroutineContext: CoroutineContext |
initialURIs |
val initialURIs: List<URI> |
listeners |
val listeners: List<(Peer) -> Unit>? |
repository |
val repository: PeerRepository |
vertx |
val vertx: Vertx |
waitSecondsBetweenScrapes |
val waitSecondsBetweenScrapes: Long |
discover |
fun discover(): Deferred<Unit> |
start |
fun start(): Deferred<Unit> |
stop |
fun stop(): Deferred<Unit> |