Skip to content
This repository was archived by the owner on Feb 7, 2020. It is now read-only.

Commit 1170dd4

Browse files
authored
Merge pull request #11 from ripienaar/10
(#10) Support latest choria NewRequestID() API
2 parents d46c4b2 + 0812a6c commit 1170dd4

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

glide.lock

Lines changed: 9 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

viewer.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ func View(ctx context.Context, opt *ViewOptions) error {
4949
func WriteEvents(ctx context.Context, opt *ViewOptions) error {
5050
events := make(chan *choria.ConnectorMessage, 100)
5151

52-
err := opt.Connector.QueueSubscribe(ctx, opt.Choria.NewRequestID(), "choria.lifecycle.event.>", "", events)
52+
rid, err := opt.Choria.NewRequestID()
53+
if err != nil {
54+
return err
55+
}
56+
57+
err = opt.Connector.QueueSubscribe(ctx, rid, "choria.lifecycle.event.>", "", events)
5358
if err != nil {
5459
return fmt.Errorf("could not subscribe to event source: %s", err)
5560
}

0 commit comments

Comments
 (0)