Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnnounceAddr ¶
type AnnounceHandler ¶
type AnnounceHandler struct { AnnounceTracker AnnounceTracker UpstreamTrackers []Client UpstreamTrackerUrls []string UpstreamAnnouncePeerId [20]byte UpstreamAnnounceGate UpstreamAnnounceGater // contains filtered or unexported fields }
func (*AnnounceHandler) Serve ¶
func (me *AnnounceHandler) Serve( ctx context.Context, req AnnounceRequest, addr AnnounceAddr, opts GetPeersOpts, ) (ret ServerAnnounceResult)
type AnnounceRequest ¶
type AnnounceRequest = tracker.AnnounceRequest
type AnnounceTracker ¶
type AnnounceTracker interface { TrackAnnounce(ctx context.Context, req udp.AnnounceRequest, addr AnnounceAddr) error Scrape(ctx context.Context, infoHashes []InfoHash) ([]udp.ScrapeInfohashResult, error) GetPeers( ctx context.Context, infoHash InfoHash, opts GetPeersOpts, remote AnnounceAddr, ) ServerAnnounceResult }
type GetPeersOpts ¶
This is reserved for stuff like filtering by IP version, avoiding an announcer's IP or key, limiting return count, etc.
type PeerInfo ¶
type PeerInfo struct {
AnnounceAddr
}
type ServerAnnounceResult ¶
Click to show internal directories.
Click to hide internal directories.