-
Notifications
You must be signed in to change notification settings - Fork 104
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
coreiface: deprecate DhtAPI in favor of RoutingAPI #461
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## main #461 +/- ##
==========================================
- Coverage 66.47% 66.44% -0.04%
==========================================
Files 207 207
Lines 24681 24681
==========================================
- Hits 16407 16399 -8
- Misses 6851 6858 +7
- Partials 1423 1424 +1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a bunch of go-check errors around using the wrong types. After fixing that things look pretty good.
FindPeer(context.Context, peer.ID) (peer.AddrInfo, error) | ||
|
||
// FindProviders finds peers in the DHT who can provide a specific value given a key. | ||
FindProviders(context.Context, path.Path, ...options.DhtFindProvidersOption) (<-chan peer.AddrInfo, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
options.Routing?
FindProviders(context.Context, path.Path, ...options.DhtFindProvidersOption) (<-chan peer.AddrInfo, error) | ||
|
||
// Provide announces to the network that you are providing given values. | ||
Provide(context.Context, path.Path, ...options.DhtProvideOption) error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
options.Routing?
|
||
time.Sleep(3 * time.Second) | ||
|
||
out, err := apis[2].Routing().FindProviders(ctx, p, options.Dht.NumProviders(1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
options.Routing?
@Jorropo why skip changelog here? We're deprecating an API. No we're not removing it or anything but seems reasonable to mention. |
Good question, the API was already deprecated in Kubo and I had tunnel vision. |
Triage notes:
|
No description provided.