service

package
v0.0.0-...-1c87088 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PodNotExist int32 = iota
	PodExist
)
View Source
const ModeRelease = "release"

Variables

View Source
var (
	ResponseSuccess = &pb.Response{Status: 200, Message: "success"}
	ResponseFailed  = &pb.Response{Status: 400, Message: "failed"}
)
View Source
var (
	EmptyWorkspaceRunningInfo = &pb.WorkspaceRunningInfo{}
	EmptyResponse             = &pb.Response{}
	EmptyWorkspaceInfo        = &pb.WorkspaceInfo{}
	EmptyWorkspaceStatus      = &pb.WorkspaceStatus{}
)
View Source
var (
	ErrConstructPVC = errors.New("construct pvc failed")
	ErrCreatePVC    = errors.New("create pvc failed")
	ErrCreatePod    = errors.New("create pod failed")
	ErrDeletePod    = errors.New("delete pod failed")
	ErrDeletePVC    = errors.New("delete pvc failed")
)
View Source
var Mode string

Functions

This section is empty.

Types

type CloudSpaceService

type CloudSpaceService struct {
	// contains filtered or unexported fields
}

func NewCloudSpaceService

func NewCloudSpaceService(client client.Client, manager *statussync.StatusInformer) *CloudSpaceService

func (*CloudSpaceService) CreateSpace

CreateSpace 创建云IDE空间并等待Pod状态变为Running,第一次创建,需要挂载存储卷

func (*CloudSpaceService) DeleteSpace

func (s *CloudSpaceService) DeleteSpace(ctx context.Context, option *pb.QueryOption) (*pb.Response, error)

DeleteSpace 删除云IDE空间, 只需要删除存储卷

func (*CloudSpaceService) GetPodSpaceInfo

func (s *CloudSpaceService) GetPodSpaceInfo(ctx context.Context, option *pb.QueryOption) (*pb.WorkspaceRunningInfo, error)

GetPodSpaceInfo 获取云IDE空间Pod的信息

func (*CloudSpaceService) GetPodSpaceStatus

func (s *CloudSpaceService) GetPodSpaceStatus(ctx context.Context, option *pb.QueryOption) (*pb.WorkspaceStatus, error)

GetPodSpaceStatus 获取Pod运行状态

func (*CloudSpaceService) StartSpace

StartSpace 启动(创建)云IDE空间,非第一次创建,无需挂载存储卷,使用之前的存储卷

func (*CloudSpaceService) StopSpace

func (s *CloudSpaceService) StopSpace(ctx context.Context, option *pb.QueryOption) (*pb.Response, error)

StopSpace 停止(删除)云工作空间,无需删除存储卷

Jump to

Keyboard shortcuts

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