-
Notifications
You must be signed in to change notification settings - Fork 0
/
State.go
57 lines (45 loc) · 937 Bytes
/
State.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package torr
import (
"github.com/anacrolix/dht"
)
type BTState struct {
LocalPort int
PeerID string
BannedIPs int
DHTs []*dht.Server
Torrents []*Torrent
}
type TorrentStats struct {
Name string
Hash string
TorrentStatus TorrentStatus
TorrentStatusString string
LoadedSize int64
TorrentSize int64
PreloadedBytes int64
PreloadSize int64
DownloadSpeed float64
UploadSpeed float64
TotalPeers int
PendingPeers int
ActivePeers int
ConnectedSeeders int
HalfOpenPeers int
BytesWritten int64
BytesWrittenData int64
BytesRead int64
BytesReadData int64
BytesReadUsefulData int64
ChunksWritten int64
ChunksRead int64
ChunksReadUseful int64
ChunksReadWasted int64
PiecesDirtiedGood int64
PiecesDirtiedBad int64
FileStats []TorrentFileStat
}
type TorrentFileStat struct {
Id int
Path string
Length int64
}