Documentation ¶
Overview ¶
package types contains types that are used by the request strategy and the torrent package and need to be shared between them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PieceIndex ¶
type PieceIndex = int
type PiecePriority ¶
type PiecePriority byte
Describes the importance of obtaining a particular piece.
const ( PiecePriorityNone PiecePriority = iota // Not wanted. Must be the zero value. PiecePriorityNormal // Wanted. PiecePriorityHigh // Wanted a lot. PiecePriorityReadahead // May be required soon. // Deprecated. Succeeds a piece where a read occurred. This used to prioritize the earlier // pieces in the readahead window. The request strategy now does this, so it's no longer needed. // There is downstream code that still assumes it's in use. PiecePriorityNext PiecePriorityNow // A Reader is reading in this piece. Highest urgency. )
func (*PiecePriority) Raise ¶
func (pp *PiecePriority) Raise(maybe PiecePriority) bool
Click to show internal directories.
Click to hide internal directories.