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

plugin_host_mock

package
v0.57.13 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package plugin_host_mock provides plugin host test doubles.

Index

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 NewHost

func NewHost(platformID string) *Host

NewHost constructs a host for platformID.

func (*Host) DeletePlugin

func (h *Host) DeletePlugin(context.Context, string) error

DeletePlugin returns immediately.

func (*Host) Execute

func (h *Host) Execute(context.Context) error

Execute returns immediately.

func (*Host) ExecutePlugin

ExecutePlugin returns immediately.

func (*Host) GetPlatformId

func (h *Host) GetPlatformId() string

GetPlatformId returns the platform ID.

func (*Host) ListPlugins

func (h *Host) ListPlugins(context.Context) ([]string, error)

ListPlugins returns no plugins.

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

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.

Jump to

Keyboard shortcuts

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