Versions in this module Expand all Collapse all v0 v0.1.0 Aug 27, 2026 Changes in this version + var ErrHijackingUnsupported = errors.New("connection reset simulation requires HTTP/1.x hijacking") + type Engine struct + func New(opts Options) *Engine + func (e *Engine) Apply(ctx context.Context, rule rules.Rule, w http.ResponseWriter, r *http.Request) (Result, error) + type FixedRandom struct + Value float64 + func (f FixedRandom) Float64() float64 + type LockedRandom struct + func NewLockedRandom(seed *int64) *LockedRandom + func (l *LockedRandom) Float64() float64 + type Options struct + Logger *slog.Logger + Metrics *metrics.Metrics + Random Random + Seed *int64 + Sleeper Sleeper + type Random interface + Float64 func() float64 + type Result struct + Faulted bool + Stop bool + type Sleeper interface + Sleep func(ctx context.Context, d time.Duration) error + type TimerSleeper struct + func (TimerSleeper) Sleep(ctx context.Context, d time.Duration) error