Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transport and discovery modules: use a function instead of a class #223

Closed
pgte opened this issue Jul 18, 2018 · 3 comments
Closed

transport and discovery modules: use a function instead of a class #223

pgte opened this issue Jul 18, 2018 · 3 comments
Labels
kind/enhancement A net-new feature or improvement to an existing feature status/ready Ready to be worked

Comments

@pgte
Copy link
Contributor

pgte commented Jul 18, 2018

Currently, you can define a transport or discovery module as an instance or a class.
Instead of a class, why not a function call here and here? This way, the provider has control over which instance to deliver to libp2p.

Use case: this allows me to solve peer-base/peer-base#1

@jacobheun
Copy link
Contributor

What data would you want to see passed into that function? I assume you are talking about using generators for the transports and discovery modules?

@pgte
Copy link
Contributor Author

pgte commented Jul 18, 2018

Ideally I would like the peerInfo or peerId to be passed in.
This is more about the interface being a function and not a class.
The arguments of this call is being explored in #222.

@daviddias daviddias added kind/enhancement A net-new feature or improvement to an existing feature status/ready Ready to be worked labels Aug 15, 2018
@achingbrain
Copy link
Member

This has been refactored. Closing due to staleness.

maschad pushed a commit to maschad/js-libp2p that referenced this issue Jun 21, 2023
Uses new metrics interface from libp2p/js-libp2p-interfaces#310 to report useful connection metrics.

Similar to libp2p#217 but it adds the listening host/port to the metrics name to allow multiple TCP listeners to report metrics separately.

BREAKING CHANGE: requires metrics interface v4
maschad pushed a commit to maschad/js-libp2p that referenced this issue Jun 21, 2023
## [6.0.0](libp2p/js-libp2p-tcp@v5.0.2...v6.0.0) (2022-11-05)

### ⚠ BREAKING CHANGES

* requires metrics interface v4

### Features

* add metrics ([libp2p#223](libp2p/js-libp2p-tcp#223)) ([c004357](libp2p/js-libp2p-tcp@c004357)), closes [libp2p#217](libp2p/js-libp2p-tcp#217)
maschad pushed a commit to maschad/js-libp2p that referenced this issue Jun 21, 2023
Bumps [@multiformats/multiaddr](https://github.com/multiformats/js-multiaddr) from 11.6.1 to 12.0.0.
- [Release notes](https://github.com/multiformats/js-multiaddr/releases)
- [Changelog](https://github.com/multiformats/js-multiaddr/blob/master/CHANGELOG.md)
- [Commits](multiformats/js-multiaddr@v11.6.1...v12.0.0)

---
updated-dependencies:
- dependency-name: "@multiformats/multiaddr"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
maschad pushed a commit to maschad/js-libp2p that referenced this issue Jun 21, 2023
## [5.0.6](libp2p/js-libp2p-websockets@v5.0.5...v5.0.6) (2023-03-17)

### Dependencies

* bump @multiformats/multiaddr from 11.6.1 to 12.0.0 ([libp2p#223](libp2p/js-libp2p-websockets#223)) ([e69a70c](libp2p/js-libp2p-websockets@e69a70c))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature status/ready Ready to be worked
Projects
None yet
Development

No branches or pull requests

4 participants