6 "github.com/anacrolix/torrent/metainfo"
9 type ClientImplCloser interface {
14 // Represents data storage for an unspecified torrent.
15 type ClientImpl interface {
16 OpenTorrent(info *metainfo.Info, infoHash metainfo.Hash) (TorrentImpl, error)
19 // Data storage bound to a torrent.
20 type TorrentImpl interface {
21 Piece(metainfo.Piece) PieceImpl
25 // Interacts with torrent piece data. Optional interfaces to implement include io.WriterTo, such as
26 // when a piece supports a more efficient way to write out incomplete chunks
27 type PieceImpl interface {
28 // These interfaces are not as strict as normally required. They can
29 // assume that the parameters are appropriate for the dimensions of the
33 // Called when the client believes the piece data will pass a hash check.
34 // The storage can move or mark the piece data as read-only as it sees
37 MarkNotComplete() error
38 // Returns true if the piece is complete.
39 Completion() Completion
42 type Completion struct {