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:
Łukasz Magiera 2018-08-28 02:22:09 +02:00 committed by Steven Allen
parent 835950fe4a
commit f56bdca2e6

View File

@ -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