logic

package
v0.0.0-...-df66e35 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMissingPiece = errors.New("missing piece")
View Source
var ErrPeerChoked = errors.New("peer choked")
View Source
var ErrUnexpectedMessage = errors.New("unexpected message")

Functions

This section is empty.

Types

type Downloader

type Downloader interface {
	Download(metafile io.Reader, outputDir string) error
}

func NewDownloader

func NewDownloader(d decoder.MetafileDecoder, logger *slog.Logger) Downloader

type FilePosition

type FilePosition struct {
	Begin          int
	End            int
	ExpectedPieces int
}

type PeerMap

type PeerMap struct {
	AvailablePieces map[int][]*peerClient
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL