6 "github.com/anacrolix/torrent/metainfo"
9 // Represents data storage for an unspecified torrent.
10 type ClientImpl interface {
11 OpenTorrent(info *metainfo.Info, infoHash metainfo.Hash) (TorrentImpl, error)
14 // Data storage bound to a torrent.
15 type TorrentImpl interface {
16 Piece(metainfo.Piece) PieceImpl
20 // Interacts with torrent piece data.
21 type PieceImpl interface {
22 // These interfaces are not as strict as normally required. They can
23 // assume that the parameters are appropriate for the dimensions of the
27 // Called when the client believes the piece data will pass a hash check.
28 // The storage can move or mark the piece data as read-only as it sees
31 MarkNotComplete() error
32 // Returns true if the piece is complete.