tests

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestConfig

func NewTestConfig(upstreamAddrs ...string) *config.Cache

NewTestConfig returns a fully-populated *Cache mirroring the YAML you shared, including all computed "virtual" fields that LoadConfig sets (QueryBytes, HeadersMap, PathBytes, Backends' *Bytes fields, SoftMemoryLimit, and AtomicEnabled).

func ReserveFreePortInRange

func ReserveFreePortInRange(start, end int) (port int, ln net.Listener, err error)

ReserveFreePortInRange finds a free TCP port and RETURNS an open listener bound to it. This avoids the window where another process can grab the port. Caller must Close() the returned listener when done.

Types

This section is empty.

Jump to

Keyboard shortcuts

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