metadata

package
v3.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: EPL-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
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

type Broker struct {
	common.Broker
	// contains filtered or unexported fields
}

Broker is used to process Che plugins

func NewBroker

func NewBroker(localhostSidecar bool) *Broker

NewBroker creates Che broker instance

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

func (b *Broker) ProcessPlugins(metas []model.PluginMeta) ([]model.ChePlugin, error)

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

func (b *Broker) PushEvents(tun *jsonrpc.Tunnel)

PushEvents sets given tunnel as consumer of broker events.

func (*Broker) Start

func (b *Broker) Start(pluginFQNs []model.PluginFQN, defaultRegistry string) error

Start the plugin brokering process for given plugin FQNs. Default registry is required only if not all plugins specify a registry.

type RemotePluginInjection

type RemotePluginInjection struct {
	Volume model.Volume
	Env    model.EnvVar
}

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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