Documentation
¶
Index ¶
- Constants
- type BrokerStatus
- type CachedPlugin
- type ChePlugin
- type Command
- type Container
- type Endpoint
- type EnvVar
- type ErrorEvent
- type ExecAction
- type ExposedPort
- type Handler
- type InstalledPluginJSON
- type Lifecycle
- type PluginBrokerLogEvent
- type PluginFQN
- type PluginMeta
- type PluginMetaSpec
- type RuntimeID
- type StartedEvent
- type SuccessEvent
- type Volume
Constants ¶
const ( StatusIdle BrokerStatus = "IDLE" StatusStarted BrokerStatus = "STARTED" StatusDone BrokerStatus = "DONE" StatusFailed BrokerStatus = "FAILED" BrokerStatusEventType = "broker/statusChanged" BrokerResultEventType = "broker/result" BrokerLogEventType = "broker/log" )
Broker statuses
const ( ChePluginType = "che plugin" EditorPluginType = "che editor" TheiaPluginType = "theia plugin" VscodePluginType = "vs code extension" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrokerStatus ¶
type BrokerStatus string
type CachedPlugin ¶
type CachedPlugin struct {
ID string `json:"pluginId" yaml:"pluginId"`
IsRemote bool `json:"isRemote" yaml:"isRemote"`
CachedExtensions map[string]string `json:"cachedExtensions" yaml:"cachedExtensions"`
}
CachedPlugin represents an "installed" plugin on the filesystem. Contains a plugin ID and the extensions it has stored in /plugins CachedExtensions is a map of extension URL -> filesystem path, where the filesystem path may be an empty string if the extension has not yet been downloaded.
type ChePlugin ¶
type ChePlugin struct {
ID string `json:"id" yaml:"id"`
Version string `json:"version" yaml:"version"`
Name string `json:"name" yaml:"name"`
Publisher string `json:"publisher" yaml:"publisher"`
Endpoints []Endpoint `json:"endpoints" yaml:"endpoints"`
Containers []Container `json:"containers" yaml:"containers"`
InitContainers []Container `json:"initContainers" yaml:"initContainers"`
WorkspaceEnv []EnvVar `json:"workspaceEnv" yaml:"workspaceEnv"`
Type string `json:"type" yaml:"type"`
}
type Container ¶
type Container struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Image string `json:"image,omitempty" yaml:"image,omitempty"`
Env []EnvVar `json:"env" yaml:"env"`
Commands []Command `json:"commands" yaml:"commands"`
Volumes []Volume `json:"volumes" yaml:"volumes"`
Ports []ExposedPort `json:"ports" yaml:"ports"`
CPULimit string `json:"cpuLimit,omitempty" yaml:"cpuLimit,omitempty"`
CPURequest string `json:"cpuRequest,omitempty" yaml:"cpuRequest,omitempty"`
MemoryLimit string `json:"memoryLimit,omitempty" yaml:"memoryLimit,omitempty"`
MemoryRequest string `json:"memoryRequest,omitempty" yaml:"memoryRequest,omitempty"`
MountSources bool `json:"mountSources" yaml:"mountSources"`
Command []string `json:"command" yaml:"command"`
Args []string `json:"args" yaml:"args"`
Lifecycle *Lifecycle `json:"lifecycle,omitempty" yaml:"lifecycle,omitempty"`
}
type ErrorEvent ¶
type ErrorEvent struct {
Status BrokerStatus `json:"status" yaml:"status"`
RuntimeID RuntimeID `json:"runtimeId" yaml:"runtimeId"`
Error string `json:"error" yaml:"error"`
}
type ExecAction ¶
type ExecAction struct {
Command []string `json:"command" yaml:"command"`
}
type ExposedPort ¶
type ExposedPort struct {
ExposedPort int `json:"exposedPort" yaml:"exposedPort"`
}
type Handler ¶
type Handler struct {
Exec *ExecAction `json:"exec,omitempty" yaml:"exec,omitempty"`
}
type InstalledPluginJSON ¶
type InstalledPluginJSON struct {
Version string `json:"version" yaml:"version"`
Plugins []CachedPlugin `json:"plugins" yaml:"plugins"`
}
InstalledPluginJSON represents the JSON object to be stored when tracking plugins installed in the current workspace, consisting of a list of cached plugins and a version number to track compatibility.
type PluginBrokerLogEvent ¶
type PluginBrokerLogEvent struct {
RuntimeID RuntimeID `json:"runtimeId" yaml:"runtimeId"`
// Time when this event occurred.
Time time.Time `json:"time" yaml:"text"`
// Text is written by plugin broker line of text.
Text string `json:"text" yaml:"text"`
}
func (*PluginBrokerLogEvent) Type ¶
func (e *PluginBrokerLogEvent) Type() string
Type returns BrokerLogEventType.
type PluginMeta ¶
type PluginMeta struct {
APIVersion string `json:"apiVersion" yaml:"apiVersion"`
Spec PluginMetaSpec `json:"spec" yaml:"spec"`
ID string `json:"id" yaml:"id"`
Name string `json:"name" yaml:"name"`
DisplayName string `json:"displayName" yaml:"displayName"`
Publisher string `json:"publisher" yaml:"publisher"`
Type string `json:"type" yaml:"type"`
Description string `json:"description" yaml:"description"`
Version string `json:"version" yaml:"version"`
Title string `json:"title" yaml:"title"`
Icon string `json:"icon" yaml:"icon"`
}
type PluginMetaSpec ¶
type PluginMetaSpec struct {
Endpoints []Endpoint `json:"endpoints" yaml:"endpoints"`
Containers []Container `json:"containers" yaml:"containers"`
InitContainers []Container `json:"initContainers" yaml:"initContainers"`
WorkspaceEnv []EnvVar `json:"workspaceEnv" yaml:"workspaceEnv"`
Extensions []string `json:"extensions" yaml:"extensions"`
}
type RuntimeID ¶
type RuntimeID struct {
// Workspace is an identifier of the workspace e.g. "workspace123456".
Workspace string `json:"workspaceId" yaml:"workspaceId"`
// Environment is a name of environment e.g. "default".
Environment string `json:"envName" yaml:"envName"`
// OwnerId is an identifier of user who is runtime owner.
OwnerId string `json:"ownerId" yaml:"ownerId"`
}
RuntimeID is an identifier of running workspace. Included to the plugin broker log events.
type StartedEvent ¶
type StartedEvent struct {
Status BrokerStatus `json:"status" yaml:"status"`
RuntimeID RuntimeID `json:"runtimeId" yaml:"runtimeId"`
}
func (*StartedEvent) Type ¶
func (e *StartedEvent) Type() string
Type returns BrokerStatusEventType.
type SuccessEvent ¶
type SuccessEvent struct {
Status BrokerStatus `json:"status" yaml:"status"`
RuntimeID RuntimeID `json:"runtimeId" yaml:"runtimeId"`
Tooling string `json:"tooling" yaml:"tooling"`
}
SuccessEvent is used to send encoded workspace tooling configuration to Che master
func (*SuccessEvent) Type ¶
func (e *SuccessEvent) Type() string
Type returns BrokerResultEventType.