testbed

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 26 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 {
	// contains filtered or unexported fields
}

Testbed contains a test environment for running plugins in-memory simulating a plugin host.

func BuildTestbed

func BuildTestbed(rctx context.Context, le *logrus.Entry) (*Testbed, error)

BuildTestbed builds the testbed constructing an in-memory volume and plugin host. Returns a set of functions to call to release the controllers.

func (*Testbed) CreateManifestWithBilly

func (d *Testbed) CreateManifestWithBilly(
	ctx context.Context,
	manifestMeta *bldr_manifest.ManifestMeta,
	entrypoint string,
	distFs, assetsFs billy.Filesystem,
	ts *timestamppb.Timestamp,
) (manifest *bldr_manifest.Manifest, manifestRef *bldr_manifest.ManifestRef, err error)

CreateManifestWithBilly creates a manifest with billyfs and links it to the plugin host. This is used by end to end tests to create plugin manifests ad-hoc. distFs and assetsFs can both be nil to create empty fs.

func (*Testbed) GetBus

func (d *Testbed) GetBus() bus.Bus

GetBus returns the bus.

func (*Testbed) GetContext

func (d *Testbed) GetContext() context.Context

GetContext returns the context.

func (*Testbed) GetLogger

func (d *Testbed) GetLogger() *logrus.Entry

GetLogger returns the root logger.

func (*Testbed) GetMux

func (d *Testbed) GetMux() srpc.Mux

GetMux returns the RPC service mux.

func (*Testbed) GetPluginHostId

func (d *Testbed) GetPluginHostId() string

GetPluginHostId returns the plugin host ID.

func (*Testbed) GetPluginHostObjKey

func (d *Testbed) GetPluginHostObjKey() string

GetPluginHostObjKey returns the plugin host object key.

func (*Testbed) GetRpcServiceCtrl

func (d *Testbed) GetRpcServiceCtrl() *bifrost_rpc.RpcServiceController

GetRpcServiceCtrl returns the RPC service controller.

func (*Testbed) GetScheduler

func (d *Testbed) GetScheduler() *plugin_host_scheduler.Controller

GetScheduler returns the plugin scheduler controller.

func (*Testbed) GetStaticResolver

func (d *Testbed) GetStaticResolver() *static.Resolver

GetStaticResolver returns the static controller resolver.

func (*Testbed) GetVolume

func (d *Testbed) GetVolume() volume.Volume

GetVolume returns the storage volume in use.

func (*Testbed) GetVolumeController

func (d *Testbed) GetVolumeController() volume.Controller

GetVolumeController returns the storage volume controller in use.

func (*Testbed) GetVolumeInfo

func (d *Testbed) GetVolumeInfo() *volume.VolumeInfo

GetVolumeInfo returns the storage volume info.

func (*Testbed) GetWorldEngine

func (d *Testbed) GetWorldEngine() world.Engine

GetWorldEngine returns the world engine instance.

func (*Testbed) GetWorldEngineID

func (d *Testbed) GetWorldEngineID() string

GetWorldEngineID returns the world engine id.

func (*Testbed) GetWorldState

func (d *Testbed) GetWorldState() world.WorldState

GetWorldState returns the world state handle.

func (*Testbed) Release

func (d *Testbed) Release()

Release releases the devtool bus.

Jump to

Keyboard shortcuts

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