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.