fronttest

package
v0.2.0-dev.10 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package fronttest puts a real front on loopback in front of an engine under test: the engine's tests then show what reaches it through the shared port, not what a stand-in would.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Port

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

Port is a front that binds the loopback port an engine asks for and gives the engine the route of its inbound. Set engine.Env.SharedListener to Listener.

func New

func New(t testing.TB, routes ...front.Route) *Port

New returns a Port with these routes; the first is the default one. The front starts when the first engine asks for its route, and closes with the test.

func (*Port) Front

func (p *Port) Front() *front.Front

Front is the running front, nil until an engine has asked for a route.

func (*Port) Listener

func (p *Port) Listener(id string, port uint16) net.Listener

Listener is engine.Env.SharedListener.

Jump to

Keyboard shortcuts

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