Documentation
¶
Index ¶
Constants ¶
View Source
const ( StatusIdle BrokerStatus = "IDLE" StatusStarted BrokerStatus = "STARTED" StatusDone BrokerStatus = "DONE" StatusFailed BrokerStatus = "FAILED" BrokerStatusEventType = "broker/statusChanged" BrokerResultEventType = "broker/result" BrokerLogEventType = "broker/log" )
Broker statuses
View Source
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 ChePlugin ¶ added in v0.4.0
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"`
MemoryLimit string `json:"memoryLimit,omitempty" yaml:"memoryLimit,omitempty"`
MountSources bool `json:"mountSources" yaml:"mountSources"`
Command []string `json:"command" yaml:"command"`
Args []string `json:"args" yaml:"args"`
}
type ErrorEvent ¶
type ErrorEvent struct {
Status BrokerStatus `json:"status" yaml:"status"`
RuntimeID RuntimeID `json:"runtimeId" yaml:"runtimeId"`
Error string `json:"error" yaml:"error"`
}
type ExposedPort ¶
type ExposedPort struct {
ExposedPort int `json:"exposedPort" yaml:"exposedPort"`
}
type PluginBrokerLogEvent ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.17.0
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 ¶ added in v0.2.0
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.
Click to show internal directories.
Click to hide internal directories.