model

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2019 License: EPL-2.0 Imports: 1 Imported by: 0

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 Command added in v0.17.0

type Command struct {
	Name       string   `json:"name" yaml:"name"`
	WorkingDir string   `json:"workingDir" yaml:"workingDir"`
	Command    []string `json:"command" yaml:"command"`
}

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 Endpoint

type Endpoint struct {
	Name       string            `json:"name" yaml:"name"`
	Public     bool              `json:"public" yaml:"public"`
	TargetPort int               `json:"targetPort" yaml:"targetPort"`
	Attributes map[string]string `json:"attributes" yaml:"attributes"`
}

type EnvVar

type EnvVar struct {
	Name  string `json:"name" yaml:"name"`
	Value string `json:"value" yaml:"value"`
}

type ErrorEvent

type ErrorEvent struct {
	Status    BrokerStatus `json:"status" yaml:"status"`
	RuntimeID RuntimeID    `json:"runtimeId" yaml:"runtimeId"`
	Error     string       `json:"error" yaml:"error"`
}

func (*ErrorEvent) Type

func (e *ErrorEvent) Type() string

Type returns BrokerStatusEventType.

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 PluginFQN added in v0.15.2

type PluginFQN struct {
	Registry  string `json:"registry,omitempty" yaml:"registry,omitempty"`
	ID        string `json:"id" yaml:"id"`
	Reference string `json:"reference" yaml:"reference"`
}

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.

type Volume

type Volume struct {
	MountPath string `json:"mountPath" yaml:"mountPath"`
	Name      string `json:"name" yaml:"name"`
	Ephemeral bool   `json:"ephemeral" yaml:"ephemeral"`
}

Jump to

Keyboard shortcuts

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