Documentation
¶
Index ¶
- type Testbed
- func (d *Testbed) CreateManifestWithBilly(ctx context.Context, manifestMeta *bldr_manifest.ManifestMeta, ...) (manifest *bldr_manifest.Manifest, manifestRef *bldr_manifest.ManifestRef, ...)
- func (d *Testbed) GetBus() bus.Bus
- func (d *Testbed) GetContext() context.Context
- func (d *Testbed) GetLogger() *logrus.Entry
- func (d *Testbed) GetMux() srpc.Mux
- func (d *Testbed) GetPluginHostId() string
- func (d *Testbed) GetPluginHostObjKey() string
- func (d *Testbed) GetRpcServiceCtrl() *bifrost_rpc.RpcServiceController
- func (d *Testbed) GetScheduler() *plugin_host_scheduler.Controller
- func (d *Testbed) GetStaticResolver() *static.Resolver
- func (d *Testbed) GetVolume() volume.Volume
- func (d *Testbed) GetVolumeController() volume.Controller
- func (d *Testbed) GetVolumeInfo() *volume.VolumeInfo
- func (d *Testbed) GetWorldEngine() world.Engine
- func (d *Testbed) GetWorldEngineID() string
- func (d *Testbed) GetWorldState() world.WorldState
- func (d *Testbed) Release()
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 ¶
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) GetContext ¶
GetContext returns the context.
func (*Testbed) GetPluginHostId ¶
GetPluginHostId returns the plugin host ID.
func (*Testbed) GetPluginHostObjKey ¶
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 ¶
GetStaticResolver returns the static controller resolver.
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 ¶
GetWorldEngine returns the world engine instance.
func (*Testbed) GetWorldEngineID ¶
GetWorldEngineID returns the world engine id.
func (*Testbed) GetWorldState ¶
func (d *Testbed) GetWorldState() world.WorldState
GetWorldState returns the world state handle.