Documentation
¶
Index ¶
- Constants
- type AddonPrebuild
- type Client
- func (c *Client) GetRuntimeID(instanceID string) (string, error)
- func (c *Client) InstanceReader() *instanceReader
- func (c *Client) InstanceWriter() *instanceWriter
- func (c *Client) PodReader() *podReader
- func (c *Client) PodWriter() *podWriter
- func (c *Client) ServiceReader() *serviceReader
- func (c *Client) ServiceWriter() *serviceWriter
- type InstanceInfo
- type InstancePhase
- type PodInfo
- type PodPhase
- type ServiceInfo
- type ServicePhase
Constants ¶
View Source
const ( ServicePhaseHealthy = "Healthy" ServicePhaseUnHealthy = "UnHealthy" InstancePhaseRunning = "Running" InstancePhaseHealthy = "Healthy" InstancePhaseUnHealthy = "UnHealthy" InstancePhaseDead = "Dead" PodPhasePending = "Pending" PodPhaseRunning = "Running" PodPhaseSucceeded = "Succeeded" PodPhaseFailed = "Failed" PodPhaseUnknown = "Unknown" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddonPrebuild ¶ added in v1.4.0
type AddonPrebuild struct {
ID uint64 `gorm:"primary_key"`
ApplicationID string `gorm:"type:varchar(32)"`
GitBranch string `gorm:"type:varchar(128)"`
Env string `gorm:"type:varchar(10)"`
RuntimeID string `gorm:"type:varchar(32)"`
RoutingInstanceID string `gorm:"type:varchar(64)"`
InstanceID string `gorm:"type:varchar(64)"`
InstanceName string `gorm:"type:varchar(128)"`
AddonName string `gorm:"type:varchar(128)"`
Plan string `gorm:"column:addon_class;type:varchar(64)"`
Options string `gorm:"type:varchar(1024)"`
Config string `gorm:"type:varchar(1024)"`
BuildFrom int `gorm:"type:int(1);default:0"` // 0: dice.yml 来源 1: 重新分析
DeleteStatus int `gorm:"type:int(1),column:delete_status"` // 0: 未删除,1: diceyml删除,2: 重新分析删除
Deleted string `gorm:"column:is_deleted"`
CreatedAt time.Time `gorm:"column:create_time"`
UpdatedAt time.Time `gorm:"column:update_time"`
}
func (AddonPrebuild) TableName ¶ added in v1.4.0
func (AddonPrebuild) TableName() string
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetRuntimeID ¶ added in v1.4.0
func (*Client) InstanceReader ¶
func (c *Client) InstanceReader() *instanceReader
func (*Client) InstanceWriter ¶
func (c *Client) InstanceWriter() *instanceWriter
func (*Client) ServiceReader ¶
func (c *Client) ServiceReader() *serviceReader
func (*Client) ServiceWriter ¶
func (c *Client) ServiceWriter() *serviceWriter
type InstanceInfo ¶
type InstanceInfo struct {
dbengine.BaseModel
Cluster string `gorm:"type:varchar(64);index"`
Namespace string `gorm:"type:varchar(64);index"`
Name string `gorm:"type:varchar(64);index"`
// Information obtained from env
OrgName string `gorm:"type:varchar(64);index"`
OrgID string `gorm:"type:varchar(64);index"`
ProjectName string `gorm:"type:varchar(64);index"`
ProjectID string `gorm:"type:varchar(64);index"`
ApplicationName string
EdgeApplicationName string
EdgeSite string
ApplicationID string
RuntimeName string
RuntimeID string
ServiceName string
Workspace string `gorm:"type:varchar(10)"`
// addon, stateless-service
ServiceType string `gorm:"type:varchar(64)"`
AddonID string
Meta string
// If it is k8s, the value is "k8s"
TaskID string `gorm:"type:varchar(150);index"`
Phase InstancePhase
Message string
ContainerID string `gorm:"type:varchar(100);index"`
ContainerIP string
HostIP string
StartedAt time.Time
FinishedAt *time.Time
ExitCode int
CpuOrigin float64
MemOrigin int
CpuRequest float64
MemRequest int
CpuLimit float64
MemLimit int
Image string
}
func (InstanceInfo) TableName ¶
func (InstanceInfo) TableName() string
type InstancePhase ¶
type InstancePhase string
type PodInfo ¶
type PodInfo struct {
dbengine.BaseModel
Cluster string `gorm:"type:varchar(64);index"`
Namespace string `gorm:"type:varchar(64);index"`
Name string `gorm:"type:varchar(64);index"`
// Information obtained from env
OrgName string `gorm:"type:varchar(64);index"`
OrgID string `gorm:"type:varchar(64);index"`
ProjectName string `gorm:"type:varchar(64);index"`
ProjectID string `gorm:"type:varchar(64);index"`
ApplicationName string
ApplicationID string
RuntimeName string
RuntimeID string
ServiceName string
Workspace string `gorm:"type:varchar(10)"`
// addon, stateless-service
ServiceType string `gorm:"type:varchar(64)"`
AddonID string
Uid string `gorm:"index"`
K8sNamespace string `gorm:"index"`
PodName string `gorm:"index"`
Phase PodPhase
Message string
PodIP string
HostIP string
StartedAt *time.Time
MemRequest int
MemLimit int
CpuRequest float64
CpuLimit float64
}
type ServiceInfo ¶
type ServiceInfo struct {
dbengine.BaseModel
Cluster string
Namespace string `gorm:"type:varchar(64);index"`
Name string `gorm:"type:varchar(64);index"`
// Information obtained from env
OrgName string `gorm:"type:varchar(64);index"`
OrgID string `gorm:"type:varchar(64);index"`
ProjectName string `gorm:"type:varchar(64);index"`
ProjectID string `gorm:"type:varchar(64);index"`
ApplicationName string
ApplicationID string
RuntimeName string
RuntimeID string
ServiceName string
Workspace string `gorm:"type:varchar(10)"`
// addon, stateless-service
ServiceType string `gorm:"type:varchar(64)"`
Meta string
Phase ServicePhase
Message string
StartedAt time.Time
FinishedAt *time.Time
}
func (ServiceInfo) TableName ¶
func (ServiceInfo) TableName() string
type ServicePhase ¶
type ServicePhase string
Click to show internal directories.
Click to hide internal directories.