]> Sergey Matveev's repositories - btrtrc.git/blobdiff - storage/interface.go
Merge branch 'request-strategy-rewrite'
[btrtrc.git] / storage / interface.go
index 584338cb4ae178d30ab1c04ee138981cb41f7071..a52ee6dca1cbc05e42033c164b56ca34515b28c2 100644 (file)
@@ -17,9 +17,11 @@ type ClientImpl interface {
 }
 
 // Data storage bound to a torrent.
-type TorrentImpl interface {
-       Piece(metainfo.Piece) PieceImpl
-       Close() error
+type TorrentImpl struct {
+       Piece func(p metainfo.Piece) PieceImpl
+       Close func() error
+       // Storages that share the same value, will provide a pointer to the same function.
+       Capacity *func() *int64
 }
 
 // Interacts with torrent piece data. Optional interfaces to implement include: