edas

package
v1.0.0-RC Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2021 License: AGPL-3.0 Imports: 35 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 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 AppState

type AppState int

AppState app state

const (
	APP_STATE_AGENT_OFF              AppState = 0
	APP_STATE_STOPPED                AppState = 1
	APP_STATE_RUNNING_BUT_URL_FAILED AppState = 3
	APP_STATE_RUNNING                AppState = 7
)

type AppStatus

type AppStatus string

AppStatus app status

const (
	AppStatusRunning   AppStatus = "Running"
	AppStatusDeploying AppStatus = "Deploying"
	AppStatusStopped   AppStatus = "Stopped"
	AppStatusFailed    AppStatus = "Failed"
	AppStatusUnknown   AppStatus = "Unknown"
)

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) Cancel

func (e *EDAS) Cancel(ctx context.Context, specObj interface{}) (interface{}, error)

func (*EDAS) CapacityInfo

func (e *EDAS) CapacityInfo() apistructs.CapacityInfoData

func (*EDAS) CleanUpBeforeDelete

func (*EDAS) CleanUpBeforeDelete()

func (*EDAS) Create

func (e *EDAS) Create(ctx context.Context, specObj interface{}) (interface{}, error)

Create edas create runtime

func (*EDAS) Destroy

func (e *EDAS) Destroy(ctx context.Context, specObj interface{}) error

Destroy edas destory runtime

func (*EDAS) Inspect

func (e *EDAS) Inspect(ctx context.Context, specObj interface{}) (interface{}, error)

Inspect Query runtime information

func (*EDAS) JobVolumeCreate

func (*EDAS) JobVolumeCreate(ctx context.Context, spec interface{}) (string, error)

func (*EDAS) KillPod

func (*EDAS) KillPod(podname string) error

func (*EDAS) Kind

func (e *EDAS) Kind() executortypes.Kind

Kind executor kind

func (*EDAS) Name

func (e *EDAS) Name() executortypes.Name

Name executor name

func (*EDAS) Precheck

func (e *EDAS) Precheck(ctx context.Context, specObj interface{}) (apistructs.ServiceGroupPrecheckData, error)

func (*EDAS) Remove

func (e *EDAS) Remove(ctx context.Context, specObj interface{}) error

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

func (*EDAS) Update

func (e *EDAS) Update(ctx context.Context, specObj interface{}) (interface{}, error)

Update edas update runtime

func (*EDAS) WaitEvent

func (m *EDAS) WaitEvent(lstore *sync.Map, stopCh chan struct{})

Currently edas does not use an event-driven mechanism, so it uses polling to simulate each time

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"`
}

type SlbType

type SlbType string

SlbType slb type

const (
	EDAS_SLB_INTERNAL SlbType = "intranet"
	EDAS_SLB_EXTERNAL SlbType = "internet"
)

type TaskState

type TaskState int

TaskState task state

const (
	TASK_STATE_UNKNOWN TaskState = iota
	TASK_STATE_PROCESSING
	TASK_STATE_SUCCESS
	TASK_STATE_FAILED
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL