Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-kad-dht
Commits
c2b72b25
Commit
c2b72b25
authored
Dec 05, 2019
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc(options): document that disabling values/providers should only be done on forked dhts
parent
52747fc1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
dht.go
dht.go
+3
-0
opts/options.go
opts/options.go
+6
-0
No files found.
dht.go
View file @
c2b72b25
...
...
@@ -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
}
...
...
opts/options.go
View file @
c2b72b25
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment