refactor and to go mod

This commit is contained in:
YouROK
2021-02-18 16:56:55 +03:00
parent 0e49a98626
commit 94f212fa75
50 changed files with 13 additions and 29 deletions

View File

@@ -0,0 +1,29 @@
package state
import (
"server/torr/state"
)
type CacheState struct {
Hash string
Capacity int64
Filled int64
PiecesLength int64
PiecesCount int
Torrent *state.TorrentStatus
Pieces map[int]ItemState
Readers []*ReaderState
}
type ItemState struct {
Id int
Length int64
Size int64
Completed bool
}
type ReaderState struct {
Start int
End int
Reader int
}