Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

ID() method on connections and streams + record opening time #224

Merged
merged 28 commits into from
Jun 5, 2020

Conversation

raulk
Copy link
Member

@raulk raulk commented Jun 5, 2020

This PR implements the interface change introduced in network.Conn and network.Stream by libp2p/go-libp2p-core#159, concretely it adds an ID() string method that returns increasing ordinal IDs that are unique within the current host run:

  • Conn#ID() returns a string of format <peerid[0:10]>-<unique, incrementing ordinal>.
  • Stream#ID() returns a string of format <conn_id-<unique, incrementing ordinal>.

This change also starts recording the opening timestamp of connections and streams under network.Stat.


Follows on from #204 after heavy modifications of the original proposal.

@raulk raulk merged commit 7ada4e5 into master Jun 5, 2020
@raulk raulk deleted the feat/introspection2.0 branch June 5, 2020 11:44
@aschmahmann aschmahmann mentioned this pull request Sep 22, 2020
72 tasks
Jorropo pushed a commit to Jorropo/go-libp2p-swarm that referenced this pull request Oct 8, 2020
…p#224)

Co-authored-by: Aarsh Shah <aarshkshah1992@gmail.com>
Co-authored-by: Raúl Kripalani <raul@protocol.ai>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants