Documentation ¶
Index ¶
- func NewStorage(capacity int64) storage.Storage
- type BufferPool
- type Cache
- type Piece
- func (p *Piece) Completion() storage.Completion
- func (p *Piece) MarkComplete() error
- func (p *Piece) MarkNotComplete() error
- func (p *Piece) ReadAt(b []byte, off int64) (n int, err error)
- func (p *Piece) Release()
- func (p *Piece) Stat() state.ItemState
- func (p *Piece) WriteAt(b []byte, off int64) (n int, err error)
- type Reader
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStorage ¶
Types ¶
type BufferPool ¶
type BufferPool struct {
// contains filtered or unexported fields
}
func NewBufferPool ¶
func NewBufferPool(bufferLength int64) *BufferPool
func (*BufferPool) Len ¶
func (b *BufferPool) Len() int
func (*BufferPool) ReleaseBuffer ¶
func (b *BufferPool) ReleaseBuffer(index int)
func (*BufferPool) Used ¶
func (b *BufferPool) Used() map[int]struct{}
type Cache ¶
type Cache struct { storage.TorrentImpl // contains filtered or unexported fields }
func (*Cache) GetState ¶
func (c *Cache) GetState() state.CacheState
type Piece ¶
type Piece struct { storage.PieceImpl Id int Hash string Length int64 Size int64 // contains filtered or unexported fields }
func (*Piece) Completion ¶
func (p *Piece) Completion() storage.Completion
func (*Piece) MarkComplete ¶
func (*Piece) MarkNotComplete ¶
type Storage ¶
func (*Storage) OpenTorrent ¶
Click to show internal directories.
Click to hide internal directories.