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-blockservice
Commits
8362ab4e
Commit
8362ab4e
authored
Sep 15, 2014
by
Brian Tiger Chow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(blockservice) use bitswap.Exchange interface
parent
d308efc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
blockservice.go
blockservice.go
+2
-2
No files found.
blockservice.go
View file @
8362ab4e
...
...
@@ -16,11 +16,11 @@ import (
// It uses an internal `datastore.Datastore` instance to store values.
type
BlockService
struct
{
Datastore
ds
.
Datastore
Remote
*
bitswap
.
BitSwap
Remote
bitswap
.
Exchange
}
// NewBlockService creates a BlockService with given datastore instance.
func
NewBlockService
(
d
ds
.
Datastore
,
rem
*
bitswap
.
BitSwap
)
(
*
BlockService
,
error
)
{
func
NewBlockService
(
d
ds
.
Datastore
,
rem
bitswap
.
Exchange
)
(
*
BlockService
,
error
)
{
if
d
==
nil
{
return
nil
,
fmt
.
Errorf
(
"BlockService requires valid datastore"
)
}
...
...
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