Documentation
¶
Index ¶
- Variables
- func NewCloudService(cloudRepo repository.Cloud, podRepo repository.Pod, ...) *cloudService
- type CloudConfDTO
- type CloudDTO
- type CloudInternalService
- type CloudMessageService
- type CloudService
- type GetCloudConfCmd
- type GetReleasedPodCmd
- type PodInfoCmd
- type PodInfoDTO
- type ReleaseCloudCmd
- type ReleaseInternalCmd
- type Spec
- type SubscribeCloudCmd
- type UpdatePodInternalCmd
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewCloudService ¶
func NewCloudService( cloudRepo repository.Cloud, podRepo repository.Pod, producer message.CloudMessageProducer, whitelistRepo userrepo.WhiteList, ) *cloudService
Types ¶
type CloudConfDTO ¶
type CloudDTO ¶
type CloudDTO struct {
CloudConfDTO
IsIdle bool `json:"is_idle"`
HasHolding bool `json:"has_holding"`
}
type CloudInternalService ¶
type CloudInternalService interface {
UpdateInfo(*UpdatePodInternalCmd) error
Release(*ReleaseInternalCmd) error
}
func NewCloudInternalService ¶
func NewCloudInternalService( repo repository.Pod, terminationWait int64, ) CloudInternalService
type CloudMessageService ¶
type CloudMessageService interface {
CreatePodInstance(*domain.PodInfo) error
ReleasePodInstance(Id, cloudType string) error
}
func NewCloudMessageService ¶
func NewCloudMessageService( repo repository.Pod, manager cloud.CloudPod, survivalTimeForPodCPU int64, survivalTimeForPodAscend int64, cloudRecordEventPublisher message.CloudRecordEventPublisher, ) CloudMessageService
type CloudService ¶
type CloudService interface {
// cloud
ListCloud(*GetCloudConfCmd) ([]CloudDTO, error)
SubscribeCloud(*SubscribeCloudCmd) (code string, err error)
// pod
Get(*PodInfoCmd) (PodInfoDTO, error)
ReleaseCloud(*ReleaseCloudCmd) error
GetReleasedPod(*GetReleasedPodCmd) (PodInfoDTO, error)
}
type GetCloudConfCmd ¶
type GetReleasedPodCmd ¶
type GetReleasedPodCmd struct {
PodId string
}
type PodInfoCmd ¶
type PodInfoCmd SubscribeCloudCmd
func (*PodInfoCmd) Validate ¶
func (cmd *PodInfoCmd) Validate() error
type PodInfoDTO ¶
type PodInfoDTO struct {
Id string `json:"id"`
CloudId string `json:"cloud_id"`
Owner string `json:"owner"`
Status string `json:"status"`
Expiry int64 `json:"expiry"`
Error string `json:"error"`
AccessURL string `json:"access_url"`
CreatedAt int64 `json:"created_at"`
Image string `json:"image"`
Spec string `json:"spec"`
}
type ReleaseCloudCmd ¶
func (*ReleaseCloudCmd) Validate ¶
func (c *ReleaseCloudCmd) Validate() error
type ReleaseInternalCmd ¶
type ReleaseInternalCmd struct {
PodId string
}
type SubscribeCloudCmd ¶
type SubscribeCloudCmd struct {
User types.Account
ImageAlias domain.CloudImageAlias
CardsNum domain.CloudSpecCardsNum
CloudId string
}
func (*SubscribeCloudCmd) Validate ¶
func (cmd *SubscribeCloudCmd) Validate() error
Click to show internal directories.
Click to hide internal directories.