Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AnnounceURL = "/announce"
AnnounceURL The announce path for the http calls to reach.
View Source
var FIELDS = []string{"port", "uploaded", "downloaded", "left", "event", "compact"}
TODO(ian): Set this expireTime to a config-loaded value. expireTime := 5 * 60 FIELDS The fields that we expect from a peer upon info hash lookup
Functions ¶
func CompactAllPeers ¶
CompactAllPeers Comapcts all of the peers according to BEP 23
func EncodeResponse ¶
EncodeResponse groups all of the peer-requested data into a nice bencoded string that we respond with.
func RunServer ¶
func RunServer(rssNotifier *rss.RSSNotifier)
RunServer spins up the server and muxes the routes.
Types ¶
type AnnounceResponse ¶
type AnnounceResponse struct {
// contains filtered or unexported fields
}
AnnounceResponse models the response sent to peers
type AnnounceResponseFailure ¶
type AnnounceResponseFailure struct {
// contains filtered or unexported fields
}
AnnounceResponseFailure Models the failure response sent on tracker failures.
type TorrentResponseData ¶
type TorrentResponseData struct {
// contains filtered or unexported fields
}
TorrentResponseData models what is sent back to the peer upon a succesful info hash lookup.
Click to show internal directories.
Click to hide internal directories.