Embed io.Reader in DataStream (#127)

This allows callers to use DataStream as an io.Reader without the need to call ToReader()
This commit is contained in:
Vaibhav Kamra 2022-06-03 14:45:48 -07:00 committed by GitHub
parent b29cedfb34
commit 936350b7b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,10 +11,9 @@ type DataCollection interface {
}
// DataStream represents a single item within a DataCollection
// that can be consumed as a stream
// that can be consumed as a stream (it embeds io.Reader)
type DataStream interface {
// ToReader returns a reader for the data stream
ToReader() io.Reader
io.Reader
// Provides a unique identifier for this data
UUID() string
}