testbed

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 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
	// 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