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)
15 // Data storage bound to a torrent.
16 type TorrentImpl interface {
17 Piece(metainfo.Piece) PieceImpl
21 // Interacts with torrent piece data.
22 type PieceImpl interface {
23 // These interfaces are not as strict as normally required. They can
24 // assume that the parameters are appropriate for the dimensions of the
28 // Called when the client believes the piece data will pass a hash check.
29 // The storage can move or mark the piece data as read-only as it sees
32 MarkNotComplete() error
33 // Returns true if the piece is complete.