Documentation ¶
Index ¶
- Variables
- func GetOrCreatePeerID(p string) ([20]byte, error)
- func NewClient(st storage.ClientImpl, fis bep44.Store, cfg *config.TorrentGlobal, id [20]byte) (*torrent.Client, error)
- type ByName
- type DatabaseLoader
- type FileItemStore
- type GlobalTorrentStats
- type HTTPFS
- type PieceChunk
- type PieceStatus
- type RouteStats
- type Server
- type ServerInfo
- type ServerState
- type Service
- type Stats
- type TorrentStats
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTorrentNotFound = errors.New("torrent not found")
Functions ¶
func GetOrCreatePeerID ¶
Types ¶
type ByName ¶
type ByName []*RouteStats
type DatabaseLoader ¶
type FileItemStore ¶
type FileItemStore struct {
// contains filtered or unexported fields
}
func NewFileItemStore ¶
func NewFileItemStore(path string, itemsTTL time.Duration) (*FileItemStore, error)
func (*FileItemStore) Close ¶
func (fis *FileItemStore) Close() error
type GlobalTorrentStats ¶
type HTTPFS ¶
type HTTPFS struct {
// contains filtered or unexported fields
}
func NewHTTPFS ¶
func NewHTTPFS(fs dfs.Filesystem) *HTTPFS
type PieceChunk ¶
type PieceChunk struct { Status PieceStatus `json:"status"` NumPieces int `json:"numPieces"` }
type PieceStatus ¶
type PieceStatus string
const ( Checking PieceStatus = "H" Partial PieceStatus = "P" Complete PieceStatus = "C" Waiting PieceStatus = "W" Error PieceStatus = "?" )
type RouteStats ¶
type RouteStats struct { Name string `json:"name"` TorrentStats []*TorrentStats `json:"torrentStats"` }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) Info ¶
func (s *Server) Info() *ServerInfo
type ServerInfo ¶
type ServerState ¶
type ServerState int
const ( UNKNOWN ServerState = iota SEEDING READING UPDATING STOPPED ERROR )
func (ServerState) String ¶
func (ss ServerState) String() string
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) RemoveFromHash ¶
type Stats ¶
type Stats struct {
// contains filtered or unexported fields
}
func (*Stats) GlobalStats ¶
func (s *Stats) GlobalStats() *GlobalTorrentStats
func (*Stats) RoutesStats ¶
func (s *Stats) RoutesStats() []*RouteStats
type TorrentStats ¶
type TorrentStats struct { Name string `json:"name"` Hash string `json:"hash"` DownloadedBytes int64 `json:"downloadedBytes"` UploadedBytes int64 `json:"uploadedBytes"` Peers int `json:"peers"` Seeders int `json:"seeders"` TimePassed float64 `json:"timePassed"` PieceChunks []*PieceChunk `json:"pieceChunks"` TotalPieces int `json:"totalPieces"` PieceSize int64 `json:"pieceSize"` }
Click to show internal directories.
Click to hide internal directories.