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
dms3
go-dms3-routing
Commits
929e4cb9
Commit
929e4cb9
authored
May 20, 2015
by
Tommi Virtanen
Committed by
Jeromy
Jan 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fsrepo: Refactor to extract datastore internals
License: MIT Signed-off-by:
Tommi Virtanen
<
tv@eagain.net
>
parent
e0459748
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
dht/dht.go
dht/dht.go
+2
-2
none/none_client.go
none/none_client.go
+1
-1
No files found.
dht/dht.go
View file @
929e4cb9
...
...
@@ -44,7 +44,7 @@ type IpfsDHT struct {
self
peer
.
ID
// Local peer (yourself)
peerstore
peer
.
Peerstore
// Peer Registry
datastore
ds
.
ThreadSafe
Datastore
// Local data
datastore
ds
.
Datastore
// Local data
routingTable
*
kb
.
RoutingTable
// Array of routing tables for differently distanced nodes
providers
*
ProviderManager
...
...
@@ -60,7 +60,7 @@ type IpfsDHT struct {
}
// NewDHT creates a new DHT object with the given peer as the 'local' host
func
NewDHT
(
ctx
context
.
Context
,
h
host
.
Host
,
dstore
ds
.
ThreadSafe
Datastore
)
*
IpfsDHT
{
func
NewDHT
(
ctx
context
.
Context
,
h
host
.
Host
,
dstore
ds
.
Datastore
)
*
IpfsDHT
{
dht
:=
new
(
IpfsDHT
)
dht
.
datastore
=
dstore
dht
.
self
=
h
.
ID
()
...
...
none/none_client.go
View file @
929e4cb9
...
...
@@ -47,7 +47,7 @@ func (c *nilclient) Bootstrap(_ context.Context) error {
return
nil
}
func
ConstructNilRouting
(
_
context
.
Context
,
_
p2phost
.
Host
,
_
ds
.
ThreadSafe
Datastore
)
(
routing
.
IpfsRouting
,
error
)
{
func
ConstructNilRouting
(
_
context
.
Context
,
_
p2phost
.
Host
,
_
ds
.
Datastore
)
(
routing
.
IpfsRouting
,
error
)
{
return
&
nilclient
{},
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