Documentation
¶
Overview ¶
Package plugin_host_mock provides plugin host test doubles.
Index ¶
- type Host
- func (h *Host) DeletePlugin(context.Context, string) error
- func (h *Host) Execute(context.Context) error
- func (h *Host) ExecutePlugin(context.Context, string, string, string, string, *unixfs.FSHandle, ...) error
- func (h *Host) GetPlatformId() string
- func (h *Host) ListPlugins(context.Context) ([]string, error)
- type LookupErrorController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Host ¶
type Host struct {
// contains filtered or unexported fields
}
Host is a plugin host that reports a platform ID and runs nothing.
func (*Host) DeletePlugin ¶
DeletePlugin returns immediately.
func (*Host) ExecutePlugin ¶
func (h *Host) ExecutePlugin( context.Context, string, string, string, string, *unixfs.FSHandle, *unixfs.FSHandle, srpc.Mux, plugin_host.PluginRpcInitCb, ) error
ExecutePlugin returns immediately.
func (*Host) GetPlatformId ¶
GetPlatformId returns the platform ID.
type LookupErrorController ¶
type LookupErrorController struct {
// contains filtered or unexported fields
}
LookupErrorController fails every LookupPluginHost with an error.
func NewLookupErrorController ¶
func NewLookupErrorController(err error) *LookupErrorController
NewLookupErrorController constructs a controller that fails LookupPluginHost with err.
func (*LookupErrorController) Close ¶
func (c *LookupErrorController) Close() error
Close releases any resources used by the controller.
func (*LookupErrorController) Execute ¶
func (c *LookupErrorController) Execute(context.Context) error
Execute executes the controller.
func (*LookupErrorController) GetControllerInfo ¶
func (c *LookupErrorController) GetControllerInfo() *controller.Info
GetControllerInfo returns information about the controller.
func (*LookupErrorController) HandleDirective ¶
func (c *LookupErrorController) HandleDirective( _ context.Context, inst directive.Instance, ) ([]directive.Resolver, error)
HandleDirective fails LookupPluginHost.
Click to show internal directories.
Click to hide internal directories.