Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnnounceReq ¶
type AnnounceResp ¶
type HTTPTrackerURL ¶
type HTTPTrackerURL struct {
// contains filtered or unexported fields
}
func (*HTTPTrackerURL) Announce ¶
func (t *HTTPTrackerURL) Announce(ctx context.Context, r AnnounceReq) (*AnnounceResp, error)
func (*HTTPTrackerURL) Scrape ¶
func (t *HTTPTrackerURL) Scrape(ctx context.Context, infos ...[20]byte) (*ScrapeResp, error)
type Peer ¶
type ScrapeResp ¶
type ScrapeResp struct {
Torrents map[string]TorrentInfo
}
type TorrentInfo ¶
type TrackerURL ¶
type TrackerURL interface { Announce(context.Context, AnnounceReq) (*AnnounceResp, error) Scrape(context.Context, ...[20]byte) (*ScrapeResp, error) }
func NewTrackerURL ¶
func NewTrackerURL(tURL string) (TrackerURL, error)
type UDPTrackerURL ¶
type UDPTrackerURL struct {
// contains filtered or unexported fields
}
func (*UDPTrackerURL) Announce ¶
func (t *UDPTrackerURL) Announce(ctx context.Context, r AnnounceReq) (*AnnounceResp, error)
func (*UDPTrackerURL) Scrape ¶
func (t *UDPTrackerURL) Scrape(ctx context.Context, ihashes ...[20]byte) (*ScrapeResp, error)
Click to show internal directories.
Click to hide internal directories.