This repository has been archived by the owner on Sep 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce routability and protocol events; cache unmarshalled RSA keys (
#105) * event: Add autonat events (#25) * add events for identify (#26) * implement caching for rsaKey.Bytes() * store marshalled protobuf in cache for RsaPublicKey.Bytes() * fix(crypto): fix build when openssl is enabled * add godocs to routability events. Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com> Co-authored-by: Whyrusleeping <why@ipfs.io> Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com> Co-authored-by: Steven Allen <steven@stebalien.com>
- Loading branch information
1 parent
0ad6b1c
commit 52a4260
Showing
8 changed files
with
84 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package event | ||
|
||
import "github.com/libp2p/go-libp2p-core/peer" | ||
|
||
// EvtPeerIdentificationCompleted is emitted when the initial identification round for a peer is completed. | ||
type EvtPeerIdentificationCompleted struct { | ||
// Peer is the ID of the peer whose identification succeeded. | ||
Peer peer.ID | ||
} | ||
|
||
// EvtPeerIdentificationFailed is emitted when the initial identification round for a peer failed. | ||
type EvtPeerIdentificationFailed struct { | ||
// Peer is the ID of the peer whose identification failed. | ||
Peer peer.ID | ||
// Reason is the reason why identification failed. | ||
Reason error | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package event | ||
|
||
// EvtLocalRoutabilityPrivate is an event struct to be emitted with the local's | ||
// node routability changes to PRIVATE (i.e. not routable from the Internet). | ||
// | ||
// This event is usually emitted by the AutoNAT subsystem. | ||
type EvtLocalRoutabilityPrivate struct{} | ||
|
||
// EvtLocalRoutabilityPublic is an event struct to be emitted with the local's | ||
// node routability changes to PUBLIC (i.e. appear to routable from the | ||
// Internet). | ||
// | ||
// This event is usually emitted by the AutoNAT subsystem. | ||
type EvtLocalRoutabilityPublic struct{} | ||
|
||
// EvtLocalRoutabilityUnknown is an event struct to be emitted with the local's | ||
// node routability changes to UNKNOWN (i.e. we were unable to make a | ||
// determination about our NAT status with enough confidence). | ||
// | ||
// This event is usually emitted by the AutoNAT subsystem. | ||
type EvtLocalRoutabilityUnknown struct{} |