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-bitswap
Commits
a6371b4b
Commit
a6371b4b
authored
Nov 21, 2014
by
Brian Tiger Chow
Committed by
Jeromy
Dec 05, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs(bitswap/notifications)
License: MIT Signed-off-by:
Brian Tiger Chow
<
brian@perfmode.com
>
parent
a2a4327b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
notifications/notifications.go
notifications/notifications.go
+3
-3
No files found.
notifications/notifications.go
View file @
a6371b4b
...
...
@@ -29,9 +29,9 @@ func (ps *impl) Publish(block *blocks.Block) {
ps
.
wrapped
.
Pub
(
block
,
topic
)
}
// Subscribe returns a
one-time use |blockChannel
|. |blockChannel|
returns nil
// if the |ctx| times out or is cancelled
. Then channel is closed after the
// blocks
given by |keys| are sent
.
// Subscribe returns a
channel of blocks for the given |keys
|. |blockChannel|
//
is closed
if the |ctx| times out or is cancelled
, or after sending len(keys)
// blocks.
func
(
ps
*
impl
)
Subscribe
(
ctx
context
.
Context
,
keys
...
u
.
Key
)
<-
chan
*
blocks
.
Block
{
topics
:=
make
([]
string
,
0
)
for
_
,
key
:=
range
keys
{
...
...
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