Discover Packages
github.com/lewta/sendit
internal
engine
package
Version:
v0.3.0
Opens a new window with list of versions in this module.
Published: Feb 28, 2026
License: MIT
Opens a new window with license information.
Imports: 17
Opens a new window with list of imports.
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.
Opens a new window with list of known importers.
Documentation
Documentation
¶
Engine orchestrates the dispatch loop.
New creates an Engine wired with all dependencies.
Run starts the engine and blocks until ctx is cancelled.
After ctx is cancelled it waits for all in-flight tasks to complete.
Pool manages a global concurrency semaphore and an optional browser sub-semaphore.
func NewPool(maxWorkers, maxBrowserWorkers int ) *Pool
NewPool creates a Pool with the given global and browser worker limits.
Acquire obtains a global slot (and a browser slot for browser tasks).
Blocks until slots are available or ctx is cancelled.
Release frees the slots acquired for the given task type.
Wait blocks until all in-flight tasks have completed.
type Scheduler struct {
}
Scheduler controls inter-request timing based on the configured pacing mode.
NewScheduler creates a Scheduler from the pacing config.
Start launches background goroutines needed by the scheduler (cron for scheduled mode).
Wait implements the pacing delay for the current mode.
It blocks until it is appropriate to dispatch the next request.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.