snormore/gosky — pull request #1 by mkobetic (2013-12-10 20:28:42+00:00)
Title: Direct event streaming

1. adds table agnostic event streaming to match the same server side capability Client.Stream()
2. modifies the original event streaming API to remove the need to pass a closure to the Stream() call

To achieve 2) it bypasses http.Client and manually rolls a chunked HTTP request. The API then changes to
1. call Stream() to create an EventStream
2. call EventStream.AddEvent() as many times as you want
3. call EventStream.Close() to close the stream

There's also EventStream.Reconnect() to facilitiate retries

I'm inclined further tweak the chunking support so that a chunk is not sent on every event, but when the bufio.Writer fills up and flushes. Simple Writer under the bufio.Writer should do, I think.

@snormore, @benbjohson

/cc @Shopify/reports