possumTorrentStorage

package
v1.54.10 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChunkReader

type ChunkReader interface {
	io.ReaderAt
	io.Closer
}

type Provider

type Provider struct {
	possumResource.Provider
	// Deprecated: Use Slogger.
	Logger  log.Logger
	Slogger *slog.Logger
}

Extends possum resource.Provider with an efficient implementation of torrent storage.ConsecutiveChunkReader. TODO: This doesn't expose Capacity.

func (Provider) ChunksReader

func (p Provider) ChunksReader(dir string) (ret storage.PieceReader, err error)

TODO: Should the parent ReadConsecutiveChunks method take the expected number of bytes to avoid trying to read discontinuous or incomplete sequences of chunks?

func (Provider) MovePrefix

func (pp Provider) MovePrefix(from, to string) (err error)

func (Provider) ReadConsecutiveChunks

func (p Provider) ReadConsecutiveChunks(prefix string) (rc io.ReadCloser, err error)

TODO: Should the parent ReadConsecutiveChunks method take the expected number of bytes to avoid trying to read discontinuous or incomplete sequences of chunks?

Jump to

Keyboard shortcuts

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