Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTooFast = errors.New("making requests too fast")
Functions ¶
func EscapePath ¶ added in v1.42.0
Escapes path name components suitable for appending to a webseed URL. This works for converting S3 object keys to URLs too.
Contrary to the name, this actually does a QueryEscape, rather than a PathEscape. This works better with most S3 providers.
Types ¶
type Client ¶
type Client struct { HttpClient *http.Client Url string // The pieces we can request with the Url. We're more likely to ban/block at the file-level // given that's how requests are mapped to webseeds, but the torrent.Client works at the piece // level. We can map our file-level adjustments to the pieces here. This probably need to be // private in the future, if Client ever starts removing pieces. Pieces roaring.Bitmap ResponseBodyWrapper ResponseBodyWrapper PathEscaper PathEscaper // contains filtered or unexported fields }
func (*Client) NewRequest ¶
func (ws *Client) NewRequest(r RequestSpec) Request
type ErrBadResponse ¶ added in v1.25.1
func (ErrBadResponse) Error ¶ added in v1.25.1
func (me ErrBadResponse) Error() string
type PathEscaper ¶ added in v1.43.0
type Request ¶
type Request struct { Result chan RequestResult // contains filtered or unexported fields }
type RequestResult ¶
type RequestSpec ¶
Click to show internal directories.
Click to hide internal directories.