Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Controller ¶
type Controller interface {
internaltypes.Controller
// ListAll returns a copy of the cached tools of every running plugin.
ListAll() map[string]PluginTools
// CallTool invokes a plugin tool. connection is nil for plugin-scoped tools.
CallTool(
ctx context.Context,
pluginID string,
connection *sdktypes.Connection,
name string,
arguments json.RawMessage,
) (*sdktools.Result, error)
// OnChange registers fn to run (outside the controller lock) after every
// cache change: plugin start, stop or shutdown.
OnChange(fn func())
}
Controller caches every running plugin's tools and dispatches calls.
func NewController ¶
func NewController(logger logging.Logger, boundary *invocation.Boundary) Controller
type PluginTools ¶
type PluginTools struct {
Meta config.PluginMeta
Tools []sdktools.Descriptor
Generation uint64
}
PluginTools is the cached tool list of one running plugin.
Click to show internal directories.
Click to hide internal directories.