types

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InstrRecStatusRunning = "RUNNING"
	InstrRecStatusSucc    = "SUCC"
	InstrRecStatusFail    = "FAIL"
)
View Source
const (
	TaskStatusInit    = "INIT"
	TaskStatusRunning = "RUNNING"
	TaskStatusSuccess = "SUCC"
	TaskStatusFail    = "FAIL"
)
View Source
const (
	//扩容
	TaskExpand = "expand"
	//缩容
	TaskShrink = "shrink"
)
View Source
const (
	TaskStepInit             = "INIT"
	TaskStepBridgxExpandInit = "BRIDGX_EXPAND_INIT"
	TaskStepBridgxShrinkInit = "BRIDGX_SHRINK_INIT"
	TaskStepBridgxExpandSucc = "BRIDGX_EXPAND_SUCC"
	TaskStepBridgxShrinkSucc = "BRIDGX_SHRINK_SUCC"
	TaskStepBaseEnvInit      = "BASE_ENV_INIT"
	TaskStepBaseEnvSucc      = "BASE_ENV_SUCC"
	TaskStepSvcEnvInit       = "SVC_ENV_INIT"
	TaskStepSvcEnvSucc       = "SVC_ENV_SUCC"
	TaskStepMountInit        = "MOUNT_INIT"
	TaskStepUmountInit       = "UMOUNT_INIT"
	TaskStepMountSucc        = "MOUNT_SUCC"
	TaskStepUmountSucc       = "UMOUNT_SUCC"
)
View Source
const (
	NodeactTaskId = "nodeact_task_id"
	BridgXTaskId  = "bridgx_task_id"
)
View Source
const (
	MountValueALB   = "slb"
	MountValueNginx = "nginx"
)
View Source
const (
	ENVInt       = "nodeact.initbase" //环境初始化
	SERVICEInt   = "nodeact.initsvc"  // 服务初始化
	MountTypeSLB = "mount.slb"        //挂载slb
)

Variables

View Source
var TaskStatusDesc = func(TaskStep string) string {
	if v, ok := TaskStatusDescMap[TaskStep]; ok {
		return v
	}
	return "UnKnown"
}
View Source
var TaskStatusDescMap = map[string]string{
	TaskStatusInit:    "已创建",
	TaskStatusRunning: "进行中",
	TaskStatusSuccess: "成功",
	TaskStatusFail:    "失败",
}
View Source
var TaskStepDesc = func(TaskStep string) string {
	if v, ok := TaskStepDescMap[TaskStep]; ok {
		return v
	}
	return "UnKnown"
}
View Source
var TaskStepDescMap = map[string]string{
	TaskStepInit:             "待执行",
	TaskStepBridgxExpandInit: "计算资源扩容",
	TaskStepBridgxShrinkInit: "计算资源缩容",
	TaskStepBridgxExpandSucc: "计算资源已获取",
	TaskStepBridgxShrinkSucc: "计算资源已缩容",
	TaskStepBaseEnvInit:      "基础环境搭建",
	TaskStepBaseEnvSucc:      "基础环境搭建成功",
	TaskStepSvcEnvInit:       "服务搭建",
	TaskStepSvcEnvSucc:       "服务搭建成功",
	TaskStepMountInit:        "执行实例挂载",
	TaskStepUmountInit:       "执行实例卸载",
	TaskStepMountSucc:        "实例挂载成功",
	TaskStepUmountSucc:       "实例卸载成功",
}

Functions

This section is empty.

Types

type Action

type Action string

type BaseEnv

type BaseEnv struct {
	IsContainer bool `json:"is_container"`
}

type InstInfoResp added in v0.1.1

type InstInfoResp struct {
	InstanceId string         `json:"instance_id"`
	IpInner    string         `json:"ip_inner"`
	IpOuter    string         `json:"ip_outer"`
	Status     InstanceStatus `json:"instance_status"`
}

type Instance

type Instance struct {
	InstanceId string         `json:"instance_id"`
	IpInner    string         `json:"ip_inner"`
	IpOuter    string         `json:"ip_outer"`
	CreateAt   string         `json:"create_at"`
	Status     InstanceStatus `json:"status"`
}

type InstanceAuth

type InstanceAuth struct {
	UserName string `json:"user_name"`
	Pwd      string `json:"pwd"`
}

type InstanceInfo

type InstanceInfo struct {
	IpInner    string `json:"ip_inner"`
	IpOuter    string `json:"ip_outer"`
	InstanceId string `json:"instance_id"`
}

type InstanceMeta

type InstanceMeta struct {
	TaskId         int64          `json:"task_id"`
	InstanceId     string         `json:"instance_id"`
	InstanceStatus InstanceStatus `json:"instance_status"`
}

type InstanceStatus

type InstanceStatus string
var (
	InstanceStatusInit    InstanceStatus = "INIT"    //初始
	InstanceStatusBase    InstanceStatus = "BASE"    // base 环境已完成
	InstanceStatusSvc     InstanceStatus = "SVC"     // service 环境已完成
	InstanceStatusALB     InstanceStatus = "ALB"     // 后端挂载alb
	InstanceStatusUNALB   InstanceStatus = "UNALB"   // 后端卸载alb
	InstanceStatusFail    InstanceStatus = "FAIL"    // 异常、失败
	InstanceStatusDeleted InstanceStatus = "DELETED" // 已缩容
)

type Pager

type Pager struct {
	PagerNum  int `json:"pager_num"`
	PagerSize int `json:"pager_size"`
	Total     int `json:"total"`
}

type ParamsMount

type ParamsMount struct {
	MountType  string `json:"mount_type"`
	MountValue string `json:"mount_value"`
}

type ParamsServiceEnv

type ParamsServiceEnv struct {
	ImageStorageType string `json:"image_storage_type"`
	ImageUrl         string `json:"image_url"`
	ServiceName      string `json:"service_name"`
	Port             int64  `json:"port"`
	Account          string `json:"account"`
	Password         string `json:"password"`
}

ParamsServiceEnv ImageInfo 镜像信息

type RelationTaskId added in v0.2.0

type RelationTaskId struct {
	NodeActTaskId int64 `json:"nodeact_task_id"`
	BridgXTaskId  int64 `json:"bridgx_task_id"`
}

type ServiceEnv

type ServiceEnv struct {
	ImageStorageType string `json:"image_storage_type"`
	ImageUrl         string `json:"image_url"`
	Port             int64  `json:"port"`
	Account          string `json:"account"`
	Password         string `json:"password"`
	Cmd              string `json:"cmd"`
	ServiceName      string `json:"service_name"`
}

type ServiceInfo

type ServiceInfo struct {
	ServiceName string `json:"service_name"`
	Description string `json:"description"`
	Language    string `json:"language"`
}

type TaskDescribe

type TaskDescribe struct {
	FoundTime   *time.Time `json:"found_time"`
	TotalNum    int64      `json:"total_num"`
	SuccessNum  int64      `json:"success_num"`
	FailNum     int64      `json:"fail_num"`
	SuccessRate string     `json:"success_rate"`
}

type TaskInfo added in v0.1.1

type TaskInfo struct {
	TaskStatus string `json:"task_status"`
	TaskStep   string `json:"task_step"`
	InstCnt    int64  `json:"inst_cnt"`
	Msg        string `json:"msg"`
	Operator   string `json:"operator"`
	ExecType   string `json:"exec_type"`
}

type TmpInfo

type TmpInfo struct {
	TmplName         string `json:"tmpl_name"`
	ServiceClusterId int64  `json:"service_cluster_id"`
	Describe         string `json:"describe"`
	BridgxClusname   string `json:"bridgx_clusname"`
}

Jump to

Keyboard shortcuts

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