-
Notifications
You must be signed in to change notification settings - Fork 40
/
session_stats.go
28 lines (26 loc) · 1.06 KB
/
session_stats.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
package transmission
type (
// SessionStatsCmd is the root command to interact with Transmission via RPC
SessionStatsCmd struct {
SessionStats `json:"arguments"`
Result string `json:"result"`
}
// SessionStats contains information about the current & cumulative session
SessionStats struct {
DownloadSpeed int64 `json:"downloadSpeed"`
UploadSpeed int64 `json:"uploadSpeed"`
ActiveTorrentCount int `json:"activeTorrentCount"`
PausedTorrentCount int `json:"pausedTorrentCount"`
TorrentCount int `json:"torrentCount"`
CumulativeStats SessionStateStats `json:"cumulative-stats"`
CurrentStats SessionStateStats `json:"current-stats"`
}
// SessionStateStats contains current or cumulative session stats
SessionStateStats struct {
DownloadedBytes int64 `json:"downloadedBytes"`
UploadedBytes int64 `json:"uploadedBytes"`
FilesAdded int64 `json:"filesAdded"`
SecondsActive int64 `json:"secondsActive"`
SessionCount int64 `json:"sessionCount"`
}
)