func (s *Stream) NewReader() (io.Reader, error) {
	r, err := s.Open()
	if err != nil {
		return nil, err
	}
	return &streamReader{
		stream: s,
		reader: r,
	}, nil
}
NewReader returns a new reader for the stream. May be called multiple times
and each reader may read from the stream concurrently
package stream
import (
	"errors"
	"io"
	"sync"
)
func New(source Source) *Stream {
	return &Stream{
		Source: source,
		writer: source,
		cond:   sync.NewCond(new(sync.Mutex)),
		closed: false,
	}
}
type Source interface {
	io.Writer
	Open() (io.Reader, error)
}
type Stream struct {
	Source
	writer io.Writer
	cond   *sync.Cond
	closed bool
}
type streamReader struct {
	stream *Stream
	reader io.Reader
}