uplink/app/streams/streamreader.go

14 lines
142 B
Go

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