package streams import ( "io" ) func NewStreamReader(stream *Stream) io.ReadCloser { r, w := io.Pipe() stream.Subscribe(w) return r }