integration

package
v0.0.1-alpha0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NzbConfig

type NzbConfig struct {
	QueueDatabasePath   string
	MetadataRootPath    string // Path to metadata root directory
	MaxRangeSize        int64  // Maximum range size for a single request
	StreamingChunkSize  int64  // Chunk size for streaming when end=-1
	Password            string // Global password for .bin files
	Salt                string // Global salt for .bin files
	MaxProcessorWorkers int    // Number of queue workers (default: 2)
	MaxDownloadWorkers  int    // Number of download workers (default: 15)
}

NzbConfig holds configuration for the NZB system

type NzbSystem

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

NzbSystem represents the complete NZB-backed filesystem

func NewNzbSystem

func NewNzbSystem(config NzbConfig, poolManager pool.Manager, configGetter config.ConfigGetter, rcloneClient rclonecli.RcloneRcClient) (*NzbSystem, error)

NewNzbSystem creates a new NZB-backed virtual filesystem with metadata + queue architecture

func (*NzbSystem) Close

func (ns *NzbSystem) Close() error

Close closes the NZB system and releases resources

func (*NzbSystem) Database

func (ns *NzbSystem) Database() *database.DB

Database returns the database instance (for processing queue)

func (*NzbSystem) FileSystem

func (ns *NzbSystem) FileSystem() afero.Fs

FileSystem returns the virtual filesystem interface

func (*NzbSystem) GetDownloadWorkers

func (ns *NzbSystem) GetDownloadWorkers() int

GetDownloadWorkers returns the current download worker count

func (*NzbSystem) GetImportWorkers

func (ns *NzbSystem) GetImportWorkers() int

GetImportWorkers returns the current import processor worker count

func (*NzbSystem) GetQueueStats

func (ns *NzbSystem) GetQueueStats(ctx context.Context) (*database.QueueStats, error)

GetQueueStats returns current queue statistics

func (*NzbSystem) GetServiceStats

func (ns *NzbSystem) GetServiceStats(ctx context.Context) (*importer.ServiceStats, error)

GetServiceStats returns service statistics including queue stats

func (*NzbSystem) GetStats

func (ns *NzbSystem) GetStats() (*Stats, error)

GetStats returns statistics about the NZB system using metadata

func (*NzbSystem) ImporterService

func (ns *NzbSystem) ImporterService() *importer.Service

ImporterService returns the importer service instance

func (*NzbSystem) MetadataReader

func (ns *NzbSystem) MetadataReader() *metadata.MetadataReader

MetadataReader returns the metadata reader instance (for serving files)

func (*NzbSystem) StartService

func (ns *NzbSystem) StartService(ctx context.Context) error

StartService starts the NZB service (including background scanning and processing)

func (*NzbSystem) StopService

func (ns *NzbSystem) StopService(ctx context.Context) error

StopService stops the NZB service

type Stats

type Stats struct {
	TotalNzbFiles     int
	TotalVirtualFiles int
	TotalSize         int64
}

Stats holds statistics about the NZB system

Jump to

Keyboard shortcuts

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