Documentation ¶
Overview ¶
Package stream provides support to convert a URL into an io.ReadSeeker.
Streamers should be registered via RegisterStreamer() in order to use them with URLToStream()
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterStreamer ¶
func RegisterStreamer(s Streamer)
RegisterStreamer adds the Streamer to the list of Streamer handlers used by URLToStream method
func URLToStream ¶
URLToStream converts a URL into an io.ReadSeeker returns: the io.ReadSeeker the length of the stream in bytes checksum of the file pointed to by path error if any
Types ¶
type Streamer ¶
type Streamer interface { // Returns true if this streamer can create a stream from the url CanStream(url string) bool // Opens a stream to the contents of url // Returns: // io.ReadSeeker - data at url // Length of the stream in bytes // checksum of the file pointed to by path // error if any CreateStream(url string) (io.ReadSeeker, int64, string, error) }
Streamer is the interface implemented by an object that can create an io.ReadSeeker from a remote or local URL
Directories ¶
Path | Synopsis |
---|---|
Package local contains an implementation of streamer for the local file system
|
Package local contains an implementation of streamer for the local file system |
Package s3 provides a streamer implementation for AWS S3.
|
Package s3 provides a streamer implementation for AWS S3. |
Click to show internal directories.
Click to hide internal directories.