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
3c9d0447
Commit
3c9d0447
authored
Apr 12, 2019
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
providers: add some documentation
parent
24c38411
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
providers/providers.go
providers/providers.go
+3
-0
No files found.
providers/providers.go
View file @
3c9d0447
...
...
@@ -312,6 +312,7 @@ func (pm *ProviderManager) run() {
}
}
// AddProvider adds a provider.
func
(
pm
*
ProviderManager
)
AddProvider
(
ctx
context
.
Context
,
k
cid
.
Cid
,
val
peer
.
ID
)
{
prov
:=
&
addProv
{
k
:
k
,
...
...
@@ -323,6 +324,8 @@ func (pm *ProviderManager) AddProvider(ctx context.Context, k cid.Cid, val peer.
}
}
// GetProviders returns the set of providers for the given key.
// This method _does not_ copy the set. Do not modify it.
func
(
pm
*
ProviderManager
)
GetProviders
(
ctx
context
.
Context
,
k
cid
.
Cid
)
[]
peer
.
ID
{
gp
:=
&
getProv
{
k
:
k
,
...
...
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