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 ¶
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.
Click to show internal directories.
Click to hide internal directories.