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

testbed

package
v0.57.21 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEngineTransformConfig added in v0.57.2

func NewEngineTransformConfig(engineBucketID string) (*block_transform.Config, error)

Types

type Option

type Option any

Option is a option passed to NewTestbed

func WithWorldVerbose

func WithWorldVerbose(verbose bool) Option

WithWorldVerbose logs all world engine operations.

type Testbed

type Testbed struct {
	*testbed.Testbed

	// EngineBucketID is the bucket the engine is attached to.
	EngineBucketID string
	// EngineVolumeID is the volume the engine uses for state.
	EngineVolumeID string
	// EngineObjectStoreID is the object store the engine uses for state.
	EngineObjectStoreID string
	// EngineID is the engine identifier on the bus.
	EngineID string
	// Engine contains a reference to the running world engine.
	// Queries the engine directly.
	Engine world.Engine
	// EngineController contains the world engine controller
	EngineController *world_block_engine.Controller
	// BusEngine uses directives to locate the Engine.
	BusEngine world.Engine
	// WorldState contains the BusEngine-backed Engine state.
	WorldState world.WorldState
}

Testbed is a constructed testbed.

func Default

func Default(ctx context.Context, opts ...Option) (*Testbed, error)

Default constructs the default testbed arrangement.

func MustDefault

func MustDefault(t testing.TB, ctx context.Context, opts ...Option) *Testbed

MustDefault constructs the default testbed arrangement, failing t if construction fails and releasing the testbed when the test finishes.

func NewTestbed

func NewTestbed(tb *testbed.Testbed, opts ...Option) (t *Testbed, tbErr error)

NewTestbed constructs a new world testbed from a Hydra testbed.

func WithTestbedOptions

func WithTestbedOptions(ctx context.Context, testbedOptions []testbed.Option, worldOpts []Option) (*Testbed, error)

WithTestbedOptions constructs the testbed with the given testbed options.

Jump to

Keyboard shortcuts

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