Documentation
¶
Index ¶
- type Cache
- func (c *Cache) AdjustRA(readahead int64)
- func (c *Cache) Close() error
- func (c *Cache) CloseReader(r *Reader)
- func (c *Cache) GetCapacity() int64
- func (c *Cache) GetState() *state.CacheState
- func (c *Cache) GetUseReaders() int
- func (c *Cache) Init(info *metainfo.Info, hash metainfo.Hash)
- func (c *Cache) NewReader(file *torrent.File) *Reader
- func (c *Cache) Piece(m metainfo.Piece) storage.PieceImpl
- func (c *Cache) Readers() int
- func (c *Cache) SetTorrent(torr *torrent.Torrent)
- type DiskPiece
- type MemPiece
- type Piece
- type PieceFake
- type Range
- type Reader
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct { storage.TorrentImpl // contains filtered or unexported fields }
func (*Cache) CloseReader ¶
func (*Cache) GetCapacity ¶
func (*Cache) GetState ¶
func (c *Cache) GetState() *state.CacheState
func (*Cache) GetUseReaders ¶
func (*Cache) SetTorrent ¶
type DiskPiece ¶
type DiskPiece struct {
// contains filtered or unexported fields
}
func NewDiskPiece ¶
type MemPiece ¶
type MemPiece struct {
// contains filtered or unexported fields
}
func NewMemPiece ¶
type Piece ¶
type Piece struct { storage.PieceImpl `json:"-"` Id int `json:"-"` Size int64 `json:"size"` Complete bool `json:"complete"` Accessed int64 `json:"accessed"` // contains filtered or unexported fields }
func (*Piece) Completion ¶
func (p *Piece) Completion() storage.Completion
func (*Piece) MarkComplete ¶
func (*Piece) MarkNotComplete ¶
type PieceFake ¶
type PieceFake struct{}
func (PieceFake) Completion ¶
func (PieceFake) Completion() storage.Completion
func (PieceFake) MarkComplete ¶
func (PieceFake) MarkNotComplete ¶
type Reader ¶
func (*Reader) SetReadahead ¶
Click to show internal directories.
Click to hide internal directories.