Documentation ¶
Index ¶
- Constants
- Variables
- func DialInstance(baseClient client.Client, workspace *managementv1.DevPodWorkspaceInstance, ...) (*websocket.Conn, error)
- func DisplayName(name string, displayName string) string
- func FindInstance(ctx context.Context, baseClient client.Client, uid string) (*managementv1.DevPodWorkspaceInstance, error)
- func FindInstanceByName(ctx context.Context, baseClient client.Client, name, projectName string) (*managementv1.DevPodWorkspaceInstance, error)
- func FindInstanceInProject(ctx context.Context, baseClient client.Client, uid, projectName string) (*managementv1.DevPodWorkspaceInstance, error)
- func GetDevPodVersion(url string) (string, error)
- func GetProInstanceDevPodVersion(proInstance *provider.ProInstance) (string, error)
- func InitClientFromHost(ctx context.Context, devPodConfig *config.Config, devPodProHost string, ...) (client.Client, error)
- func InitClientFromProvider(ctx context.Context, devPodConfig *config.Config, providerName string, ...) (client.Client, error)
- func IsOwner(self *managementv1.Self, owner *storagev1.UserOrTeam) bool
- func LoftConfigPath(devPodConfig *config.Config, providerName string) (string, error)
- func OptionsFromEnv(name string) url.Values
- func ProviderFromHost(ctx context.Context, devPodConfig *config.Config, devPodProHost string, ...) (*provider.ProviderConfig, error)
- func Timeout() time.Duration
- func WaitForInstance(ctx context.Context, client client.Client, ...) (*managementv1.DevPodWorkspaceInstance, error)
- func WaitForPodReady(ctx context.Context, kubeClient kubernetes.Interface, namespace string, ...) (*corev1.Pod, error)
- type VersionObject
- type WorkspaceInfo
Constants ¶
View Source
const ( WorkspaceIDEnv = "WORKSPACE_ID" WorkspaceUIDEnv = "WORKSPACE_UID" WorkspaceContextEnv = "WORKSPACE_CONTEXT" WorkspaceProviderEnv = "WORKSPACE_PROVIDER" WorkspaceInstanceEnv = "WORKSPACE_INSTANCE" WorkspacePictureEnv = "WORKSPACE_PICTURE" WorkspaceSourceEnv = "WORKSPACE_SOURCE" ConfigEnv = "LOFT_CONFIG" ProjectEnv = "LOFT_PROJECT" RunnerEnv = "LOFT_RUNNER" TemplateOptionEnv = "LOFT_TEMPLATE" TemplateVersionOptionEnv = "LOFT_TEMPLATE_VERSION" TimeoutEnv = "LOFT_TIMEOUT" ProviderBinaryEnv = "PRO_PROVIDER" )
Variables ¶
View Source
var CriticalStatus = map[string]bool{ "Error": true, "Unknown": true, "ImagePullBackOff": true, "CrashLoopBackOff": true, "RunContainerError": true, "ErrImagePull": true, "CreateContainerConfigError": true, "InvalidImageName": true, }
CriticalStatus container status
Functions ¶
func DialInstance ¶
func DisplayName ¶
func FindInstance ¶
func FindInstance(ctx context.Context, baseClient client.Client, uid string) (*managementv1.DevPodWorkspaceInstance, error)
func FindInstanceByName ¶
func FindInstanceByName(ctx context.Context, baseClient client.Client, name, projectName string) (*managementv1.DevPodWorkspaceInstance, error)
func FindInstanceInProject ¶
func FindInstanceInProject(ctx context.Context, baseClient client.Client, uid, projectName string) (*managementv1.DevPodWorkspaceInstance, error)
func GetDevPodVersion ¶
func GetProInstanceDevPodVersion ¶
func GetProInstanceDevPodVersion(proInstance *provider.ProInstance) (string, error)
func InitClientFromHost ¶
func InitClientFromProvider ¶
func IsOwner ¶
func IsOwner(self *managementv1.Self, owner *storagev1.UserOrTeam) bool
func LoftConfigPath ¶
func OptionsFromEnv ¶
func ProviderFromHost ¶
func WaitForInstance ¶
func WaitForInstance(ctx context.Context, client client.Client, instance *managementv1.DevPodWorkspaceInstance, log log.Logger) (*managementv1.DevPodWorkspaceInstance, error)
Types ¶
type VersionObject ¶
type VersionObject struct { // Version is the server version Version string `json:"version,omitempty"` // Version is the remote devpod version DevPodVersion string `json:"devPodVersion,omitempty"` }
func GetPlatformVersion ¶
func GetPlatformVersion(url string) (*VersionObject, error)
type WorkspaceInfo ¶
func GetWorkspaceInfoFromEnv ¶
func GetWorkspaceInfoFromEnv() (*WorkspaceInfo, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.