提交 18d5999e 作者: Łukasz Magiera 提交者: Steven Allen

coreapi pubsub: fix review nits

License: MIT
Signed-off-by: 's avatarŁukasz Magiera <magik6k@gmail.com>
上级 d6aa9527
...@@ -88,6 +88,9 @@ This command outputs data in the following encodings: ...@@ -88,6 +88,9 @@ This command outputs data in the following encodings:
discover, _ := req.Options[pubsubDiscoverOptionName].(bool) discover, _ := req.Options[pubsubDiscoverOptionName].(bool)
sub, err := api.PubSub().Subscribe(req.Context, topic, options.PubSub.Discover(discover)) sub, err := api.PubSub().Subscribe(req.Context, topic, options.PubSub.Discover(discover))
if err != nil {
return err
}
defer sub.Close() defer sub.Close()
if f, ok := res.(http.Flusher); ok { if f, ok := res.(http.Flusher); ok {
......
...@@ -38,7 +38,6 @@ type PubSubAPI interface { ...@@ -38,7 +38,6 @@ type PubSubAPI interface {
Ls(context.Context) ([]string, error) Ls(context.Context) ([]string, error)
// Peers list peers we are currently pubsubbing with // Peers list peers we are currently pubsubbing with
// TODO: WithTopic
Peers(context.Context, ...options.PubSubPeersOption) ([]peer.ID, error) Peers(context.Context, ...options.PubSubPeersOption) ([]peer.ID, error)
// Publish a message to a given pubsub topic // Publish a message to a given pubsub topic
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论