Documentation
¶
Index ¶
- type HttpClient
- type Logger
- type SeekingHTTP
- func (s *SeekingHTTP) Close() error
- func (s *SeekingHTTP) Read(buf []byte) (int, error)
- func (s *SeekingHTTP) ReadAt(buf []byte, off int64) (n int, err error)
- func (s *SeekingHTTP) Seek(offset int64, whence int) (int64, error)
- func (s *SeekingHTTP) SetLogger(logger Logger)
- func (s *SeekingHTTP) Size() (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SeekingHTTP ¶
type SeekingHTTP struct { URL string Client HttpClient Logger Logger // 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) Close ¶
func (s *SeekingHTTP) Close() error
func (*SeekingHTTP) ReadAt ¶
func (s *SeekingHTTP) ReadAt(buf []byte, off int64) (n int, err 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) SetLogger ¶
func (s *SeekingHTTP) SetLogger(logger Logger)
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.