plugin_entrypoint_controller

package
v0.57.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

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

ControllerID is the controller ID.

Variables

View Source
var Version = controller.MustParseVersion("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

type StartupGroupCoordinator added in v0.57.0

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

StartupGroupCoordinator publishes one ready transition after every configured startup plugin completes or terminates initial capability registration.

func NewStartupGroupCoordinator added in v0.57.0

func NewStartupGroupCoordinator(
	pluginIDs []string,
	source StartupPluginReferenceSource,
) *StartupGroupCoordinator

NewStartupGroupCoordinator constructs a startup group coordinator.

func (*StartupGroupCoordinator) GetReadyCtr added in v0.57.0

GetReadyCtr returns the watchable startup-group readiness state.

func (*StartupGroupCoordinator) IsReady added in v0.57.0

func (c *StartupGroupCoordinator) IsReady() bool

IsReady reports whether the startup group reached its terminal ready state.

func (*StartupGroupCoordinator) Start added in v0.57.0

Start begins watching the configured startup plugins.

Start is idempotent: the readiness container and keyed watcher set both diff internally, so repeated calls are no-ops.

func (*StartupGroupCoordinator) WaitReady added in v0.57.0

func (c *StartupGroupCoordinator) WaitReady(ctx context.Context) error

WaitReady waits for the startup group or context cancellation.

type StartupPluginReferenceSource added in v0.57.0

type StartupPluginReferenceSource interface {
	// AddPluginReference opens a readiness reference and its release function.
	AddPluginReference(pluginID, instanceKey string) (bldr_plugin.RunningPluginRef, func())
}

StartupPluginReferenceSource opens readiness references for startup plugins.

Jump to

Keyboard shortcuts

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