Documentation
¶
Index ¶
- type PluginResources
- func ConnectPluginInstanceResources(ctx context.Context, b bus.Bus, pluginID, instanceKey string) (*PluginResources, error)
- func ConnectPluginResources(ctx context.Context, b bus.Bus, pluginID string) (*PluginResources, error)
- func ConnectPluginResourcesAtManifest(ctx context.Context, b bus.Bus, pluginID, manifestRoot string) (*PluginResources, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PluginResources ¶
type PluginResources struct {
// Client is the resource client for the target plugin.
Client *resource_client.Client
// contains filtered or unexported fields
}
PluginResources holds the resource client and directive reference for a cross-plugin connection. Release must be called when done to clean up both the resource client and the plugin reference.
func ConnectPluginInstanceResources ¶
func ConnectPluginInstanceResources(ctx context.Context, b bus.Bus, pluginID, instanceKey string) (*PluginResources, error)
ConnectPluginInstanceResources connects to the plugin instance named by instanceKey, such as one Space's installation. An empty key selects the instance the bus loads by default. The caller must call Release.
func ConnectPluginResources ¶
func ConnectPluginResources( ctx context.Context, b bus.Bus, pluginID string, ) (*PluginResources, error)
ConnectPluginResources connects to another plugin's resource service. It waits for the target plugin to be loaded, then creates a resource client. The caller must call Release on the returned PluginResources when done.
func ConnectPluginResourcesAtManifest ¶
func ConnectPluginResourcesAtManifest(ctx context.Context, b bus.Bus, pluginID, manifestRoot string) (*PluginResources, error)
ConnectPluginResourcesAtManifest connects to an exact retained executable. The caller releases both the resource connection and immutable plugin reference.
func (*PluginResources) Release ¶
func (p *PluginResources) Release()
Release releases the resource client and the plugin directive reference.