timeouts

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultSearchTimeout matches both Jackett and cross-seed automation base timeout.
	DefaultSearchTimeout = 9 * time.Second
	// MaxSearchTimeout caps how far we extend the adaptive timeout budget.
	MaxSearchTimeout = 45 * time.Second
	// PerIndexerSearchTimeout is the additional budget granted per indexer; keep in sync with automation scheduler assumptions.
	PerIndexerSearchTimeout = 1 * time.Second
)

Variables

This section is empty.

Functions

func AdaptiveSearchTimeout

func AdaptiveSearchTimeout(indexerCount int) time.Duration

AdaptiveSearchTimeout scales the timeout linearly per indexer (starting from DefaultSearchTimeout) and caps the total budget at MaxSearchTimeout.

func WithSearchTimeout

func WithSearchTimeout(ctx context.Context, timeout time.Duration) (context.Context, context.CancelFunc)

WithSearchTimeout enforces a timeout only when the parent context lacks a deadline.

Types

This section is empty.

Jump to

Keyboard shortcuts

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