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

testbed

package
v0.57.25 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Testbed

type Testbed struct {
	// Context is the root context.
	Context context.Context
	// Logger is the logger
	Logger *logrus.Entry
	// StaticResolver is the static resolver.
	StaticResolver *srr.Resolver
	// Bus is the controller bus
	Bus bus.Bus
	// PrivKey is the private key.
	PrivKey crypto.PrivKey
	// PeerID is the peer id for private key.
	PeerID peer.ID
	// Release releases the testbed.
	Release func()
}

Testbed is a constructed testbed.

func NewTestbed

func NewTestbed(ctx context.Context, le *logrus.Entry, opts TestbedOpts) (*Testbed, error)

NewTestbed constructs a new core bus with a attached kvtx in-memory volume, logger, and other core controllers required for a test to function.

type TestbedOpts

type TestbedOpts struct {
	// PrivKey overrides the private key.
	PrivKey crypto.PrivKey
	// NoPeer disables generating + starting the peer and filling PrivKey.
	NoPeer bool
	// NoEcho disables starting the echo listener.
	NoEcho bool
}

TestbedOpts are extra options to construct the testbed.

Jump to

Keyboard shortcuts

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