plugin_host_controller

package
v0.51.6 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller implements the PluginHost controller.

func NewController

func NewController(
	le *logrus.Entry,
	bus bus.Bus,
	info *controller.Info,
	host bldr_plugin_host.PluginHost,
) *Controller

NewController constructs a new controller.

func (*Controller) Close

func (c *Controller) Close() error

Close releases any resources used by the controller. Error indicates any issue encountered releasing.

func (*Controller) Execute

func (c *Controller) Execute(ctx context.Context) (rerr error)

Execute executes the controller. Returning nil ends execution. Returning an error triggers a retry with backoff.

func (*Controller) GetControllerInfo

func (c *Controller) GetControllerInfo() *controller.Info

GetControllerInfo returns information about the controller.

func (*Controller) GetHostRoot added in v0.51.2

func (c *Controller) GetHostRoot() *plugin_host_root.Root

GetHostRoot returns the process-lifetime host resource root.

func (*Controller) GetPluginHost

func (c *Controller) GetPluginHost() bldr_plugin_host.PluginHost

GetPluginHost returns the plugin host.

func (*Controller) HandleDirective

func (c *Controller) HandleDirective(
	ctx context.Context,
	inst directive.Instance,
) ([]directive.Resolver, error)

HandleDirective asks if the handler can resolve the directive. If it can, it returns a resolver. If not, returns nil. Any unexpected errors are returned for logging. It is safe to add a reference to the directive during this call. The context tasked is canceled when the directive instance expires.

Jump to

Keyboard shortcuts

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