plugin_entrypoint_controller

package
v0.51.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ControllerID = "bldr/plugin/entrypoint/controller"

ControllerID is the controller ID.

Variables

View Source
var Version = semver.MustParse("0.0.1")

Version is the version of this controller.

Functions

This section is empty.

Types

type Controller

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

Controller implements the plugin entrypoint controller. Handles directives from the plugin bus forwarding RPCs to the host. Ex: LoadPlugin, LookupRpcClient<plugin/foo/ or plugin-host/>

func NewController

NewController constructs the plugin entrypoint controller.

func (*Controller) BuildRemotePluginClient

func (c *Controller) BuildRemotePluginClient(pluginID, instanceKey string, waitAck bool) srpc.Client

BuildRemotePluginClient builds a client for the remote plugin.

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) error

Execute executes the controller goroutine. 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) GetPluginHostClient

func (c *Controller) GetPluginHostClient() bldr_plugin.SRPCPluginHostClient

GetPluginHostClient returns the plugin host client.

func (*Controller) GetPluginMeta

func (c *Controller) GetPluginMeta() *bldr_plugin.PluginMeta

GetPluginMeta returns a copy of the plugin meta object.

func (*Controller) HandleDirective

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

HandleDirective asks if the handler can resolve the directive. If it can, it returns resolver(s). If not, returns nil. It is safe to add a reference to the directive during this call. The context passed is canceled when the directive instance expires.

func (*Controller) WaitPluginClient

func (c *Controller) WaitPluginClient(ctx context.Context, released func(), pluginID string) (srpc.Client, func(), error)

WaitPluginClient waits for an RPC client for a plugin.

if pluginID is invalid, returns an error.

Released is a function to call if the client becomes invalid. Returns nil, nil, err if any error. Returns nil, nil, nil to skip resolving the client. Otherwise returns client, releaseFunc, nil

func (*Controller) WaitPluginHostClient

func (c *Controller) WaitPluginHostClient(ctx context.Context, released func()) (srpc.Client, func(), error)

WaitPluginHostClient waits for an RPC client for the plugin host.

Released is a function to call if the client becomes invalid. Returns nil, nil, err if any error. Returns nil, nil, nil to skip resolving the client. Otherwise returns client, releaseFunc, nil

Jump to

Keyboard shortcuts

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