run

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package run wires the stages together: it streams a seed source through the fetch engine on a large worker pool, then funnels every result to a single pack consumer that writes the captures. Reading the network is the bottleneck, so one writer keeps the output files simple and still keeps up with thousands of concurrent fetches.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

Runner executes one crawl end to end.

func New

func New(cfg config.Config) *Runner

New returns a Runner for cfg.

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, src seed.Source, onTick func(metrics.Snapshot)) error

Run crawls every seed from src and returns when the source is drained or ctx is cancelled. The OnTick callback, if set, is invoked about once a second with a fresh snapshot for progress display.

func (*Runner) Stats

func (r *Runner) Stats() *metrics.Stats

Stats exposes the live counters (for the display loop).

Jump to

Keyboard shortcuts

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