seekinghttp: github.com/jeffallen/seekinghttp Index | Files

package seekinghttp

import "github.com/jeffallen/seekinghttp"

Index

Package Files

seekinghttp.go

type SeekingHTTP Uses

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 Uses

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) Read Uses

func (s *SeekingHTTP) Read(buf []byte) (int, error)

func (*SeekingHTTP) ReadAt Uses

func (s *SeekingHTTP) ReadAt(buf []byte, off int64) (int, error)

ReadAt reads len(buf) bytes into buf starting at offset off.

func (*SeekingHTTP) Seek Uses

func (s *SeekingHTTP) Seek(offset int64, whence int) (int64, error)

Seek sets the offset for the next Read.

func (*SeekingHTTP) Size Uses

func (s *SeekingHTTP) Size() (int64, error)

Size uses an HTTP HEAD to find out how many bytes are available in total.

Package seekinghttp imports 8 packages (graph). Updated 2017-12-14. Refresh now. Tools for package owners.