client: Implement Events() #66

farcaller opened this Issue Jan 29, 2014 · 6 comments


4 participants

Events(since uint64) should return a channel (or take a channel and send data to it?) that will get /events updates. It must also gracefully handle network interruptions (reconnect with last good time value).


jhulten commented Feb 19, 2014


Taking a channel allows the caller to specify it is done by closing the channel. Thoughts @fsouza?

I am willing to take a swing at this.


fsouza commented Feb 19, 2014

@jhulten the reader should never close the channel.

I imagine that Events(since uint64) could create a goroutine and write the output to a channel that it returns. Something like:

ch := make(chan type, size)
go func() {
  for _, event := range events {
     ch <- event
return ch

What do you think?


jhulten commented Feb 20, 2014

I put a stake in the ground with #71. I will look at changing it to return a channel tomorrow.


fsouza commented Feb 20, 2014

Thank you, I will have a look within the next hours :)


destari commented May 3, 2014

Should this be closed now?


fsouza commented May 3, 2014

Sure. Thanks!

fsouza closed this May 3, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment