Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

feat: use symbols to return routers #464

Merged
merged 3 commits into from
Apr 27, 2023

Conversation

achingbrain
Copy link
Member

The DHT interface is similar to the content/peer routing interfaces but different.

In order to detect content/peer routers and peer discovery implementations in arbitrary libp2p modules use the exported symbols to create getters for them.

The DHTContentRouting and DHTPeerRouting classes have been ported over from libp2p.

The DHT interface is similar to the content/peer routing interfaces
but different.

In order to detect content/peer routers and peer discovery implementations
in [arbitrary libp2p modules](libp2p/js-libp2p#1563)
use the exported symbols to create getters for them.

The DHTContentRouting and DHTPeerRouting classes have been ported over
from libp2p.
@achingbrain achingbrain merged commit d681aaf into master Apr 27, 2023
@achingbrain achingbrain deleted the feat/use-symbols-to-return-routers branch April 27, 2023 14:14
github-actions bot pushed a commit that referenced this pull request Apr 27, 2023
## [9.1.0](v9.0.0...v9.1.0) (2023-04-27)

### Features

* use symbols to return routers ([#464](#464)) ([d681aaf](d681aaf))
@github-actions
Copy link

🎉 This PR is included in version 9.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

import type { Datastore } from 'interface-datastore'
import { PeerRouting, peerRouting } from '@libp2p/interface-peer-routing'
import { PeerDiscovery, peerDiscovery } from '@libp2p/interface-peer-discovery'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be imported as @libp2p/peer-discovery based on the interface @achingbrain ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, no - that’s a typo in the comment. Got to get that TS comment verification stuff in!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants