Documentation ¶
Index ¶
- func CreateNativeZeroLengthFiles(info *metainfo.Info, dir string) (err error)
- func NewFile(baseDir string) storage.ClientImpl
- func NewFileByInfoHash(baseDir string) storage.ClientImpl
- func NewFileWithCompletion(baseDir string, completion PieceCompletion) storage.ClientImpl
- func NewFileWithCustomPathMaker(baseDir string, ...) storage.ClientImpl
- type PieceCompletion
- type PieceCompletionGetSetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNativeZeroLengthFiles ¶
Creates natives files for any zero-length file entries in the info. This is a helper for file-based storages, which don't address or write to zero- length files because they have no corresponding pieces.
func NewFile ¶
func NewFile(baseDir string) storage.ClientImpl
All Torrent data stored in this baseDir
func NewFileByInfoHash ¶
func NewFileByInfoHash(baseDir string) storage.ClientImpl
File storage with data partitioned by infohash.
func NewFileWithCompletion ¶
func NewFileWithCompletion(baseDir string, completion PieceCompletion) storage.ClientImpl
Types ¶
type PieceCompletion ¶
type PieceCompletion interface { PieceCompletionGetSetter Close() error }
Implementations track the completion of pieces. It must be concurrent-safe.
func NewBoltPieceCompletion ¶
func NewBoltPieceCompletion(dir string) (ret PieceCompletion, err error)
func NewMapPieceCompletion ¶
func NewMapPieceCompletion() PieceCompletion
Click to show internal directories.
Click to hide internal directories.