uplink/app/streams/streamreader.go

14 lines
142 B
Go
Raw Normal View History

2018-04-10 14:34:30 +00:00
package streams
import (
"io"
)
func NewStreamReader(stream *Stream) io.ReadCloser {
r, w := io.Pipe()
stream.Subscribe(w)
return r
}