Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine orchestrates the dispatch loop.
func (*Engine) Reload ¶ added in v0.4.0
Reload atomically applies a new configuration to the running engine. Targets, rate limits, backoff, and pacing are updated in-place. Changes to pacing mode, resource limits, or scheduled windows require a restart.
func (*Engine) Run ¶
Run starts the engine and blocks until ctx is cancelled. After ctx is cancelled it waits for all in-flight tasks to complete.
func (*Engine) SetObserver ¶ added in v1.0.0
SetObserver registers a function called after every completed dispatch. It is safe to call before or after Run. Pass nil to clear.
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool manages a global concurrency semaphore and an optional browser sub-semaphore.
func (*Pool) Acquire ¶
Acquire obtains a global slot (and a browser slot for browser tasks). Blocks until slots are available or ctx is cancelled.
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler controls inter-request timing based on the configured pacing mode.
func NewScheduler ¶
func NewScheduler(cfg config.PacingConfig) *Scheduler
NewScheduler creates a Scheduler from the pacing config.
func (*Scheduler) Start ¶
Start launches background goroutines needed by the scheduler (cron for scheduled mode).
func (*Scheduler) UpdatePacing ¶ added in v0.4.0
func (s *Scheduler) UpdatePacing(cfg config.PacingConfig)
UpdatePacing updates reloadable pacing parameters at runtime. Mode changes are not supported — callers should warn and skip.