engine

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadJob

type DownloadJob struct {
	Segment    nzb.Segment
	File       *nzb.DownloadFile
	Groups     []string
	Offset     int64
	RetryCount int
}

type DownloadResult

type DownloadResult struct {
	Job   DownloadJob
	Error error
}

type FileWriter

type FileWriter struct {
	// contains filtered or unexported fields
}

func NewFileWriter

func NewFileWriter() *FileWriter

func (*FileWriter) CloseAll

func (fw *FileWriter) CloseAll()

func (*FileWriter) CloseFile

func (fw *FileWriter) CloseFile(path string, finalSize int64) error

func (*FileWriter) PreAllocate

func (fw *FileWriter) PreAllocate(path string, size int64) error

func (*FileWriter) WriteAt

func (fw *FileWriter) WriteAt(path string, data []byte, offset int64) error

WriteAt finds the handle and performs a thread-safe write

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(ctx *app.Context, writer *FileWriter) *Service

func (*Service) Download

func (s *Service) Download(ctx context.Context, nzb *nzb.Model) error

type WriteRequest

type WriteRequest struct {
	FilePath string
	Offset   int64
	Data     []byte
	Done     chan error // Feedback loop for the worker
}

Jump to

Keyboard shortcuts

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