Documentation
¶
Index ¶
- Variables
- type AppState
- type AppStatus
- type ByCreateTime
- type ChangeOrderStatus
- type ChangeType
- type EDAS
- func (e *EDAS) Cancel(ctx context.Context, specObj interface{}) (interface{}, error)
- func (e *EDAS) CapacityInfo() apistructs.CapacityInfoData
- func (*EDAS) CleanUpBeforeDelete()
- func (e *EDAS) Create(ctx context.Context, specObj interface{}) (interface{}, error)
- func (e *EDAS) Destroy(ctx context.Context, specObj interface{}) error
- func (e *EDAS) Inspect(ctx context.Context, specObj interface{}) (interface{}, error)
- func (*EDAS) JobVolumeCreate(ctx context.Context, spec interface{}) (string, error)
- func (*EDAS) KillPod(podname string) error
- func (e *EDAS) Kind() executortypes.Kind
- func (e *EDAS) Name() executortypes.Name
- func (e *EDAS) Precheck(ctx context.Context, specObj interface{}) (apistructs.ServiceGroupPrecheckData, error)
- func (e *EDAS) Remove(ctx context.Context, specObj interface{}) error
- func (e *EDAS) ResourceInfo(brief bool) (apistructs.ClusterResourceInfoData, error)
- func (e *EDAS) SetNodeLabels(setting executortypes.NodeLabelSetting, hosts []string, ...) error
- func (e *EDAS) Status(ctx context.Context, specObj interface{}) (apistructs.StatusDesc, error)
- func (e *EDAS) Update(ctx context.Context, specObj interface{}) (interface{}, error)
- func (m *EDAS) WaitEvent(lstore *sync.Map, stopCh chan struct{})
- type ServiceSpec
- type SlbType
- type TaskState
Constants ¶
This section is empty.
Variables ¶
View Source
var AppStateString = map[AppState]string{ APP_STATE_AGENT_OFF: "agent off", APP_STATE_STOPPED: "stopped", APP_STATE_RUNNING_BUT_URL_FAILED: "running but url failed", APP_STATE_RUNNING: "running", }
View Source
var ChangeOrderStatusString = map[ChangeOrderStatus]string{ CHANGE_ORDER_STATUS_ERROR: "error", CHANGE_ORDER_STATUS_PENDING: "pending", CHANGE_ORDER_STATUS_EXECUTING: "executing", CHANGE_ORDER_STATUS_SUCC: "success", CHANGE_ORDER_STATUS_FAILED: "failed", CHANGE_ORDER_STATUS_STOPPED: "stopped", CHANGE_ORDER_STATUS_ABNORMAL: "abnormal", }
View Source
var TaskStateString = map[TaskState]string{ TASK_STATE_UNKNOWN: "unknown", TASK_STATE_PROCESSING: "processing", TASK_STATE_SUCCESS: "success", TASK_STATE_FAILED: "failed", }
Functions ¶
This section is empty.
Types ¶
type ByCreateTime ¶
type ByCreateTime []api.ChangeOrder
ByCreateTime change order for sort
func (ByCreateTime) Len ¶
func (a ByCreateTime) Len() int
func (ByCreateTime) Less ¶
func (a ByCreateTime) Less(i, j int) bool
func (ByCreateTime) Swap ¶
func (a ByCreateTime) Swap(i, j int)
type ChangeOrderStatus ¶
type ChangeOrderStatus int
ChangeOrderStatus change orderId status
const ( CHANGE_ORDER_STATUS_ERROR ChangeOrderStatus = -1 CHANGE_ORDER_STATUS_PENDING ChangeOrderStatus = 0 CHANGE_ORDER_STATUS_EXECUTING ChangeOrderStatus = 1 CHANGE_ORDER_STATUS_SUCC ChangeOrderStatus = 2 CHANGE_ORDER_STATUS_FAILED ChangeOrderStatus = 3 CHANGE_ORDER_STATUS_STOPPED ChangeOrderStatus = 6 CHANGE_ORDER_STATUS_ABNORMAL ChangeOrderStatus = 10 )
type ChangeType ¶
type ChangeType string
const ( CHANGE_TYPE_CREATE ChangeType = "Create" CHANGE_TYPE_DEPLOY ChangeType = "Deploy" CHANGE_TYPE_STOP ChangeType = "Stop" )
type EDAS ¶
type EDAS struct {
// contains filtered or unexported fields
}
EDAS edas server structure
func (*EDAS) CapacityInfo ¶
func (e *EDAS) CapacityInfo() apistructs.CapacityInfoData
func (*EDAS) CleanUpBeforeDelete ¶
func (*EDAS) CleanUpBeforeDelete()
func (*EDAS) JobVolumeCreate ¶
func (*EDAS) Precheck ¶
func (e *EDAS) Precheck(ctx context.Context, specObj interface{}) (apistructs.ServiceGroupPrecheckData, error)
func (*EDAS) Remove ¶
Because it takes a long time for edas to delete the interface, which exceeds the timeout set by the console, the app is deleted in parallel Remove edas remove runtime
func (*EDAS) ResourceInfo ¶
func (e *EDAS) ResourceInfo(brief bool) (apistructs.ClusterResourceInfoData, error)
func (*EDAS) SetNodeLabels ¶
func (e *EDAS) SetNodeLabels(setting executortypes.NodeLabelSetting, hosts []string, labels map[string]string) error
func (*EDAS) Status ¶
func (e *EDAS) Status(ctx context.Context, specObj interface{}) (apistructs.StatusDesc, error)
Status edas status of runtime
type ServiceSpec ¶
type ServiceSpec struct { Name string `json:"name"` Image string `json:"image"` Cmd string `json:"cmd"` Args string `json:"args"` // e.g. [{"argument":"-c"},{"argument":"test"}] Instances int `json:"instances"` CPU int `json:"cpu"` Mcpu int `json:"mcpu"` Mem int `json:"mem"` Ports []int `json:"ports"` LocalVolume string `json:"localVolume"` Envs string `json:"envs"` // e.g. [{"name":"testkey","value":"testValue"}] // e.g. {"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1,"tcpSocket":{"host":"", "port":8080}} Liveness string `json:"liveness"` // e.g. {"failureThreshold": 3,"initialDelaySeconds": 5,"successThreshold": 1,"timeoutSeconds": 1,"httpGet": {"path": "/consumer","port": 8080,"scheme": "HTTP","httpHeaders": [{"name": "test","value": "testvalue"}]}} Readiness string `json:"readiness"` }
Click to show internal directories.
Click to hide internal directories.