tracker

package
v0.0.0-...-28f24a1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnounceCompactResult

type AnnounceCompactResult struct {
	Interval      uint32 `bencode:"interval"`   // 请求时间间隔
	SeederCount   uint64 `bencode:"complete"`   // 当前做种数量
	SnatcherCount uint64 `bencode:"downloaded"` // 已完成下载总数
	LeecherCount  uint64 `bencode:"incomplete"` // 正在下载数量
	Peers         string `bencode:"peers"`      // IPv4 同伴
	Peers6        string `bencode:"peers6"`     // IPv6 同伴
}

type AnnounceResponse

type AnnounceResponse struct {
}

func (AnnounceResponse) BEncode

func (s AnnounceResponse) BEncode(torrent *model.Torrent, modelSlice interface{}, req *trackerReq.AnnounceRequest) string

func (AnnounceResponse) Paginate

func (s AnnounceResponse) Paginate(_ interface{}) interface{}

func (AnnounceResponse) Serialize

func (s AnnounceResponse) Serialize(_ interface{}) interface{}

type AnnounceResult

type AnnounceResult struct {
	Interval      uint32      `bencode:"interval"`   // 请求时间间隔
	SeederCount   uint64      `bencode:"complete"`   // 当前做种数量
	SnatcherCount uint64      `bencode:"downloaded"` // 已完成下载总数
	LeecherCount  uint64      `bencode:"incomplete"` // 正在下载数量
	Peers         []*PeerItem `bencode:"peers"`      // 同伴
}

type PeerItem

type PeerItem struct {
	IP     string `bencode:"ip"`
	Port   uint32 `bencode:"port"`
	PeerID string `bencode:"peer id,omitempty"`
}

type ScrapeItem

type ScrapeItem struct {
	SeederCount   uint64 `bencode:"complete"`   // 当前做种数量
	SnatcherCount uint64 `bencode:"downloaded"` // 已完成下载总数
	LeecherCount  uint64 `bencode:"incomplete"` // 正在下载数量
}

type ScrapeResponse

type ScrapeResponse struct {
}

func (ScrapeResponse) BEncode

func (s ScrapeResponse) BEncode(modelSlice interface{}) string

func (ScrapeResponse) Paginate

func (s ScrapeResponse) Paginate(modelSlice interface{}) interface{}

func (ScrapeResponse) Serialize

func (s ScrapeResponse) Serialize(singleModel interface{}) interface{}

type ScrapeResult

type ScrapeResult struct {
	Files map[string]*ScrapeItem `bencode:"files"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL