scraper

package
v0.0.0-...-15cc3ae Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2015 License: BSD-3-Clause Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnimplemented = errors.New("unimplemented")
)

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Scrape(hashes []Hash) (map[Hash]Scrape, error)
	BatchSize() int
	String() string
}

type Hash

type Hash [20]byte

func HashFromSlice

func HashFromSlice(b []byte) (Hash, error)

func HashFromString

func HashFromString(s string) (Hash, error)

func (Hash) String

func (h Hash) String() string

type InternalError

type InternalError error

type Scrape

type Scrape struct {
	Incomplete int
	Complete   int
	Downloaded int
}

type Scraper

type Scraper struct {
	// contains filtered or unexported fields
}

func New

func New() Scraper

func (*Scraper) Run

func (s *Scraper) Run()

func (*Scraper) Scrape

func (s *Scraper) Scrape(tracker string, hash Hash) (*Scrape, error)

func (*Scraper) Stop

func (s *Scraper) Stop()

type TrackerError

type TrackerError error

type UnsupportedProtocolError

type UnsupportedProtocolError error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL