Commit a6371b4b authored by Brian Tiger Chow's avatar Brian Tiger Chow Committed by Jeromy

docs(bitswap/notifications)

License: MIT
Signed-off-by: default avatarBrian Tiger Chow <brian@perfmode.com>
parent a2a4327b
...@@ -29,9 +29,9 @@ func (ps *impl) Publish(block *blocks.Block) { ...@@ -29,9 +29,9 @@ func (ps *impl) Publish(block *blocks.Block) {
ps.wrapped.Pub(block, topic) ps.wrapped.Pub(block, topic)
} }
// Subscribe returns a one-time use |blockChannel|. |blockChannel| returns nil // Subscribe returns a channel of blocks for the given |keys|. |blockChannel|
// if the |ctx| times out or is cancelled. Then channel is closed after the // is closed if the |ctx| times out or is cancelled, or after sending len(keys)
// blocks given by |keys| are sent. // blocks.
func (ps *impl) Subscribe(ctx context.Context, keys ...u.Key) <-chan *blocks.Block { func (ps *impl) Subscribe(ctx context.Context, keys ...u.Key) <-chan *blocks.Block {
topics := make([]string, 0) topics := make([]string, 0)
for _, key := range keys { for _, key := range keys {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment