Yup, definitely makes more sense to me too.


On Tue, Dec 10, 2013 at 3:41 PM, Ben Johnson <notifications@github.com>wrote:

> In event_stream.go:
>
> > -	s.reader, s.writer = io.Pipe()
> > -	s.encoder = json.NewEncoder(s.writer)
> > -	return s
> > +func NewEventStream(c Client, table Table) (*EventStream, error) {
> > +	header := fmt.Sprintf("PATCH /tables/%s/events HTTP/1.0\r\nHost: %s\r\nContent-Type: application/json\r\nTransfer-Encoding: chunked\r\n\r\n", table.Name(), c.GetHost())
> > +	return newStream(c, []byte(header))
> > +}
> > +
> > +func NewTableEventStream(c Client) (*EventStream, error) {
> > +	header := fmt.Sprintf("PATCH /events HTTP/1.0\r\nHost: %s\r\nContent-Type: application/json\r\nTransfer-Encoding: chunked\r\n\r\n", c.GetHost())
> > +	return newStream(c, []byte(header))
> > +}
> > +
> > +func newStream(c Client, header []byte) (*EventStream, error) {
> > +	s := &EventStream{client: c, header: header}
> > +	return s, s.Reconnect()
> >  }
>
> @mkobetic <https://github.com/mkobetic> Can you swap the names of
> NewEventStream and NewTableEventStream? To me, EventStream would be more
> general (i.e. table-less) and TableEventStream would be more specific
> (i.e. pointing at a specific table).
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/snormore/gosky/pull/1/files#r8246540>
> .
>