2020-12-10 15:50:24 +01:00
|
|
|
<!doctype html>
|
|
|
|
<html class="default no-js">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
2020-12-11 18:28:40 +01:00
|
|
|
<title>ProtoBook | libp2p - v0.30.0-rc.1</title>
|
|
|
|
<meta name="description" content="Documentation for libp2p - v0.30.0-rc.1">
|
2020-12-10 15:50:24 +01:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<link rel="stylesheet" href="../assets/css/main.css">
|
|
|
|
<link href="https://unpkg.com/nord-highlightjs@0.1.0/dist/nord.css" rel="stylesheet" type="text/css" />
|
|
|
|
<style>
|
|
|
|
.toolbar-icon {
|
|
|
|
display: inline-block;
|
|
|
|
vertical-align: middle;
|
|
|
|
margin-left: 10px;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
.toolbar-icon-search {
|
|
|
|
box-sizing: border-box;
|
|
|
|
position: absolute;
|
|
|
|
overflow: hidden;
|
|
|
|
right: -40px;
|
|
|
|
width: 40px;
|
|
|
|
height: 40px;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
@media (min-width: 901px){
|
|
|
|
display: none
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@media (min-width: 901px){
|
|
|
|
.toolbar-icon-menu {
|
|
|
|
display: none
|
|
|
|
}
|
|
|
|
.toolbar-icon-options {
|
|
|
|
display: none
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.gg-menu {
|
|
|
|
transform: scale(var(--ggs,1))
|
|
|
|
}
|
|
|
|
.gg-menu,
|
|
|
|
.gg-menu::after,
|
|
|
|
.gg-menu::before {
|
|
|
|
box-sizing: border-box;
|
|
|
|
position: relative;
|
|
|
|
display: block;
|
|
|
|
width: 20px;
|
|
|
|
height: 2px;
|
|
|
|
border-radius: 3px;
|
|
|
|
background: currentColor
|
|
|
|
}
|
|
|
|
.gg-menu::after,
|
|
|
|
.gg-menu::before {
|
|
|
|
content: "";
|
|
|
|
position: absolute;
|
|
|
|
top: -6px
|
|
|
|
}
|
|
|
|
.gg-menu::after {
|
|
|
|
top: 6px
|
|
|
|
}
|
|
|
|
.gg-options {
|
|
|
|
box-sizing: border-box;
|
|
|
|
position: relative;
|
|
|
|
display: block;
|
|
|
|
transform: scale(var(--ggs,1));
|
|
|
|
width: 10px;
|
|
|
|
height: 2px;
|
|
|
|
box-shadow:
|
|
|
|
-3px 4px 0 0,
|
|
|
|
3px -4px 0 0
|
|
|
|
}
|
|
|
|
.gg-options::after,
|
|
|
|
.gg-options::before {
|
|
|
|
content: "";
|
|
|
|
display: block;
|
|
|
|
box-sizing: border-box;
|
|
|
|
position: absolute;
|
|
|
|
width: 8px;
|
|
|
|
height: 8px;
|
|
|
|
border: 2px solid;
|
|
|
|
border-radius: 100%
|
|
|
|
}
|
|
|
|
.gg-options::before {
|
|
|
|
top: -7px;
|
|
|
|
left: -4px
|
|
|
|
}
|
|
|
|
.gg-options::after {
|
|
|
|
bottom: -7px;
|
|
|
|
right: -4px
|
|
|
|
}
|
|
|
|
.gg-search {
|
|
|
|
box-sizing: border-box;
|
|
|
|
position: relative;
|
|
|
|
display: block;
|
|
|
|
transform: scale(var(--ggs,1));
|
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
border: 2px solid;
|
|
|
|
border-radius: 100%;
|
|
|
|
margin-left: -4px;
|
|
|
|
margin-top: -4px
|
|
|
|
}
|
|
|
|
.gg-search::after {
|
|
|
|
content: "";
|
|
|
|
display: block;
|
|
|
|
box-sizing: border-box;
|
|
|
|
position: absolute;
|
|
|
|
border-radius: 3px;
|
|
|
|
width: 2px;
|
|
|
|
height: 8px;
|
|
|
|
background: currentColor;
|
|
|
|
transform: rotate(-45deg);
|
|
|
|
top: 10px;
|
|
|
|
left: 12px
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<header>
|
|
|
|
<div class="tsd-page-toolbar">
|
|
|
|
<div class="container">
|
|
|
|
<div class="table-wrap">
|
|
|
|
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
|
|
|
|
<div class="field">
|
|
|
|
<label for="tsd-search-field" class="toolbar-icon toolbar-icon-search"><i class="gg-search"></i></label>
|
|
|
|
<input id="tsd-search-field" type="text" />
|
|
|
|
</div>
|
|
|
|
<ul class="results">
|
|
|
|
<li class="state loading">Preparing search index...</li>
|
|
|
|
<li class="state failure">The search index is not available</li>
|
|
|
|
</ul>
|
2020-12-11 18:28:40 +01:00
|
|
|
<a href="../index.html" class="title">libp2p - v0.30.0-rc.1</a>
|
2020-12-10 15:50:24 +01:00
|
|
|
</div>
|
|
|
|
<div class="table-cell" id="tsd-widgets">
|
|
|
|
<a href="#" class="toolbar-icon toolbar-icon-menu" data-toggle="menu"><i class="gg-menu"></i></a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="tsd-page-title">
|
|
|
|
<div class="container">
|
|
|
|
<ul class="tsd-breadcrumb">
|
|
|
|
<li>
|
|
|
|
<a href="../modules/_peer_store_proto_book_.html">peer-store/proto-book</a>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<a href="_peer_store_proto_book_.protobook.html">ProtoBook</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<h1>Class ProtoBook</h1>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
<div class="container container-main">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-8 col-content">
|
|
|
|
<section class="tsd-panel tsd-comment">
|
|
|
|
<div class="tsd-comment tsd-typography">
|
|
|
|
<dl class="tsd-comment-tags">
|
|
|
|
<dt>fires</dt>
|
|
|
|
<dd><p>ProtoBook#change:protocols</p>
|
|
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<section class="tsd-panel tsd-hierarchy">
|
|
|
|
<h3>Hierarchy</h3>
|
|
|
|
<ul class="tsd-hierarchy">
|
|
|
|
<li>
|
|
|
|
<a href="_peer_store_book_.book.html" class="tsd-signature-type">Book</a>
|
|
|
|
<ul class="tsd-hierarchy">
|
|
|
|
<li>
|
|
|
|
<span class="target">ProtoBook</span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<section class="tsd-panel-group tsd-index-group">
|
|
|
|
<h2>Index</h2>
|
|
|
|
<section class="tsd-panel tsd-index-panel">
|
|
|
|
<div class="tsd-index-content">
|
|
|
|
<section class="tsd-index-section ">
|
|
|
|
<h3>References</h3>
|
|
|
|
<ul class="tsd-index-list">
|
|
|
|
<li class="tsd-kind-reference tsd-parent-kind-class"><a href="_peer_store_proto_book_.protobook.html#peerstore" class="tsd-kind-icon">Peer<wbr>Store</a></li>
|
|
|
|
<li class="tsd-kind-reference tsd-parent-kind-class"><a href="_peer_store_proto_book_.protobook.html#peerstore-1" class="tsd-kind-icon">Peer<wbr>Store</a></li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<section class="tsd-index-section ">
|
|
|
|
<h3>Constructors</h3>
|
|
|
|
<ul class="tsd-index-list">
|
|
|
|
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="_peer_store_proto_book_.protobook.html#constructor" class="tsd-kind-icon">constructor</a></li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<section class="tsd-index-section tsd-is-inherited">
|
|
|
|
<h3>Properties</h3>
|
|
|
|
<ul class="tsd-index-list">
|
|
|
|
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_peer_store_proto_book_.protobook.html#_ps" class="tsd-kind-icon">_ps</a></li>
|
|
|
|
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_peer_store_proto_book_.protobook.html#data" class="tsd-kind-icon">data</a></li>
|
|
|
|
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_peer_store_proto_book_.protobook.html#eventname" class="tsd-kind-icon">event<wbr>Name</a></li>
|
|
|
|
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_peer_store_proto_book_.protobook.html#eventproperty" class="tsd-kind-icon">event<wbr>Property</a></li>
|
|
|
|
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_peer_store_proto_book_.protobook.html#eventtransformer" class="tsd-kind-icon">event<wbr>Transformer</a></li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<section class="tsd-index-section ">
|
|
|
|
<h3>Methods</h3>
|
|
|
|
<ul class="tsd-index-list">
|
|
|
|
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="_peer_store_proto_book_.protobook.html#_emit" class="tsd-kind-icon">_emit</a></li>
|
|
|
|
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="_peer_store_proto_book_.protobook.html#_setdata" class="tsd-kind-icon">_set<wbr>Data</a></li>
|
|
|
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="_peer_store_proto_book_.protobook.html#add" class="tsd-kind-icon">add</a></li>
|
|
|
|
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_peer_store_proto_book_.protobook.html#delete" class="tsd-kind-icon">delete</a></li>
|
|
|
|
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_peer_store_proto_book_.protobook.html#get" class="tsd-kind-icon">get</a></li>
|
|
|
|
<li class="tsd-kind-method tsd-parent-kind-class"><a href="_peer_store_proto_book_.protobook.html#remove" class="tsd-kind-icon">remove</a></li>
|
|
|
|
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_peer_store_proto_book_.protobook.html#set" class="tsd-kind-icon">set</a></li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
<section class="tsd-panel-group tsd-member-group ">
|
|
|
|
<h2>References</h2>
|
|
|
|
<section class="tsd-panel tsd-member tsd-kind-reference tsd-parent-kind-class">
|
|
|
|
<a name="peerstore" class="tsd-anchor"></a>
|
|
|
|
<h3>Peer<wbr>Store</h3>
|
|
|
|
Re-exports <a href="../modules/_peer_store_book_.html#peerstore">PeerStore</a>
|
|
|
|
</section>
|
|
|
|
<section class="tsd-panel tsd-member tsd-kind-reference tsd-parent-kind-class">
|
|
|
|
<a name="peerstore-1" class="tsd-anchor"></a>
|
|
|
|
<h3>Peer<wbr>Store</h3>
|
|
|
|
Re-exports <a href="../modules/_peer_store_book_.html#peerstore">PeerStore</a>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
<section class="tsd-panel-group tsd-member-group ">
|
|
|
|
<h2>Constructors</h2>
|
|
|
|
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
|
|
|
|
<a name="constructor" class="tsd-anchor"></a>
|
|
|
|
<h3>constructor</h3>
|
|
|
|
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
|
|
|
|
<li class="tsd-signature tsd-kind-icon">new <wbr>Proto<wbr>Book<span class="tsd-signature-symbol">(</span>peerStore<span class="tsd-signature-symbol">: </span><a href="../modules/_peer_store_book_.html#peerstore" class="tsd-signature-type">PeerStore</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_peer_store_proto_book_.protobook.html" class="tsd-signature-type">ProtoBook</a></li>
|
|
|
|
</ul>
|
|
|
|
<ul class="tsd-descriptions">
|
|
|
|
<li class="tsd-description">
|
|
|
|
<aside class="tsd-sources">
|
|
|
|
<p>Overrides <a href="_peer_store_book_.book.html">Book</a>.<a href="_peer_store_book_.book.html#constructor">constructor</a></p>
|
|
|
|
</aside>
|
|
|
|
<div class="tsd-comment tsd-typography">
|
|
|
|
<div class="lead">
|
|
|
|
<p>The ProtoBook is responsible for keeping the known supported
|
|
|
|
protocols of a peer.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
|
|
<ul class="tsd-parameters">
|
|
|
|
<li>
|
|
|
|
<h5>peerStore: <a href="../modules/_peer_store_book_.html#peerstore" class="tsd-signature-type">PeerStore</a></h5>
|
|
|
|
<div class="tsd-comment tsd-typography">
|
|
|
|
<div class="lead">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<h4 class="tsd-returns-title">Returns <a href="_peer_store_proto_book_.protobook.html" class="tsd-signature-type">ProtoBook</a></h4>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
<section class="tsd-panel-group tsd-member-group tsd-is-inherited">
|
|
|
|
<h2>Properties</h2>
|
|
|
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
|
|
|
|
<a name="_ps" class="tsd-anchor"></a>
|
|
|
|
<h3>_ps</h3>
|
|
|
|
<div class="tsd-signature tsd-kind-icon">_ps<span class="tsd-signature-symbol">:</span> <a href="../modules/_peer_store_book_.html#peerstore" class="tsd-signature-type">PeerStore</a></div>
|
|
|
|
<aside class="tsd-sources">
|
|
|
|
<p>Inherited from <a href="_peer_store_book_.book.html">Book</a>.<a href="_peer_store_book_.book.html#_ps">_ps</a></p>
|
|
|
|
</aside>
|
|
|
|
</section>
|
|
|
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
|
|
|
|
<a name="data" class="tsd-anchor"></a>
|
|
|
|
<h3>data</h3>
|
|
|
|
<div class="tsd-signature tsd-kind-icon">data<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></div>
|
|
|
|
<aside class="tsd-sources">
|
|
|
|
<p>Inherited from <a href="_peer_store_book_.book.html">Book</a>.<a href="_peer_store_book_.book.html#data">data</a></p>
|
|
|
|
</aside>
|
|
|
|
<div class="tsd-comment tsd-typography">
|
|
|
|
<div class="lead">
|
|
|
|
<p>Map known peers to their data.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
|
|
|
|
<a name="eventname" class="tsd-anchor"></a>
|
|
|
|
<h3>event<wbr>Name</h3>
|
|
|
|
<div class="tsd-signature tsd-kind-icon">event<wbr>Name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
|
|
|
<aside class="tsd-sources">
|
|
|
|
<p>Inherited from <a href="_peer_store_book_.book.html">Book</a>.<a href="_peer_store_book_.book.html#eventname">eventName</a></p>
|
|
|
|
</aside>
|
|
|
|
</section>
|
|
|
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
|
|
|
|
<a name="eventproperty" class="tsd-anchor"></a>
|
|
|
|
<h3>event<wbr>Property</h3>
|
|
|
|
<div class="tsd-signature tsd-kind-icon">event<wbr>Property<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
|
|
|
<aside class="tsd-sources">
|
|
|
|
<p>Inherited from <a href="_peer_store_book_.book.html">Book</a>.<a href="_peer_store_book_.book.html#eventproperty">eventProperty</a></p>
|
|
|
|
</aside>
|
|
|
|
</section>
|
|
|
|
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
|
|
|
|
<a name="eventtransformer" class="tsd-anchor"></a>
|
|
|
|
<h3>event<wbr>Transformer</h3>
|
|
|
|
<div class="tsd-signature tsd-kind-icon">event<wbr>Transformer<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></div>
|
|
|
|
<aside class="tsd-sources">
|
|
|
|
<p>Inherited from <a href="_peer_store_book_.book.html">Book</a>.<a href="_peer_store_book_.book.html#eventtransformer">eventTransformer</a></p>
|
|
|
|
</aside>
|
|
|
|
<div class="tsd-type-declaration">
|
|
|
|
<h4>Type declaration</h4>
|
|
|
|
<ul class="tsd-parameters">
|
|
|
|
<li class="tsd-parameter-signature">
|
|
|
|
<ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-property">
|
|
|
|
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></li>
|
|
|
|
</ul>
|
|
|
|
<ul class="tsd-descriptions">
|
|
|
|
<li class="tsd-description">
|
|
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
|
|
<ul class="tsd-parameters">
|
|
|
|
<li>
|
|
|
|
<h5>data: <span class="tsd-signature-type">any</span></h5>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
<section class="tsd-panel-group tsd-member-group ">
|
|
|
|
<h2>Methods</h2>
|
|
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected">
|
|
|
|
<a name="_emit" class="tsd-anchor"></a>
|
|
|
|
<h3><span class="tsd-flag ts-flagProtected">Protected</span> _emit</h3>
|
|
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected">
|
|
|
|
<li class="tsd-signature tsd-kind-icon">_emit<span class="tsd-signature-symbol">(</span>peerId<span class="tsd-signature-symbol">: </span><a href="../modules/_metrics_index_.html#peerid" class="tsd-signature-type">PeerId</a>, data<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
|
|
</ul>
|
|
|
|
<ul class="tsd-descriptions">
|
|
|
|
<li class="tsd-description">
|
|
|
|
<aside class="tsd-sources">
|
|
|
|
<p>Inherited from <a href="_peer_store_book_.book.html">Book</a>.<a href="_peer_store_book_.book.html#_emit">_emit</a></p>
|
|
|
|
</aside>
|
|
|
|
<div class="tsd-comment tsd-typography">
|
|
|
|
<div class="lead">
|
|
|
|
<p>Emit data.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
|
|
<ul class="tsd-parameters">
|
|
|
|
<li>
|
|
|
|
<h5>peerId: <a href="../modules/_metrics_index_.html#peerid" class="tsd-signature-type">PeerId</a></h5>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> data: <span class="tsd-signature-type">any</span></h5>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected">
|
|
|
|
<a name="_setdata" class="tsd-anchor"></a>
|
|
|
|
<h3><span class="tsd-flag ts-flagProtected">Protected</span> _set<wbr>Data</h3>
|
|
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected">
|
|
|
|
<li class="tsd-signature tsd-kind-icon">_set<wbr>Data<span class="tsd-signature-symbol">(</span>peerId<span class="tsd-signature-symbol">: </span><a href="../modules/_metrics_index_.html#peerid" class="tsd-signature-type">PeerId</a>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, __namedParameters<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">{ </span>emit<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">false</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">true</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
|
|
</ul>
|
|
|
|
<ul class="tsd-descriptions">
|
|
|
|
<li class="tsd-description">
|
|
|
|
<aside class="tsd-sources">
|
|
|
|
<p>Inherited from <a href="_peer_store_book_.book.html">Book</a>.<a href="_peer_store_book_.book.html#_setdata">_setData</a></p>
|
|
|
|
</aside>
|
|
|
|
<div class="tsd-comment tsd-typography">
|
|
|
|
<div class="lead">
|
|
|
|
<p>Set data into the datastructure, persistence and emit it using the provided transformers.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
|
|
<ul class="tsd-parameters">
|
|
|
|
<li>
|
|
|
|
<h5>peerId: <a href="../modules/_metrics_index_.html#peerid" class="tsd-signature-type">PeerId</a></h5>
|
|
|
|
<div class="tsd-comment tsd-typography">
|
|
|
|
<p>peerId of the data to store</p>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<h5>data: <span class="tsd-signature-type">any</span></h5>
|
|
|
|
<div class="tsd-comment tsd-typography">
|
|
|
|
<p>data to store.</p>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<h5><span class="tsd-flag ts-flagOptional">Optional</span> __namedParameters: <span class="tsd-signature-symbol">{ </span>emit<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">false</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">true</span><span class="tsd-signature-symbol"> }</span></h5>
|
|
|
|
<ul class="tsd-parameters">
|
|
|
|
<li class="tsd-parameter">
|
|
|
|
<h5>emit<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">false</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">true</span></h5>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
|
|
<a name="add" class="tsd-anchor"></a>
|
|
|
|
<h3>add</h3>
|
|
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
|
|
<li class="tsd-signature tsd-kind-icon">add<span class="tsd-signature-symbol">(</span>peerId<span class="tsd-signature-symbol">: </span><a href="../modules/_metrics_index_.html#peerid" class="tsd-signature-type">PeerId</a>, protocols<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_peer_store_proto_book_.protobook.html" class="tsd-signature-type">ProtoBook</a></li>
|
|
|
|
</ul>
|
|
|
|
<ul class="tsd-descriptions">
|
|
|
|
<li class="tsd-description">
|
|
|
|
<aside class="tsd-sources">
|
|
|
|
</aside>
|
|
|
|
<div class="tsd-comment tsd-typography">
|
|
|
|
<div class="lead">
|
|
|
|
<p>Adds known protocols of a provided peer.
|
|
|
|
If the peer was not known before, it will be added.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
|
|
<ul class="tsd-parameters">
|
|
|
|
<li>
|
|
|
|
<h5>peerId: <a href="../modules/_metrics_index_.html#peerid" class="tsd-signature-type">PeerId</a></h5>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<h5>protocols: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<h4 class="tsd-returns-title">Returns <a href="_peer_store_proto_book_.protobook.html" class="tsd-signature-type">ProtoBook</a></h4>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
|
|
<a name="delete" class="tsd-anchor"></a>
|
|
|
|
<h3>delete</h3>
|
|
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
|
|
<li class="tsd-signature tsd-kind-icon">delete<span class="tsd-signature-symbol">(</span>peerId<span class="tsd-signature-symbol">: </span><a href="../modules/_metrics_index_.html#peerid" class="tsd-signature-type">PeerId</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
|
|
</ul>
|
|
|
|
<ul class="tsd-descriptions">
|
|
|
|
<li class="tsd-description">
|
|
|
|
<aside class="tsd-sources">
|
|
|
|
<p>Inherited from <a href="_peer_store_book_.book.html">Book</a>.<a href="_peer_store_book_.book.html#delete">delete</a></p>
|
|
|
|
</aside>
|
|
|
|
<div class="tsd-comment tsd-typography">
|
|
|
|
<div class="lead">
|
|
|
|
<p>Deletes the provided peer from the book.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
|
|
<ul class="tsd-parameters">
|
|
|
|
<li>
|
|
|
|
<h5>peerId: <a href="../modules/_metrics_index_.html#peerid" class="tsd-signature-type">PeerId</a></h5>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
|
|
<a name="get" class="tsd-anchor"></a>
|
|
|
|
<h3>get</h3>
|
|
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
|
|
<li class="tsd-signature tsd-kind-icon">get<span class="tsd-signature-symbol">(</span>peerId<span class="tsd-signature-symbol">: </span><a href="../modules/_metrics_index_.html#peerid" class="tsd-signature-type">PeerId</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span></li>
|
|
|
|
</ul>
|
|
|
|
<ul class="tsd-descriptions">
|
|
|
|
<li class="tsd-description">
|
|
|
|
<aside class="tsd-sources">
|
|
|
|
<p>Inherited from <a href="_peer_store_book_.book.html">Book</a>.<a href="_peer_store_book_.book.html#get">get</a></p>
|
|
|
|
</aside>
|
|
|
|
<div class="tsd-comment tsd-typography">
|
|
|
|
<div class="lead">
|
|
|
|
<p>Get the known data of a provided peer.
|
|
|
|
Returns <code>undefined</code> if there is no available data for the given peer.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
|
|
<ul class="tsd-parameters">
|
|
|
|
<li>
|
|
|
|
<h5>peerId: <a href="../modules/_metrics_index_.html#peerid" class="tsd-signature-type">PeerId</a></h5>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span></h4>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
|
|
<a name="remove" class="tsd-anchor"></a>
|
|
|
|
<h3>remove</h3>
|
|
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
|
|
<li class="tsd-signature tsd-kind-icon">remove<span class="tsd-signature-symbol">(</span>peerId<span class="tsd-signature-symbol">: </span><a href="../modules/_metrics_index_.html#peerid" class="tsd-signature-type">PeerId</a>, protocols<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_peer_store_proto_book_.protobook.html" class="tsd-signature-type">ProtoBook</a></li>
|
|
|
|
</ul>
|
|
|
|
<ul class="tsd-descriptions">
|
|
|
|
<li class="tsd-description">
|
|
|
|
<aside class="tsd-sources">
|
|
|
|
</aside>
|
|
|
|
<div class="tsd-comment tsd-typography">
|
|
|
|
<div class="lead">
|
|
|
|
<p>Removes known protocols of a provided peer.
|
|
|
|
If the protocols did not exist before, nothing will be done.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
|
|
<ul class="tsd-parameters">
|
|
|
|
<li>
|
|
|
|
<h5>peerId: <a href="../modules/_metrics_index_.html#peerid" class="tsd-signature-type">PeerId</a></h5>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<h5>protocols: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<h4 class="tsd-returns-title">Returns <a href="_peer_store_proto_book_.protobook.html" class="tsd-signature-type">ProtoBook</a></h4>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
|
|
<a name="set" class="tsd-anchor"></a>
|
|
|
|
<h3>set</h3>
|
|
|
|
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
|
|
<li class="tsd-signature tsd-kind-icon">set<span class="tsd-signature-symbol">(</span>peerId<span class="tsd-signature-symbol">: </span><a href="../modules/_metrics_index_.html#peerid" class="tsd-signature-type">PeerId</a>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
|
|
</ul>
|
|
|
|
<ul class="tsd-descriptions">
|
|
|
|
<li class="tsd-description">
|
|
|
|
<aside class="tsd-sources">
|
|
|
|
<p>Inherited from <a href="_peer_store_book_.book.html">Book</a>.<a href="_peer_store_book_.book.html#set">set</a></p>
|
|
|
|
</aside>
|
|
|
|
<div class="tsd-comment tsd-typography">
|
|
|
|
<div class="lead">
|
|
|
|
<p>Set known data of a provided peer.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
|
|
<ul class="tsd-parameters">
|
|
|
|
<li>
|
|
|
|
<h5>peerId: <a href="../modules/_metrics_index_.html#peerid" class="tsd-signature-type">PeerId</a></h5>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<h5>data: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">any</span></h5>
|
|
|
|
<div class="tsd-comment tsd-typography">
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
|
|
<nav class="tsd-navigation primary">
|
|
|
|
<ul>
|
|
|
|
<li class="current tsd-kind-module">
|
|
|
|
<a href="../modules/_peer_store_proto_book_.html">peer-store/proto-book</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
<nav class="tsd-navigation secondary menu-sticky">
|
|
|
|
<ul class="before-current">
|
|
|
|
</ul>
|
|
|
|
<ul class="current">
|
|
|
|
<li class="current tsd-kind-class tsd-parent-kind-module">
|
|
|
|
<a href="_peer_store_proto_book_.protobook.html" class="tsd-kind-icon">Proto<wbr>Book</a>
|
|
|
|
<ul>
|
|
|
|
<li class=" tsd-kind-reference tsd-parent-kind-class">
|
|
|
|
<a href="_peer_store_proto_book_.protobook.html#peerstore" class="tsd-kind-icon">Peer<wbr>Store</a>
|
|
|
|
</li>
|
|
|
|
<li class=" tsd-kind-reference tsd-parent-kind-class">
|
|
|
|
<a href="_peer_store_proto_book_.protobook.html#peerstore-1" class="tsd-kind-icon">Peer<wbr>Store</a>
|
|
|
|
</li>
|
|
|
|
<li class=" tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
|
|
|
|
<a href="_peer_store_proto_book_.protobook.html#constructor" class="tsd-kind-icon">constructor</a>
|
|
|
|
</li>
|
|
|
|
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
|
|
|
|
<a href="_peer_store_proto_book_.protobook.html#_ps" class="tsd-kind-icon">_ps</a>
|
|
|
|
</li>
|
|
|
|
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
|
|
|
|
<a href="_peer_store_proto_book_.protobook.html#data" class="tsd-kind-icon">data</a>
|
|
|
|
</li>
|
|
|
|
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
|
|
|
|
<a href="_peer_store_proto_book_.protobook.html#eventname" class="tsd-kind-icon">event<wbr>Name</a>
|
|
|
|
</li>
|
|
|
|
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
|
|
|
|
<a href="_peer_store_proto_book_.protobook.html#eventproperty" class="tsd-kind-icon">event<wbr>Property</a>
|
|
|
|
</li>
|
|
|
|
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
|
|
|
|
<a href="_peer_store_proto_book_.protobook.html#eventtransformer" class="tsd-kind-icon">event<wbr>Transformer</a>
|
|
|
|
</li>
|
|
|
|
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected">
|
|
|
|
<a href="_peer_store_proto_book_.protobook.html#_emit" class="tsd-kind-icon">_emit</a>
|
|
|
|
</li>
|
|
|
|
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected">
|
|
|
|
<a href="_peer_store_proto_book_.protobook.html#_setdata" class="tsd-kind-icon">_set<wbr>Data</a>
|
|
|
|
</li>
|
|
|
|
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
|
|
<a href="_peer_store_proto_book_.protobook.html#add" class="tsd-kind-icon">add</a>
|
|
|
|
</li>
|
|
|
|
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
|
|
<a href="_peer_store_proto_book_.protobook.html#delete" class="tsd-kind-icon">delete</a>
|
|
|
|
</li>
|
|
|
|
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
|
|
<a href="_peer_store_proto_book_.protobook.html#get" class="tsd-kind-icon">get</a>
|
|
|
|
</li>
|
|
|
|
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
|
|
<a href="_peer_store_proto_book_.protobook.html#remove" class="tsd-kind-icon">remove</a>
|
|
|
|
</li>
|
|
|
|
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
|
|
<a href="_peer_store_proto_book_.protobook.html#set" class="tsd-kind-icon">set</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<ul class="after-current">
|
|
|
|
<li class=" tsd-kind-type-alias tsd-parent-kind-module tsd-is-not-exported">
|
|
|
|
<a href="../modules/_peer_store_proto_book_.html#peerstore" class="tsd-kind-icon">Peer<wbr>Store</a>
|
|
|
|
</li>
|
|
|
|
<li class=" tsd-kind-variable tsd-parent-kind-module tsd-is-not-exported">
|
|
|
|
<a href="../modules/_peer_store_proto_book_.html#protobook_base" class="tsd-kind-icon">Proto<wbr>Book_<wbr>base</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<footer>
|
|
|
|
<div class="container">
|
|
|
|
<h2>Legend</h2>
|
|
|
|
<div class="tsd-legend-group">
|
|
|
|
<ul class="tsd-legend">
|
|
|
|
<li class="tsd-kind-namespace"><span class="tsd-kind-icon">Namespace</span></li>
|
|
|
|
<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
|
|
|
|
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
|
|
|
|
<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
|
|
|
|
</ul>
|
|
|
|
<ul class="tsd-legend">
|
|
|
|
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
|
|
|
|
<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
|
|
|
|
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
|
|
|
|
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
|
|
|
|
</ul>
|
|
|
|
<ul class="tsd-legend">
|
|
|
|
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
|
|
|
|
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
|
|
|
|
</ul>
|
|
|
|
<ul class="tsd-legend">
|
|
|
|
<li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</footer>
|
|
|
|
<div class="overlay"></div>
|
|
|
|
<script src="../assets/js/main.js"></script>
|
|
|
|
</body>
|
|
|
|
</html>
|