Documentation ¶
Index ¶
- Constants
- type AccessURL
- type Cloud
- type CloudConf
- type CloudFeature
- type CloudImage
- type CloudImageAlias
- type CloudLimited
- type CloudName
- type CloudProcessor
- type CloudRemain
- type CloudSpec
- type CloudSpecCardsNum
- type CloudSpecDesc
- type Credit
- type ICloudImage
- type Pod
- type PodError
- type PodExpiry
- type PodInfo
- func (p *PodInfo) CanRelease() bool
- func (p *PodInfo) CheckGoodAndSet() bool
- func (p *PodInfo) GetCloudType() string
- func (p *PodInfo) IsAscend() bool
- func (p *PodInfo) IsCpu() bool
- func (p *PodInfo) IsExpiried() bool
- func (p *PodInfo) IsFailedOrTerminated() bool
- func (p *PodInfo) IsHoldingAndNotExpiried() bool
- func (p *PodInfo) IsTerminated() bool
- func (p *PodInfo) IsTerminating() bool
- func (p *PodInfo) SetDefaultExpiry() (err error)
- func (p *PodInfo) SetStartingPodInfo(cid string, owner otypes.Account, image ICloudImage, ...) (err error)
- func (p *PodInfo) SetStatus()
- func (p *PodInfo) StatusSetCreating()
- func (p *PodInfo) StatusSetFailed()
- func (p *PodInfo) StatusSetRunning()
- func (p *PodInfo) StatusSetTerminated()
- func (p *PodInfo) StatusSetTerminating()
- type PodStatus
Constants ¶
View Source
const ( CloudPodStatusStarting = "starting" CloudPodStatusCreating = "creating" CloudPodStatusFailed = "failed" CloudPodStatusRunning = "running" CloudPodStatusTerminated = "terminated" CloudPodStatusTerminating = "terminating" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cloud ¶
type Cloud struct { CloudConf SingleRemain CloudRemain MultiRemain CloudRemain }
func (*Cloud) HasMultiCardsIdle ¶ added in v1.3.0
func (*Cloud) HasSingleCardIdle ¶ added in v1.3.0
type CloudConf ¶
type CloudConf struct { Id string Name CloudName Specs []CloudSpec Images []CloudImage Feature CloudFeature Processor CloudProcessor SingleLimited CloudLimited MultiLimited CloudLimited Credit Credit }
func (*CloudConf) GetImage ¶ added in v1.1.1
func (c *CloudConf) GetImage(alias string) (ICloudImage, error)
func (*CloudConf) GetImageAlias ¶ added in v1.3.0
func (c *CloudConf) GetImageAlias(image string) (CloudImageAlias, error)
func (*CloudConf) GetSpecDesc ¶ added in v1.3.0
func (c *CloudConf) GetSpecDesc(cardsNum int) (CloudSpecDesc, error)
type CloudFeature ¶
type CloudFeature interface {
CloudFeature() string
}
CloudFeature
func NewCloudFeature ¶
func NewCloudFeature(v string) (CloudFeature, error)
type CloudImage ¶
type CloudImage struct { Alias CloudImageAlias Image ICloudImage }
type CloudImageAlias ¶ added in v1.1.1
type CloudImageAlias interface {
CloudImageAlias() string
}
func NewCloudImageAlias ¶ added in v1.1.1
func NewCloudImageAlias(v string) (CloudImageAlias, error)
type CloudLimited ¶
type CloudLimited interface {
CloudLimited() int
}
CloudLimited
func NewCloudLimited ¶
func NewCloudLimited(v int) (CloudLimited, error)
type CloudProcessor ¶
type CloudProcessor interface {
CloudProcessor() string
}
CloudProcessor
func NewCloudProcessor ¶
func NewCloudProcessor(v string) (CloudProcessor, error)
type CloudRemain ¶
type CloudRemain interface {
CloudRemain() int
}
CloudRemain
func NewCloudRemain ¶
func NewCloudRemain(v int) (CloudRemain, error)
type CloudSpec ¶
type CloudSpec struct { Desc CloudSpecDesc CardsNum CloudSpecCardsNum }
type CloudSpecCardsNum ¶ added in v1.3.0
type CloudSpecCardsNum interface {
CloudSpecCardsNum() int
}
CloudSpecCardsNum
func NewCloudSpecCardsNum ¶ added in v1.3.0
func NewCloudSpecCardsNum(v int) (CloudSpecCardsNum, error)
type CloudSpecDesc ¶ added in v1.3.0
type CloudSpecDesc interface {
CloudSpecDesc() string
}
CloudSpec
func NewCloudSpecDesc ¶ added in v1.3.0
func NewCloudSpecDesc(v string) (CloudSpecDesc, error)
type ICloudImage ¶ added in v1.1.1
type ICloudImage interface {
Image() string
}
func NewICloudImage ¶ added in v1.1.1
func NewICloudImage(v string) (ICloudImage, error)
type PodInfo ¶
type PodInfo struct { Pod Status PodStatus Expiry PodExpiry Error PodError AccessURL AccessURL CreatedAt types.Time CardsNum CloudSpecCardsNum }
func (*PodInfo) CanRelease ¶
func (*PodInfo) CheckGoodAndSet ¶
func (*PodInfo) GetCloudType ¶
func (*PodInfo) IsExpiried ¶
func (*PodInfo) IsFailedOrTerminated ¶
func (*PodInfo) IsHoldingAndNotExpiried ¶
func (*PodInfo) IsTerminated ¶
func (*PodInfo) IsTerminating ¶
func (*PodInfo) SetDefaultExpiry ¶
func (*PodInfo) SetStartingPodInfo ¶
func (p *PodInfo) SetStartingPodInfo( cid string, owner otypes.Account, image ICloudImage, cardsNum CloudSpecCardsNum, ) (err error)
func (*PodInfo) StatusSetCreating ¶
func (p *PodInfo) StatusSetCreating()
func (*PodInfo) StatusSetFailed ¶
func (p *PodInfo) StatusSetFailed()
func (*PodInfo) StatusSetRunning ¶
func (p *PodInfo) StatusSetRunning()
func (*PodInfo) StatusSetTerminated ¶
func (p *PodInfo) StatusSetTerminated()
func (*PodInfo) StatusSetTerminating ¶
func (p *PodInfo) StatusSetTerminating()
Click to show internal directories.
Click to hide internal directories.