Versions in this module Expand all Collapse all v1 v1.41.2 Mar 27, 2022 Changes in this version + func GetRequestablePieces(input Input, pro *PieceRequestOrder, f func(ih metainfo.Hash, pieceIndex int)) + func NewAjwernerBtree() *ajwernerBtree + func NewTidwallBtree() *tidwallBtree + type Btree interface + Add func(pieceRequestOrderItem) + Delete func(pieceRequestOrderItem) + Scan func(func(pieceRequestOrderItem) bool) + type ChunkIndex = uint32 + type ChunkSpec = types.ChunkSpec + type ChunksIter interface + Iter func(func(ci ChunkIndex)) + type ChunksIterFunc func(func(ChunkIndex)) + type Input interface + Capacity func() (cap int64, capped bool) + MaxUnverifiedBytes func() int64 + Torrent func(metainfo.Hash) Torrent + type PeerRequestState struct + Cancelled roaring.Bitmap + Interested bool + Requests roaring.Bitmap + type Piece interface + NumPendingChunks func() int + Request func() bool + type PieceRequestOrder struct + func NewPieceOrder(btree Btree, cap int) *PieceRequestOrder + func (me *PieceRequestOrder) Add(key PieceRequestOrderKey, state PieceRequestOrderState) + func (me *PieceRequestOrder) Delete(key PieceRequestOrderKey) + func (me *PieceRequestOrder) Len() int + func (me *PieceRequestOrder) Update(key PieceRequestOrderKey, state PieceRequestOrderState) + type PieceRequestOrderKey struct + Index int + InfoHash metainfo.Hash + type PieceRequestOrderPathHint = btree.PathHint + type PieceRequestOrderState struct + Availability int + Partial bool + Priority piecePriority + type Request = types.Request + type RequestIndex = uint32 + type Torrent interface + ChunksPerPiece func() uint32 + Piece func(int) Piece + PieceLength func() int64