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
e01dc8e3
Commit
e01dc8e3
authored
Apr 20, 2020
by
Alan Shaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: rename to cfg
parent
da8a30f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
providers/providers_manager.go
providers/providers_manager.go
+4
-4
No files found.
providers/providers_manager.go
View file @
e01dc8e3
...
...
@@ -102,17 +102,17 @@ type getProv struct {
// NewProviderManager constructor
func
NewProviderManager
(
ctx
context
.
Context
,
local
peer
.
ID
,
dstore
ds
.
Batching
,
opts
...
Option
)
(
*
ProviderManager
,
error
)
{
var
options
options
if
err
:=
options
.
apply
(
append
([]
Option
{
defaults
},
opts
...
)
...
);
err
!=
nil
{
var
cfg
options
if
err
:=
cfg
.
apply
(
append
([]
Option
{
defaults
},
opts
...
)
...
);
err
!=
nil
{
return
nil
,
err
}
pm
:=
new
(
ProviderManager
)
pm
.
getprovs
=
make
(
chan
*
getProv
)
pm
.
newprovs
=
make
(
chan
*
addProv
)
pm
.
dstore
=
autobatch
.
NewAutoBatching
(
dstore
,
batchBufferSize
)
pm
.
cache
=
options
.
cache
pm
.
cache
=
cfg
.
cache
pm
.
proc
=
goprocessctx
.
WithContext
(
ctx
)
pm
.
cleanupInterval
=
options
.
cleanupInterval
pm
.
cleanupInterval
=
cfg
.
cleanupInterval
pm
.
proc
.
Go
(
pm
.
run
)
return
pm
,
nil
}
...
...
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