app

package
v0.4.1 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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Config *config.Config
	Logger *logger.Logger

	// High-level interfaces for services to use
	NNTP      NNTPManager
	Processor Processor

	ExtractionEnabled bool
}

Context hold the core environment and shared resources for GoNZB. It acts as the "Single Source of Truth" for the application state.

func NewContext

func NewContext(cfg *config.Config, log *logger.Logger) *Context

NewContext initializes the base environment.

type NNTPManager

type NNTPManager interface {
	// This allows the engine to call the manager without importing the nntp package
	Fetch(ctx context.Context, msgID string, groups []string) (io.Reader, error)
	TotalCapacity() int
}

type Processor

type Processor interface {
	// This allows the engine to trigger repair/extract without importing processor
	Prepare(nzbModel *nzb.Model, nzbFilename string) ([]*nzb.DownloadFile, error)
	Finalize(ctx context.Context, tasks []*nzb.DownloadFile) error
	PostProcess(ctx context.Context, tasks []*nzb.DownloadFile) error
}

Jump to

Keyboard shortcuts

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