runner

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: MIT

SPDX-License-Identifier: MIT

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Options)

Option is a functional option for the runner.

func WithOutput

func WithOutput(w io.Writer) Option

func WithProbeTimeout

func WithProbeTimeout(d time.Duration) Option

func WithRateLimit

func WithRateLimit(rps float64) Option

func WithVerbose

func WithVerbose(v bool) Option

func WithWorkers

func WithWorkers(n int) Option

type Options

type Options struct {
	Workers      int
	RateLimit    float64
	ProbeTimeout time.Duration // per-probe execution timeout (0 = no timeout)
	Verbose      bool
	Output       io.Writer // for progress output
}

Options configures the runner.

type RateLimiter

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

RateLimiter implements a token bucket rate limiter.

func NewRateLimiter

func NewRateLimiter(rate float64) *RateLimiter

NewRateLimiter creates a rate limiter that allows rate requests per second.

func (*RateLimiter) Wait

func (r *RateLimiter) Wait(ctx context.Context) error

Wait blocks until a token is available or the context is cancelled.

type Runner

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

Runner orchestrates probe execution.

func New

func New(adapter transport.Adapter, j judge.Judge, opts ...Option) *Runner

New creates a runner with the given adapter, judge, and options.

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, t target.Config, probes []probe.Resolved) (*report.Report, error)

Run executes all probes against the target and returns a report.

Jump to

Keyboard shortcuts

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