seedenforcer

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package seedenforcer applies per-indexer seed limits to torrents after import. It subscribes to TypeImportComplete events and, when the source indexer has seed_ratio or seed_time_minutes configured, tells the download client to enforce those limits on the torrent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientProvider

type ClientProvider interface {
	ClientFor(ctx context.Context, configID string) (plugin.DownloadClient, error)
}

ClientProvider instantiates a download client by config ID.

type SeedCriteriaProvider

type SeedCriteriaProvider interface {
	GetSeedCriteria(ctx context.Context, indexerID string) (indexer.SeedCriteria, error)
}

SeedCriteriaProvider loads seed criteria for an indexer by ID.

type Service

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

Service listens for import-complete events and applies per-indexer seed limits.

func NewService

func NewService(q dbgen.Querier, indexerSvc SeedCriteriaProvider, dlSvc ClientProvider, bus *events.Bus, logger *slog.Logger) *Service

NewService creates a new seed enforcer service.

func (*Service) Subscribe

func (s *Service) Subscribe()

Subscribe registers the event handler on the bus.

Jump to

Keyboard shortcuts

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