Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SeekingHTTP ¶
type SeekingHTTP struct { URL string Client *http.Client Debug bool // contains filtered or unexported fields }
SeekingHTTP uses a series of HTTP GETs with Range headers to implement io.ReadSeeker and io.ReaderAt.
func New ¶
func New(url string) *SeekingHTTP
New initializes a SeekingHTTP for the given URL. The SeekingHTTP.Client field may be set before the first call to Read or Seek.
func (*SeekingHTTP) ReadAt ¶
func (s *SeekingHTTP) ReadAt(buf []byte, off int64) (int, error)
ReadAt reads len(buf) bytes into buf starting at offset off.
func (*SeekingHTTP) Seek ¶
func (s *SeekingHTTP) Seek(offset int64, whence int) (int64, error)
Seek sets the offset for the next Read.
func (*SeekingHTTP) Size ¶
func (s *SeekingHTTP) Size() (int64, error)
Size uses an HTTP HEAD to find out how many bytes are available in total.
Click to show internal directories.
Click to hide internal directories.