@libp2p/interface
Advanced tools
Comparing version 2.1.2-0c5957836 to 2.1.2-0d326d102
@@ -146,5 +146,6 @@ /** | ||
/** | ||
* This event will be triggered any time we are disconnected from another peer, regardless of | ||
* the circumstances of that disconnection. If we happen to have multiple connections to a | ||
* peer, this event will **only** be triggered when the last connection is closed. | ||
* This event will be triggered any time we are disconnected from another | ||
* peer, regardless of the circumstances of that disconnection. If we happen | ||
* to have multiple connections to a peer, this event will **only** be | ||
* triggered when the last connection is closed. | ||
* | ||
@@ -162,5 +163,6 @@ * @example | ||
/** | ||
* This event is dispatched after a remote peer has successfully responded to the identify | ||
* protocol. Note that for this to be emitted, both peers must have an identify service | ||
* configured. | ||
* When a peer tagged with `keep-alive` disconnects, we will make multiple | ||
* attempts to reconnect to it with a backoff factor (see the connection | ||
* manager settings for details). If these all fail, the `keep-alive` tag will | ||
* be removed and this event will be emitted. | ||
* | ||
@@ -170,2 +172,17 @@ * @example | ||
* ```TypeScript | ||
* libp2p.addEventListener('peer:reconnect-failure', (event) => { | ||
* const peerId = event.detail | ||
* // ... | ||
* }) | ||
* ``` | ||
*/ | ||
'peer:reconnect-failure': CustomEvent<PeerId>; | ||
/** | ||
* This event is dispatched after a remote peer has successfully responded to | ||
* the identify protocol. Note that for this to be emitted, both peers must | ||
* have an identify service configured. | ||
* | ||
* @example | ||
* | ||
* ```TypeScript | ||
* libp2p.addEventListener('peer:identify', (event) => { | ||
@@ -172,0 +189,0 @@ * const identifyResult = event.detail |
@@ -0,2 +1,10 @@ | ||
/** | ||
* When a peer that is tagged with this prefix disconnects, we will attempt to | ||
* redial it, up to a limit. | ||
* | ||
* To allow multiple components to add/remove their own keep-alive tags without | ||
* accidentally overwriting those of other components, attach a unique suffix to | ||
* the tag, e.g. `keep-alive-circuit-relay` or `keep-alive-kad-dht`, etc. | ||
*/ | ||
export declare const KEEP_ALIVE = "keep-alive"; | ||
//# sourceMappingURL=tags.d.ts.map |
@@ -0,2 +1,10 @@ | ||
/** | ||
* When a peer that is tagged with this prefix disconnects, we will attempt to | ||
* redial it, up to a limit. | ||
* | ||
* To allow multiple components to add/remove their own keep-alive tags without | ||
* accidentally overwriting those of other components, attach a unique suffix to | ||
* the tag, e.g. `keep-alive-circuit-relay` or `keep-alive-kad-dht`, etc. | ||
*/ | ||
export const KEEP_ALIVE = 'keep-alive'; | ||
//# sourceMappingURL=tags.js.map |
{ | ||
"name": "@libp2p/interface", | ||
"version": "2.1.2-0c5957836", | ||
"version": "2.1.2-0d326d102", | ||
"description": "The interface implemented by a libp2p node", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0 OR MIT", |
@@ -164,5 +164,6 @@ /** | ||
/** | ||
* This event will be triggered any time we are disconnected from another peer, regardless of | ||
* the circumstances of that disconnection. If we happen to have multiple connections to a | ||
* peer, this event will **only** be triggered when the last connection is closed. | ||
* This event will be triggered any time we are disconnected from another | ||
* peer, regardless of the circumstances of that disconnection. If we happen | ||
* to have multiple connections to a peer, this event will **only** be | ||
* triggered when the last connection is closed. | ||
* | ||
@@ -181,5 +182,6 @@ * @example | ||
/** | ||
* This event is dispatched after a remote peer has successfully responded to the identify | ||
* protocol. Note that for this to be emitted, both peers must have an identify service | ||
* configured. | ||
* When a peer tagged with `keep-alive` disconnects, we will make multiple | ||
* attempts to reconnect to it with a backoff factor (see the connection | ||
* manager settings for details). If these all fail, the `keep-alive` tag will | ||
* be removed and this event will be emitted. | ||
* | ||
@@ -189,2 +191,18 @@ * @example | ||
* ```TypeScript | ||
* libp2p.addEventListener('peer:reconnect-failure', (event) => { | ||
* const peerId = event.detail | ||
* // ... | ||
* }) | ||
* ``` | ||
*/ | ||
'peer:reconnect-failure': CustomEvent<PeerId> | ||
/** | ||
* This event is dispatched after a remote peer has successfully responded to | ||
* the identify protocol. Note that for this to be emitted, both peers must | ||
* have an identify service configured. | ||
* | ||
* @example | ||
* | ||
* ```TypeScript | ||
* libp2p.addEventListener('peer:identify', (event) => { | ||
@@ -191,0 +209,0 @@ * const identifyResult = event.detail |
@@ -0,1 +1,9 @@ | ||
/** | ||
* When a peer that is tagged with this prefix disconnects, we will attempt to | ||
* redial it, up to a limit. | ||
* | ||
* To allow multiple components to add/remove their own keep-alive tags without | ||
* accidentally overwriting those of other components, attach a unique suffix to | ||
* the tag, e.g. `keep-alive-circuit-relay` or `keep-alive-kad-dht`, etc. | ||
*/ | ||
export const KEEP_ALIVE = 'keep-alive' |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
300211
7423