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

Add RoutingDHT struct that implements the routing.Routing interface and embeds the DHT #30

Open
iand opened this issue Oct 2, 2023 · 0 comments
Assignees

Comments

@iand
Copy link
Contributor

iand commented Oct 2, 2023

Migrated from libp2p/go-libp2p-kad-dht#929

Given that many are not happy with the routing.Routing interface we could avoid "polluting" the DHT API with the routing.Routing methods. So I propose to do the following:

type RoutingDHT struct {
    *DHT
}

var _ routing.Routing = (*RoutingDHT)(nil)

func NewRoutingDHT(d *DHT) *RoutingDHT {
    return &RoutingDHT{DHT: d}
}

// routing.Routing methods...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

2 participants