limitter

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChromiumLimiter

func ChromiumLimiter() *semaphore.Weighted

func DockerLimiter

func DockerLimiter() *semaphore.Weighted

func HostLimiter

func HostLimiter(host string) *semaphore.Weighted

func PlaywrightLimiter

func PlaywrightLimiter() *semaphore.Weighted

func ReplaceLimits added in v1.5.0

func ReplaceLimits(limits *config.Limits)

ReplaceLimits swaps the host request limits, bypassing the process-lifetime once semantics of SetLimits. Long-lived embedders that execute many unrelated configs in one process (e.g. the WASM playground) call it before each run so every config gets exactly its own limits. Only in-flight requests keep the semaphores they already acquired.

func SetLimits

func SetLimits(limits *config.Limits)

func TimedAcquire added in v1.8.3

func TimedAcquire(ctx context.Context, sem *semaphore.Weighted, resource, host string) error

TimedAcquire is Acquire with the wait recorded. Use it at every limiter call site so saturation is visible instead of just felt.

Types

This section is empty.

Jump to

Keyboard shortcuts

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