mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-04-25 18:42:15 +00:00
docs: add DialRequest description
This commit is contained in:
parent
962081f448
commit
43b98e64b6
@ -11,7 +11,11 @@ const pAny = require('p-any')
|
|||||||
|
|
||||||
class DialRequest {
|
class DialRequest {
|
||||||
/**
|
/**
|
||||||
*
|
* Manages running the `dialAction` on multiple provided `addrs` in parallel
|
||||||
|
* up to a maximum determined by the number of tokens returned
|
||||||
|
* from `dialer.getTokens`. Once a DialRequest is created, it can be
|
||||||
|
* started using `DialRequest.run(options)`. Once a single dial has succeeded,
|
||||||
|
* all other dials in the request will be cancelled.
|
||||||
* @param {object} options
|
* @param {object} options
|
||||||
* @param {Multiaddr[]} options.addrs
|
* @param {Multiaddr[]} options.addrs
|
||||||
* @param {function(Multiaddr):Promise<Connection>} options.dialAction
|
* @param {function(Multiaddr):Promise<Connection>} options.dialAction
|
||||||
|
Loading…
x
Reference in New Issue
Block a user