Help us shape the future of Go! Take the 2026 Go Developer Survey

testhost

package
v0.62.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

testhost provides an implementation of a test server for the dynamic RP.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestHost

type TestHost struct {
	*testhost.TestHost
	// contains filtered or unexported fields
}

TestHost provides a test host for the dynamic-rp server.

func Start

func Start(t *testing.T, opts ...TestHostOption) (*TestHost, *ucptesthost.TestHost)

func StartWithOptions

func StartWithOptions(t *testing.T, options *dynamicrp.Options) (*TestHost, *ucptesthost.TestHost)

StartWithOptions uses the provided options to start the dynamic-rp test host and an instance of UCP configured to route traffic to the dynamic-rp test host.

Manually configuring the server information other than the port is not supported.

func (*TestHost) Options

func (th *TestHost) Options() *dynamicrp.Options

type TestHostOption

type TestHostOption interface {
	// Apply applies the option to the dynamic-rp options.
	Apply(options *dynamicrp.Options)
}

TestHostOptions supports configuring the dynamic-rp test host.

type TestHostOptionFunc

type TestHostOptionFunc func(options *dynamicrp.Options)

TestHostOptionFunc is a function that implements the TestHostOption interface.

func (TestHostOptionFunc) Apply

func (f TestHostOptionFunc) Apply(options *dynamicrp.Options)

Apply applies the function to the dynamic-rp options.

Jump to

Keyboard shortcuts

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