mirror of
https://github.com/fluencelabs/go-libp2p-kad-dht
synced 2025-04-24 22:32:13 +00:00
doc(options): document that disabling values/providers should only be done on forked dhts
This commit is contained in:
parent
52747fc1f0
commit
c2b72b250d
3
dht.go
3
dht.go
@ -74,6 +74,9 @@ type IpfsDHT struct {
|
||||
|
||||
maxRecordAge time.Duration
|
||||
|
||||
// Allows disabling dht subsystems. These should _only_ be set on
|
||||
// "forked" DHTs (e.g., DHTs with custom protocols and/or private
|
||||
// networks).
|
||||
enableProviders, enableValues bool
|
||||
}
|
||||
|
||||
|
@ -185,6 +185,9 @@ func DisableAutoRefresh() Option {
|
||||
// EnableProviders enables storing and retrieving provider records.
|
||||
//
|
||||
// Defaults to true.
|
||||
//
|
||||
// WARNING: do not change this unless you're using a forked DHT (i.e., a private
|
||||
// network and/or distinct DHT protocols with the `Protocols` option).
|
||||
func EnableProviders(enable bool) Option {
|
||||
return func(o *Options) error {
|
||||
o.EnableProviders = enable
|
||||
@ -195,6 +198,9 @@ func EnableProviders(enable bool) Option {
|
||||
// EnableValues enables storing and retrieving value records.
|
||||
//
|
||||
// Defaults to true.
|
||||
//
|
||||
// WARNING: do not change this unless you're using a forked DHT (i.e., a private
|
||||
// network and/or distinct DHT protocols with the `Protocols` option).
|
||||
func EnableValues(enable bool) Option {
|
||||
return func(o *Options) error {
|
||||
o.EnableValues = enable
|
||||
|
Loading…
x
Reference in New Issue
Block a user