Documentation
¶
Index ¶
- func NewDefaultTorrentClient() (ret *torrent.Client, err error)
- func ServeFile(w http.ResponseWriter, r *http.Request, t *torrent.Torrent, _path string)
- func ServeTorrent(w http.ResponseWriter, r *http.Request, t *torrent.Torrent)
- func ServeTorrentReader(w http.ResponseWriter, r *http.Request, tr torrent.Reader, name string)
- type Event
- type Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultTorrentClient ¶
func ServeTorrent ¶ added in v1.3.0
func ServeTorrentReader ¶ added in v1.3.0
Types ¶
type Handler ¶
type Handler struct { TC *torrent.Client TorrentGrace time.Duration OnTorrentGrace func(t *torrent.Torrent) MetainfoCacheDir *string // Called as soon as a new torrent is added, with the cached metainfo if it's found. OnNewTorrent func(newTorrent *torrent.Torrent, cachedMetainfo *metainfo.MetaInfo) // contains filtered or unexported fields }
func (*Handler) GetTorrent ¶ added in v1.3.0
func (*Handler) PutMetainfo ¶ added in v1.3.0
We require the Torrent to be given to ensure we don't infer a torrent from the MetaInfo without any release semantics.
Click to show internal directories.
Click to hide internal directories.