storage

package
v0.0.0-...-1f87aaf Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DownloadDir    string
	PieceQueueSize int
	DiskQueueSize  int
}

func WithDefaultConfig

func WithDefaultConfig() *Config

type Store

type Store struct {
	PieceQueue chan *scheduler.BlockData

	PieceResultQueue chan *scheduler.PieceResult
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage(metainfo *meta.Metainfo, cfg *Config, log *slog.Logger) (*Store, error)

func (*Store) Run

func (s *Store) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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