selection

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package selection resolves scenario endpoint selectors against the endpoint set: names, oneOf/allOf/any modes, and tag expressions like tags(all(10g, not(win))). See docs/scenario-schema.md and DESIGN.md §9.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pick

func Pick(pool []scenario.Endpoint, exclude string, r *rand.Rand) (scenario.Endpoint, bool)

Pick chooses one endpoint from a pool at random, excluding the named endpoint (e.g. to keep client != server). ok is false if the pool is empty after exclusion.

func Resolve

func Resolve(sel scenario.Selector, endpoints []scenario.Endpoint) ([]scenario.Endpoint, error)

Resolve returns the endpoints a selector matches (the candidate pool). It is deterministic; random "pick one" and client != server exclusion are applied separately by Pick.

Types

This section is empty.

Jump to

Keyboard shortcuts

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