mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-05-01 21:42:14 +00:00
chore: update documentation
This commit is contained in:
parent
768b71478a
commit
c8907640f6
214
index.html
214
index.html
@ -2,7 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>libp2p 0.26.0-rc.2 | Documentation</title>
|
||||
<title>libp2p 0.26.0-rc.3 | Documentation</title>
|
||||
<meta name='description' content='JavaScript implementation of libp2p, a modular peer to peer network stack'>
|
||||
<meta name='viewport' content='width=device-width,initial-scale=1'>
|
||||
<link href='assets/bass.css' rel='stylesheet'>
|
||||
@ -15,7 +15,7 @@
|
||||
<div id='split-left' class='overflow-auto fs0 height-viewport-100'>
|
||||
<div class='py1 px2'>
|
||||
<h3 class='mb0 no-anchor'>libp2p</h3>
|
||||
<div class='mb1'><code>0.26.0-rc.2</code></div>
|
||||
<div class='mb1'><code>0.26.0-rc.3</code></div>
|
||||
<input
|
||||
placeholder='Filter'
|
||||
id='filter-input'
|
||||
@ -84,6 +84,18 @@
|
||||
#dialFSM
|
||||
</a></li>
|
||||
|
||||
<li><a
|
||||
href='#libp2phangup'
|
||||
class='regular pre-open'>
|
||||
#hangUp
|
||||
</a></li>
|
||||
|
||||
<li><a
|
||||
href='#libp2pping'
|
||||
class='regular pre-open'>
|
||||
#ping
|
||||
</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
@ -200,7 +212,7 @@
|
||||
</h3>
|
||||
|
||||
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/9a8d609a591abfc7336c64c7b00f401ac365b144/src/index.js#L47-L551'>
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/0489972b4b0fba30c2348ff1a6035151f48a0748/src/index.js#L47-L570'>
|
||||
<span>src/index.js</span>
|
||||
</a>
|
||||
|
||||
@ -269,7 +281,7 @@
|
||||
<div class='clearfix'>
|
||||
|
||||
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/9a8d609a591abfc7336c64c7b00f401ac365b144/src/index.js#L199-L205'>
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/0489972b4b0fba30c2348ff1a6035151f48a0748/src/index.js#L204-L210'>
|
||||
<span>src/index.js</span>
|
||||
</a>
|
||||
|
||||
@ -355,7 +367,7 @@ if there is a handler. If not, errors will be logged.</p>
|
||||
<div class='clearfix'>
|
||||
|
||||
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/9a8d609a591abfc7336c64c7b00f401ac365b144/src/index.js#L213-L216'>
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/0489972b4b0fba30c2348ff1a6035151f48a0748/src/index.js#L218-L221'>
|
||||
<span>src/index.js</span>
|
||||
</a>
|
||||
|
||||
@ -433,7 +445,7 @@ if there is a handler. If not, errors will be logged.</p>
|
||||
<div class='clearfix'>
|
||||
|
||||
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/9a8d609a591abfc7336c64c7b00f401ac365b144/src/index.js#L224-L227'>
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/0489972b4b0fba30c2348ff1a6035151f48a0748/src/index.js#L229-L232'>
|
||||
<span>src/index.js</span>
|
||||
</a>
|
||||
|
||||
@ -511,7 +523,7 @@ if there is a handler. If not, errors will be logged.</p>
|
||||
<div class='clearfix'>
|
||||
|
||||
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/9a8d609a591abfc7336c64c7b00f401ac365b144/src/index.js#L241-L243'>
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/0489972b4b0fba30c2348ff1a6035151f48a0748/src/index.js#L246-L248'>
|
||||
<span>src/index.js</span>
|
||||
</a>
|
||||
|
||||
@ -598,7 +610,7 @@ peer will be added to the nodes <code>PeerBook</code></p>
|
||||
<div class='clearfix'>
|
||||
|
||||
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/9a8d609a591abfc7336c64c7b00f401ac365b144/src/index.js#L255-L270'>
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/0489972b4b0fba30c2348ff1a6035151f48a0748/src/index.js#L260-L275'>
|
||||
<span>src/index.js</span>
|
||||
</a>
|
||||
|
||||
@ -694,7 +706,7 @@ and the <code>Connection</code> will be sent in the callback</p>
|
||||
<div class='clearfix'>
|
||||
|
||||
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/9a8d609a591abfc7336c64c7b00f401ac365b144/src/index.js#L281-L296'>
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/0489972b4b0fba30c2348ff1a6035151f48a0748/src/index.js#L286-L301'>
|
||||
<span>src/index.js</span>
|
||||
</a>
|
||||
|
||||
@ -770,6 +782,178 @@ Connection State Machine.</p>
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='border-bottom' id='libp2phangup'>
|
||||
<div class="clearfix small pointer toggle-sibling">
|
||||
<div class="py1 contain">
|
||||
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
||||
<span class='code strong strong truncate'>hangUp(peer, callback)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix display-none toggle-target">
|
||||
<section class='p2 mb2 clearfix bg-white minishadow'>
|
||||
|
||||
|
||||
<div class='clearfix'>
|
||||
|
||||
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/0489972b4b0fba30c2348ff1a6035151f48a0748/src/index.js#L310-L316'>
|
||||
<span>src/index.js</span>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<p>Disconnects from the given peer</p>
|
||||
|
||||
<div class='pre p1 fill-light mt0'>hangUp(peer: (PeerInfo | PeerId | Multiaddr | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>), callback: function (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error">Error</a>)): void</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
||||
<div class='prose'>
|
||||
|
||||
<div class='space-bottom0'>
|
||||
<div>
|
||||
<span class='code bold'>peer</span> <code class='quiet'>((PeerInfo | PeerId | Multiaddr | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>))</code>
|
||||
The peer to ping
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class='space-bottom0'>
|
||||
<div>
|
||||
<span class='code bold'>callback</span> <code class='quiet'>(function (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error">Error</a>))</code>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
||||
<code>void</code>:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='border-bottom' id='libp2pping'>
|
||||
<div class="clearfix small pointer toggle-sibling">
|
||||
<div class="py1 contain">
|
||||
<a class='icon pin-right py1 dark-link caret-right'>▸</a>
|
||||
<span class='code strong strong truncate'>ping(peer, callback)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix display-none toggle-target">
|
||||
<section class='p2 mb2 clearfix bg-white minishadow'>
|
||||
|
||||
|
||||
<div class='clearfix'>
|
||||
|
||||
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/0489972b4b0fba30c2348ff1a6035151f48a0748/src/index.js#L325-L335'>
|
||||
<span>src/index.js</span>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<p>Pings the provided peer</p>
|
||||
|
||||
<div class='pre p1 fill-light mt0'>ping(peer: (PeerInfo | PeerId | Multiaddr | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>), callback: function (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error">Error</a>, Ping)): void</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
||||
<div class='prose'>
|
||||
|
||||
<div class='space-bottom0'>
|
||||
<div>
|
||||
<span class='code bold'>peer</span> <code class='quiet'>((PeerInfo | PeerId | Multiaddr | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>))</code>
|
||||
The peer to ping
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class='space-bottom0'>
|
||||
<div>
|
||||
<span class='code bold'>callback</span> <code class='quiet'>(function (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error">Error</a>, Ping))</code>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
||||
<code>void</code>:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
@ -797,7 +981,7 @@ Connection State Machine.</p>
|
||||
</h3>
|
||||
|
||||
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/9a8d609a591abfc7336c64c7b00f401ac365b144/src/index.js#L566-L575'>
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/0489972b4b0fba30c2348ff1a6035151f48a0748/src/index.js#L580-L589'>
|
||||
<span>src/index.js</span>
|
||||
</a>
|
||||
|
||||
@ -880,7 +1064,7 @@ instance if one is not provided in options.</p>
|
||||
</h3>
|
||||
|
||||
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/9a8d609a591abfc7336c64c7b00f401ac365b144/src/peer-routing.js#L25-L57'>
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/0489972b4b0fba30c2348ff1a6035151f48a0748/src/peer-routing.js#L25-L57'>
|
||||
<span>src/peer-routing.js</span>
|
||||
</a>
|
||||
|
||||
@ -995,7 +1179,7 @@ instance if one is not provided in options.</p>
|
||||
</h3>
|
||||
|
||||
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/9a8d609a591abfc7336c64c7b00f401ac365b144/src/content-routing.js#L28-L64'>
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/0489972b4b0fba30c2348ff1a6035151f48a0748/src/content-routing.js#L28-L64'>
|
||||
<span>src/content-routing.js</span>
|
||||
</a>
|
||||
|
||||
@ -1120,7 +1304,7 @@ Once a content router succeeds, iteration will stop.</p>
|
||||
</h3>
|
||||
|
||||
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/9a8d609a591abfc7336c64c7b00f401ac365b144/src/content-routing.js#L74-L82'>
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/0489972b4b0fba30c2348ff1a6035151f48a0748/src/content-routing.js#L74-L82'>
|
||||
<span>src/content-routing.js</span>
|
||||
</a>
|
||||
|
||||
@ -1203,7 +1387,7 @@ a provider of the given key.</p>
|
||||
</h3>
|
||||
|
||||
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/9a8d609a591abfc7336c64c7b00f401ac365b144/src/pubsub.js#L35-L55'>
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/0489972b4b0fba30c2348ff1a6035151f48a0748/src/pubsub.js#L35-L55'>
|
||||
<span>src/pubsub.js</span>
|
||||
</a>
|
||||
|
||||
@ -1317,7 +1501,7 @@ libp2p.subscribe(topic, handler, callback)</pre>
|
||||
</h3>
|
||||
|
||||
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/9a8d609a591abfc7336c64c7b00f401ac365b144/src/pubsub.js#L79-L99'>
|
||||
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-libp2p/blob/0489972b4b0fba30c2348ff1a6035151f48a0748/src/pubsub.js#L79-L99'>
|
||||
<span>src/pubsub.js</span>
|
||||
</a>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user