httptracker

package
v1.12.15 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPTracker

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

HTTPTracker is a torrent tracker that talks HTTP.

func New

func New(rawURL string, u *url.URL, timeout time.Duration, t *http.Transport, userAgent string, maxResponseLength int64) *HTTPTracker

New returns a new HTTPTracker.

func (*HTTPTracker) Announce

Announce the torrent by doing a GET request to the tracker.

func (*HTTPTracker) URL

func (t *HTTPTracker) URL() string

URL returns the URL string of the tracker.

type StatusError added in v0.9.0

type StatusError struct {
	Code   int
	Header http.Header
	Body   string
}

StatusError is returned from HTTP tracker announces when the response code is not 200 OK.

func (*StatusError) Error added in v0.9.0

func (e *StatusError) Error() string

Jump to

Keyboard shortcuts

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