mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-27 21:37:57 +08:00
coreapi: dht: remove option prefix
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com> This commit was moved from ipfs/interface-go-ipfs-core@a288d2c93d This commit was moved from ipfs/boxo@4390a24ff2
This commit is contained in:
parent
835950fe4a
commit
f56bdca2e6
@ -43,18 +43,18 @@ type dhtOpts struct{}
|
||||
|
||||
var Dht dhtOpts
|
||||
|
||||
// WithRecursive is an option for Dht.Provide which specifies whether to provide
|
||||
// Recursive is an option for Dht.Provide which specifies whether to provide
|
||||
// the given path recursively
|
||||
func (dhtOpts) WithRecursive(recursive bool) DhtProvideOption {
|
||||
func (dhtOpts) Recursive(recursive bool) DhtProvideOption {
|
||||
return func(settings *DhtProvideSettings) error {
|
||||
settings.Recursive = recursive
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// WithNumProviders is an option for Dht.FindProviders which specifies the
|
||||
// NumProviders is an option for Dht.FindProviders which specifies the
|
||||
// number of peers to look for. Default is 20
|
||||
func (dhtOpts) WithNumProviders(numProviders int) DhtFindProvidersOption {
|
||||
func (dhtOpts) NumProviders(numProviders int) DhtFindProvidersOption {
|
||||
return func(settings *DhtFindProvidersSettings) error {
|
||||
settings.NumProviders = numProviders
|
||||
return nil
|
||||
|
||||
Loading…
Reference in New Issue
Block a user