Documentation ¶
Index ¶
- Constants
- Variables
- type CloudSpaceService
- func (s *CloudSpaceService) CreateSpace(ctx context.Context, info *pb.WorkspaceInfo) (*pb.WorkspaceRunningInfo, error)
- func (s *CloudSpaceService) DeleteSpace(ctx context.Context, option *pb.QueryOption) (*pb.Response, error)
- func (s *CloudSpaceService) GetPodSpaceInfo(ctx context.Context, option *pb.QueryOption) (*pb.WorkspaceRunningInfo, error)
- func (s *CloudSpaceService) GetPodSpaceStatus(ctx context.Context, option *pb.QueryOption) (*pb.WorkspaceStatus, error)
- func (s *CloudSpaceService) StartSpace(ctx context.Context, info *pb.WorkspaceInfo) (*pb.WorkspaceRunningInfo, error)
- func (s *CloudSpaceService) StopSpace(ctx context.Context, option *pb.QueryOption) (*pb.Response, error)
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 ¶
func (s *CloudSpaceService) CreateSpace(ctx context.Context, info *pb.WorkspaceInfo) (*pb.WorkspaceRunningInfo, error)
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 ¶
func (s *CloudSpaceService) StartSpace(ctx context.Context, info *pb.WorkspaceInfo) (*pb.WorkspaceRunningInfo, error)
StartSpace 启动(创建)云IDE空间,非第一次创建,无需挂载存储卷,使用之前的存储卷
func (*CloudSpaceService) StopSpace ¶
func (s *CloudSpaceService) StopSpace(ctx context.Context, option *pb.QueryOption) (*pb.Response, error)
StopSpace 停止(删除)云工作空间,无需删除存储卷
Click to show internal directories.
Click to hide internal directories.