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-unixfs
Commits
70999886
Commit
70999886
authored
10 years ago
by
Brian Tiger Chow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(bitswap:msg) define interfaces
parent
24224979
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
bitswap/message.go
bitswap/message.go
+12
-0
No files found.
bitswap/message.go
View file @
70999886
...
...
@@ -8,6 +8,18 @@ import (
u
"github.com/jbenet/go-ipfs/util"
)
type
BitSwapMessage
interface
{
AppendWanted
(
k
u
.
Key
)
AppendBlock
(
b
*
blocks
.
Block
)
Exportable
}
type
Exportable
interface
{
ToProto
()
*
PBMessage
ToSwarm
(
p
*
peer
.
Peer
)
*
swarm
.
Message
ToNet
(
p
*
peer
.
Peer
)
(
nm
.
NetMessage
,
error
)
}
// message wraps a proto message for convenience
type
message
struct
{
pb
PBMessage
...
...
This diff is collapsed.
Click to expand it.
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