Documentation ¶
Index ¶
- Constants
- func AddPluginRunnerRequirements(meta model.PluginMeta, rand common.Random, useLocalhost bool) model.PluginMeta
- func ConvertMetaToPlugin(meta model.PluginMeta) model.ChePlugin
- func InjectRemoteRuntime(meta *model.PluginMeta, injection *RemotePluginInjection)
- type Broker
- func (b *Broker) ProcessPlugin(meta model.PluginMeta, remoteInjection *RemotePluginInjection) model.ChePlugin
- func (b *Broker) ProcessPlugins(metas []model.PluginMeta) ([]model.ChePlugin, error)
- func (b *Broker) PushEvents(tun *jsonrpc.Tunnel)
- func (b *Broker) Start(pluginFQNs []model.PluginFQN, defaultRegistry string) error
- type RemotePluginInjection
Constants ¶
const RegistryURLFormat = "%s/%s/meta.yaml"
RegistryURLFormat specifies the format string for registry urls when downloading metas
Variables ¶
This section is empty.
Functions ¶
func AddPluginRunnerRequirements ¶
func AddPluginRunnerRequirements(meta model.PluginMeta, rand common.Random, useLocalhost bool) model.PluginMeta
AddPluginRunnerRequirements adds to ChePlugin configuration needed to run remote Theia plugins in the provided ChePlugin. Method adds needed ports, endpoints, volumes, environment variables. ChePlugin with one container is supported only.
func ConvertMetaToPlugin ¶
func ConvertMetaToPlugin(meta model.PluginMeta) model.ChePlugin
ConvertMetaToPlugin converts model.PluginMeta to model.ChePlugin, to allow the plugin configuration to be passed back to Che.
func InjectRemoteRuntime ¶
func InjectRemoteRuntime(meta *model.PluginMeta, injection *RemotePluginInjection)
InjectRemoteRuntime adds require environment variable and volume to a ChePlugin to enable it to start the remote plugin runtime at start.
Types ¶
type Broker ¶
Broker is used to process Che plugins
func (*Broker) ProcessPlugin ¶
func (b *Broker) ProcessPlugin(meta model.PluginMeta, remoteInjection *RemotePluginInjection) model.ChePlugin
ProcessPlugin processes a single plugin, adding any necessary requirements for running the plugin in a Che workspace. Converts plugin meta to Che plugin, and adds it to storage for later retrieval. Parameter remoteInjection represents the environment variables and volumes potentially required by plugins for running the remote Theia runtime (see: GetRuntimeInjection)
func (*Broker) ProcessPlugins ¶
ProcessPlugins converts a list of Plugin Metas into Che Plugins to be understood by the Che server. Additionally, ProcessPlugins performs minimal validation. See also: ProcessPlugin
func (*Broker) PushEvents ¶
PushEvents sets given tunnel as consumer of broker events.
type RemotePluginInjection ¶
RemotePluginInjection contains the volume and environment variable that must be provisioned to a ChePlugin to allow it to load the remote plugin runtime.
func GetRuntimeInjection ¶
func GetRuntimeInjection(metas []model.PluginMeta) (*RemotePluginInjection, error)
GetRuntimeInjection gets the volume and environment variable that must be provisioned in each VSCode or Theia plugin to allow it to start the remote plugin runtime.