service

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ExpandStepTmplInfo   = "tmpl_info"
	ExpandStepBaseEnv    = "base_env"
	ExpandStepServiceEnv = "service_env"
	ExpandStepMount      = "mount"

	InstanceDeployStepBeforeDownload = "base_env"
	InstanceDeployStepDownloadExec   = "download_exec"
	InstanceDeployStepBeforeDeploy   = "before_deploy"
	InstanceDeployStepDeploy         = "deploy"
	InstanceDeployStepAfterDeploy    = "after_deploy"
)

Variables

This section is empty.

Functions

func InstanceAfterDeploy added in v0.3.0

func InstanceAfterDeploy(ctx context.Context, deployInfo *types.DeployInfo, tmplId int64, db *gorm.DB) (int64, error)

func InstanceBeforeDeploy added in v0.3.0

func InstanceBeforeDeploy(ctx context.Context, deployInfo *types.DeployInfo, tmplId int64, db *gorm.DB) (int64, error)

func InstanceBeforeDownload added in v0.3.0

func InstanceBeforeDownload(ctx context.Context, deployInfo *types.DeployInfo, tmplId int64, db *gorm.DB) (int64, error)

func InstanceDeploy added in v0.3.0

func InstanceDeploy(ctx context.Context, deployInfo *types.DeployInfo, tmplId int64, db *gorm.DB) (int64, error)

func InstanceDownloadExec added in v0.3.0

func InstanceDownloadExec(ctx context.Context, deployInfo *types.DeployInfo, tmplId int64, db *gorm.DB) (int64, error)

func IsAlibabaCloudAccountValid added in v0.1.1

func IsAlibabaCloudAccountValid(account config.AlibabaCloudAccount) bool

func RemoteCmdExec

func RemoteCmdExec(ctx context.Context, localCmd string, remoteScript string, ip, uname, pwd string) ([]byte, error)

RemoteCmdExec 复制 inScript 到 远端 OutScript 并执行 | todo 参数结构化

Types

type ActionSvc

type ActionSvc interface {
	ExecAct(ctx context.Context, args interface{}, act types.Action) (interface{}, error)
	// contains filtered or unexported methods
}

type BaseEnvInitAsyncSvcReq

type BaseEnvInitAsyncSvcReq struct {
	ServiceClusterId int64                 `json:"service_cluster_id"`
	TaskId           int64                 `json:"task_id"`
	Cmd              string                `json:"cmd"`
	InstanceList     []*types.InstanceInfo `json:"instance_list"`
	Auth             *types.InstanceAuth   `json:"auth"`
}

type BridgXSvc

type BridgXSvc struct {
	Expand          types.Action
	PoolQueryExpand types.Action
	Shrink          types.Action
	PoolQueryShrink types.Action
	GetCluster      types.Action
}

func GetBridgXSvcInst

func GetBridgXSvcInst() *BridgXSvc

func (*BridgXSvc) ExecAct

func (s *BridgXSvc) ExecAct(ctx context.Context, args interface{}, act types.Action) (resp interface{}, err error)

func (*BridgXSvc) RatePass

func (s *BridgXSvc) RatePass(rate string) bool

type BridgXSvcReq

type BridgXSvcReq struct {
	Count       int64
	ClusterName string
	TaskId      int64
	InstGroup   *nodeact.InstanceGroup
}

type BridgXSvcResp

type BridgXSvcResp struct {
	TaskId    int64
	InstGroup *nodeact.InstanceGroup
	Auth      *types.InstanceAuth
}

type CallBackNodeInitSvcReq

type CallBackNodeInitSvcReq struct {
	Instance *types.InstanceMeta `json:"instance"`
	Msg      string              `json:"msg"`
}

type ClusterInstanceCount added in v0.2.0

type ClusterInstanceCount struct {
	ServiceClusterName string `json:"service_cluster_name"`
	ServiceClusterId   int64  `json:"service_cluster_id"`
	InstanceCount      int    `json:"instance_count"`
}

type ClusterListResp added in v0.2.0

type ClusterListResp struct {
	ClusterList []ServiceClusterInfo `json:"cluster_list"`
}

type DeployAsyncReq added in v0.3.0

type DeployAsyncReq struct {
	ServiceClusterId int64                 `json:"service_cluster_id"`
	TaskId           int64                 `json:"task_id"`
	Cmd              string                `json:"cmd"`
	InstanceList     []*types.InstanceInfo `json:"instance_list"`
	Auth             *types.InstanceAuth   `json:"auth"`
}

type EnvService

type EnvService struct {
}

func GetEnvOpsSvcInst

func GetEnvOpsSvcInst() *EnvService

func (*EnvService) AfterDeployAsync added in v0.3.0

func (s *EnvService) AfterDeployAsync(ctx context.Context, svcReq *DeployAsyncReq) error

func (*EnvService) BaseEnvInitAsync

func (s *EnvService) BaseEnvInitAsync(ctx context.Context, svcReq *BaseEnvInitAsyncSvcReq) error

func (*EnvService) BaseEnvInitSingle

func (s *EnvService) BaseEnvInitSingle(ctx context.Context, taskId int64, inst *types.InstanceInfo, auth *types.InstanceAuth) error

func (*EnvService) BeforeDeployAsync added in v0.3.0

func (s *EnvService) BeforeDeployAsync(ctx context.Context, svcReq *DeployAsyncReq) error

func (*EnvService) CallBackSvc

func (s *EnvService) CallBackSvc(ctx context.Context, taskId int64, instId string, instStatus types.InstanceStatus, msg string) error

func (*EnvService) DeployAsync added in v0.3.0

func (s *EnvService) DeployAsync(ctx context.Context, svcReq *DeployAsyncReq) error

func (*EnvService) DeployBeforeDownloadInitAsync added in v0.3.0

func (s *EnvService) DeployBeforeDownloadInitAsync(ctx context.Context, svcReq *BaseEnvInitAsyncSvcReq) error

func (*EnvService) DeployBeforeDownloadInitSingle added in v0.3.0

func (s *EnvService) DeployBeforeDownloadInitSingle(ctx context.Context, taskId int64, cmd string, inst *types.InstanceInfo, auth *types.InstanceAuth) error

func (*EnvService) DeployDownloadAsync added in v0.3.0

func (s *EnvService) DeployDownloadAsync(ctx context.Context, svcReq *DeployAsyncReq) error

func (*EnvService) ExecCmdWithUpdateInstanceStatus added in v0.3.0

func (s *EnvService) ExecCmdWithUpdateInstanceStatus(ctx context.Context, taskId int64, cmd string, inst *types.InstanceInfo, auth *types.InstanceAuth, instanceStatus types.InstanceStatus) error

func (*EnvService) IsNotHttpOk

func (s *EnvService) IsNotHttpOk(res []byte) bool

func (*EnvService) IsNotRemoteCmdOk

func (s *EnvService) IsNotRemoteCmdOk(res []byte) bool

func (*EnvService) NodeUpdateDeploy added in v0.3.0

func (s *EnvService) NodeUpdateDeploy(ctx context.Context, instanceList []*types.InstanceInfo, taskId, serviceClusterId int64) error

func (*EnvService) NodeUpdateStore

func (s *EnvService) NodeUpdateStore(ctx context.Context, instanceList []*types.InstanceInfo, taskId, serviceClusterId int64) error

func (*EnvService) ServiceEnvInitAsync

func (s *EnvService) ServiceEnvInitAsync(ctx context.Context, svcReq *SvcEnvInitAsyncSvcReq) error

func (*EnvService) ServiceEnvInitSingle

func (s *EnvService) ServiceEnvInitSingle(ctx context.Context, taskId int64, inst *types.InstanceInfo, auth *types.InstanceAuth, params *types.ParamsServiceEnv, cmd string) error

type ExposeMountSvcReq

type ExposeMountSvcReq struct {
	TaskId       int64                 `json:"task_id"`
	InstanceList []*types.InstanceInfo `json:"instance_list"`
	MountType    string                `json:"mount_type"`
	MountValue   string                `json:"mount_value"`
}

type ExposeMountSvcResp

type ExposeMountSvcResp struct {
	TaskId       int64                 `json:"task_id"`
	InstanceList []*types.InstanceInfo `json:"instance_list"`
}

type ExposeUmountSvcReq

type ExposeUmountSvcReq struct {
	TaskId           int64  `json:"task_id"`
	ServiceClusterId int64  `json:"service_cluster_id"`
	Count            int64  `json:"count"`
	MountType        string `json:"mount_type"`
	MountValue       string `json:"mount_value"`
}

type ExposeUmountSvcResp

type ExposeUmountSvcResp struct {
	TaskId       int64                 `json:"task_id"`
	InstanceList []*types.InstanceInfo `json:"instance_list"`
}

type GetServiceByIpResponse added in v0.3.0

type GetServiceByIpResponse struct {
	ServiceName string `json:"service_name"`
	ClusterName string `json:"cluster_name"`
}

type InitServicSvcReq

type InitServicSvcReq struct {
	Cmd    string
	Params *types.ParamsServiceEnv
}

type InstanceCountResp added in v0.2.0

type InstanceCountResp struct {
	ServiceClusterList []ClusterInstanceCount `json:"service_cluster_list"`
}

type InstanceService added in v0.2.0

type InstanceService struct {
}

func GetInstanceService added in v0.2.0

func GetInstanceService() *InstanceService

func (*InstanceService) GetServiceByIp added in v0.3.0

func (s *InstanceService) GetServiceByIp(ctx context.Context, ip string) (*GetServiceByIpResponse, error)

func (*InstanceService) InstanceCountByCluster added in v0.2.0

func (s *InstanceService) InstanceCountByCluster(ctx context.Context, serviceName, serviceClusterName string, clusterId int64) (*InstanceCountResp, error)

type InstrSvc

type InstrSvc struct {
	BridgXExpand    types.Action
	BridgXShrink    types.Action
	NodeActInitBase types.Action
	NodeActInitSvc  types.Action
	MountSLB        types.Action
	UmountSLB       types.Action
	MountNginx      types.Action
	UmountNginx     types.Action

	NodeActBeforeDownload types.Action //before download
	NodeActDownload       types.Action //download executable file
	NodeActBeforeDeploy   types.Action //before deploy
	NodeActDeploy         types.Action //deploy
	NodeActAfterDeploy    types.Action //after deploy
}

func GetInstrSvcInst

func GetInstrSvcInst() *InstrSvc

func (*InstrSvc) CreateBaseEnvInstr

func (s *InstrSvc) CreateBaseEnvInstr(ctx context.Context, args *types.BaseEnv, tmpId int64, needReverse bool, dbo *gorm.DB) (int64, int64, error)

func (*InstrSvc) CreateBridgxExpandInstr

func (s *InstrSvc) CreateBridgxExpandInstr(ctx context.Context, tmplId int64, revTmplId int64, needReverse bool, dbo *gorm.DB) (int64, int64, error)

func (*InstrSvc) CreateBridgxShrinkInstr

func (s *InstrSvc) CreateBridgxShrinkInstr(ctx context.Context, tmplId int64, dbo *gorm.DB) (int64, error)

func (*InstrSvc) CreateInstanceAfterDeploy added in v0.3.0

func (s *InstrSvc) CreateInstanceAfterDeploy(ctx context.Context, args *types.DeployInfo, tmpId int64, dbo *gorm.DB) (int64, error)

func (*InstrSvc) CreateInstanceBeforeDeploy added in v0.3.0

func (s *InstrSvc) CreateInstanceBeforeDeploy(ctx context.Context, args *types.DeployInfo, tmpId int64, dbo *gorm.DB) (int64, error)

func (*InstrSvc) CreateInstanceBeforeDownload added in v0.3.0

func (s *InstrSvc) CreateInstanceBeforeDownload(ctx context.Context, args *types.DeployInfo, tmpId int64, dbo *gorm.DB) (int64, error)

func (*InstrSvc) CreateInstanceDeploy added in v0.3.0

func (s *InstrSvc) CreateInstanceDeploy(ctx context.Context, args *types.DeployInfo, tmpId int64, dbo *gorm.DB) (int64, error)

func (*InstrSvc) CreateInstanceDownloadExec added in v0.3.0

func (s *InstrSvc) CreateInstanceDownloadExec(ctx context.Context, args *types.DeployInfo, tmpId int64, dbo *gorm.DB) (int64, error)

func (*InstrSvc) CreateMountSlbInstr

func (s *InstrSvc) CreateMountSlbInstr(ctx context.Context, args *types.ParamsMount, tmplId, revTmplId int64, needReverse bool, dbo *gorm.DB) (int64, int64, error)

func (*InstrSvc) CreateServiceEnvInstr

func (s *InstrSvc) CreateServiceEnvInstr(ctx context.Context, args *types.ServiceEnv, tmplId int64, needReverse bool, dbo *gorm.DB) (int64, int64, error)

func (*InstrSvc) CreateUMountSlbInstr

func (s *InstrSvc) CreateUMountSlbInstr(ctx context.Context, args *types.ParamsMount, tmplId int64, dbo *gorm.DB) (int64, error)

func (*InstrSvc) ExecAct

func (s *InstrSvc) ExecAct(ctx context.Context, args interface{}, act types.Action) (svcResp interface{}, err error)

type InstrSvcReq

type InstrSvcReq struct {
	ServiceName      string
	ServiceClusterId int64
	ScheduleTaskId   int64
	InstrId          int64
	Instruction      *db.Instruction
	BridgXSvcReq     *BridgXSvcReq
	NodeActSvcReq    *NodeActSvcReq
}

type InstrSvcResp

type InstrSvcResp struct {
	BridgXSvcResp  *BridgXSvcResp
	NodeActSvcResp *NodeActSvcResp
}

type IntegrationService added in v0.3.0

type IntegrationService struct {
	ZadigToken string
	HttpClient *resty.Client
}

func GetIntegrationService added in v0.3.0

func GetIntegrationService() *IntegrationService

func (*IntegrationService) GetZadigHost added in v0.3.0

func (s *IntegrationService) GetZadigHost(ctx context.Context) string

func (*IntegrationService) GetZadigToken added in v0.3.0

func (s *IntegrationService) GetZadigToken() string

type MountService

type MountService struct {
}

func GetMountSvcInst

func GetMountSvcInst() *MountService

func (*MountService) Mount

func (*MountService) Umount

type NodeActSvc

type NodeActSvc struct {
	InitBase             types.Action
	InitService          types.Action
	MountSlb             types.Action
	UmountSlb            types.Action
	PollQueryInitBase    types.Action
	PollQueryInitService types.Action
}

func GetNodeActSvcInst

func GetNodeActSvcInst() *NodeActSvc

func (*NodeActSvc) ExecAct

func (s *NodeActSvc) ExecAct(ctx context.Context, args interface{}, act types.Action) (svcResp interface{}, err error)

func (*NodeActSvc) InitBaseAction

func (s *NodeActSvc) InitBaseAction(ctx context.Context, instGroup *nodeact.InstanceGroup, auth *types.InstanceAuth, serviceClusterId int64) (*NodeActSvcResp, error)

func (*NodeActSvc) InitServiceAction

func (s *NodeActSvc) InitServiceAction(ctx context.Context, instGroup *nodeact.InstanceGroup, auth *types.InstanceAuth, svcReq *InitServicSvcReq, serviceClusterId int64) (*NodeActSvcResp, error)

func (*NodeActSvc) MountInstAction

func (s *NodeActSvc) MountInstAction(ctx context.Context, instGroup *nodeact.InstanceGroup, slbMountInfo *nodeact.ParamsMountInfo) (*ExposeMountSvcResp, error)

func (*NodeActSvc) PollQueryBaseNode

func (s *NodeActSvc) PollQueryBaseNode(ctx context.Context, taskId int64) (*NodeActSvcResp, error)

func (*NodeActSvc) PoolQueryServiceNode

func (s *NodeActSvc) PoolQueryServiceNode(ctx context.Context, taskId int64) (*NodeActSvcResp, error)

func (*NodeActSvc) RatePass

func (s *NodeActSvc) RatePass(rate string) bool

func (*NodeActSvc) UmountInstAction

func (s *NodeActSvc) UmountInstAction(ctx context.Context, taskId, serviceClusterId int64, umountSlbSvcReq *UmountSlbSvcReq) (*ExposeUmountSvcResp, error)

type NodeActSvcReq

type NodeActSvcReq struct {
	InstGroup        *nodeact.InstanceGroup
	TaskId           int64
	ServiceClusterId int64
	DownloadFileUrl  string
	InstanceCount    int64
	Auth             *types.InstanceAuth
	//HarborRegisterUrl string // harbor 镜像服务地址,用于加入 docker 的配置允许 http 链接
	InitServicSvcReq *InitServicSvcReq
	//Params          *nodeact.ParamsServiceEnv
	SlbMountInfo    *nodeact.ParamsMountInfo // 用于挂载 slb 的服务器组 id
	UmountSlbSvcReq *UmountSlbSvcReq
}

type NodeActSvcResp

type NodeActSvcResp struct {
	InstGroup *nodeact.InstanceGroup
	Auth      *types.InstanceAuth
}

type NodeService

type NodeService struct {
}

func GetNodeSvcInst

func GetNodeSvcInst() *NodeService

func (*NodeService) UpdateNode

func (s *NodeService) UpdateNode(ctx context.Context, svcReq *CallBackNodeInitSvcReq) error

type ScheduleSvc

type ScheduleSvc struct {
	Expand types.Action
	Shrink types.Action
	Deploy types.Action
}

func GetScheduleSvcInst

func GetScheduleSvcInst() *ScheduleSvc

func (*ScheduleSvc) ExecAct

func (s *ScheduleSvc) ExecAct(ctx context.Context, args interface{}, act types.Action) (svcResp interface{}, err error)

type ScheduleSvcReq

type ScheduleSvcReq struct {
	ServiceExpandSvcReq *ServiceExpandSvcReq
	ServiceShrinkSvcReq *ServiceShrinkSvcReq
	ServiceDeploySvcReq *ServiceDeploySvcReq
	InstrId             int64
}

type ScheduleSvcResp

type ScheduleSvcResp struct {
	ServiceExpandSvcResp *ServiceExpandSvcResp
	ServiceShrinkSvcResp *ServiceShrinkSvcResp
	ServiceDeploySvcResp *ServiceDeploySvcResp
}

type ServiceClusterInfo added in v0.2.0

type ServiceClusterInfo struct {
	ServiceClusterId   int64  `json:"service_cluster_id"`
	ServiceCluster     string `json:"service_cluster"`
	BridgxCluster      string `json:"bridgx_cluster"`
	InstanceCount      int64  `json:"instance_count"`
	InstanceTypeDesc   string `json:"instance_type_desc"`
	Provider           string `json:"provider"`
	ComputingPowerType string `json:"computing_power_type"`
	ChargeType         string `json:"charge_type"`
}

type ServiceCreateSvcRequest

type ServiceCreateSvcRequest struct {
	ServiceInfo *types.ServiceInfo `json:"service_info"`
}

type ServiceCreateSvcResponse

type ServiceCreateSvcResponse struct {
	ServiceClusterId int64 `json:"service_cluster_id"`
}

type ServiceDeploySvcReq added in v0.3.0

type ServiceDeploySvcReq struct {
	ServiceClusterId int64  `json:"service_cluster_id'"`
	DownloadFileUrl  string `json:"download_file_url"`
	Count            int64  `json:"count"`
	ExecType         string `json:"exec_type"`
	Rollback         bool   `json:"rollback"`
}

type ServiceDeploySvcResp added in v0.3.0

type ServiceDeploySvcResp struct {
	TaskId int64 `json:"task_id"`
}

type ServiceExpandSvcReq

type ServiceExpandSvcReq struct {
	ServiceClusterId int64  `json:"service_cluster_id'"`
	Count            int64  `json:"count"`
	ExecType         string `json:"exec_type"`
}

type ServiceExpandSvcResp added in v0.1.1

type ServiceExpandSvcResp struct {
	TaskId int64 `json:"task_id"`
}

type ServiceShrinkSvcReq

type ServiceShrinkSvcReq struct {
	ServiceClusterId int64  `json:"service_cluster_id'"`
	Count            int64  `json:"count"`
	ExecType         string `json:"exec_type"` // manual | auto
}

type ServiceShrinkSvcResp added in v0.1.1

type ServiceShrinkSvcResp struct {
	TaskId int64 `json:"task_id"`
}

type ServiceSvc

type ServiceSvc struct {
}

func GetServiceIns

func GetServiceIns() *ServiceSvc

func (*ServiceSvc) CreateService

func (*ServiceSvc) Delete added in v0.3.0

func (s *ServiceSvc) Delete(ctx context.Context, ids []int64) error

func (*ServiceSvc) Detail

func (s *ServiceSvc) Detail(ctx context.Context, serviceName string) (map[string]interface{}, error)

func (*ServiceSvc) GetExpandHistory

func (s *ServiceSvc) GetExpandHistory(ctx context.Context, page, pageSize, serviceClusterId int) (map[string]interface{}, error)

func (*ServiceSvc) GetServiceClusterList added in v0.2.0

func (s *ServiceSvc) GetServiceClusterList(ctx context.Context, serviceName string) (*ClusterListResp, error)

func (*ServiceSvc) GetServiceList

func (s *ServiceSvc) GetServiceList(ctx context.Context, page, pageSize int, serviceName, lang string) (map[string]interface{}, error)

func (*ServiceSvc) Update added in v0.3.0

func (s *ServiceSvc) Update(ctx context.Context, serviceName, description, domain, port, gitRepo string) (map[string]interface{}, error)

type SvcEnvInitAsyncSvcReq

type SvcEnvInitAsyncSvcReq struct {
	ServiceClusterId int64                   `json:"service_cluster_id"`
	TaskId           int64                   `json:"task_id"`
	InstanceList     []*types.InstanceInfo   `json:"instance_list"`
	Auth             *types.InstanceAuth     `json:"auth"`
	Params           *types.ParamsServiceEnv `json:"params"`
	Cmd              string                  `json:"string"`
}

type TaskDeployInfo added in v0.3.0

type TaskDeployInfo struct {
	DownloadFileUrl string `json:"download_file_url"`
}

type TaskDescribeSvcReq

type TaskDescribeSvcReq struct {
	TaskId         int64                `json:"task_id"`
	InstanceStatus types.InstanceStatus `json:"instance_status"`
}

type TaskDescribeSvcResp

type TaskDescribeSvcResp struct {
	TaskDescribe *types.TaskDescribe `json:"task_describe"`
}

type TaskDetail added in v0.3.0

type TaskDetail struct {
	ServiceName       string `json:"service_name"`
	ClusterName       string `json:"cluster_name"`
	BridgXClusterName string `json:"bridgx_cluster_name"`
	DeployFileUrl     string `json:"deploy_file_url"`
	Operator          string `json:"operator"`
	CreateTime        string `json:"create_time"`
	RunningTaskId     string `json:"running_task_id"`
}

type TaskInfoSvcReq added in v0.1.1

type TaskInfoSvcReq struct {
	TaskId int64 `json:"task_id"`
}

type TaskInfoSvcResp added in v0.1.1

type TaskInfoSvcResp struct {
	TaskInfo *types.TaskInfo `json:"task_info"`
}

type TaskInstancesSvcReq

type TaskInstancesSvcReq struct {
	TaskId         int64                `json:"task_id"`
	InstanceStatus types.InstanceStatus `json:"instance_status"`
	PageNumber     int                  `json:"page_number"`
	PageSize       int                  `json:"page_size"`
}

type TaskInstancesSvcResp

type TaskInstancesSvcResp struct {
	InstancesList []*types.Instance `json:"instances_list"`
	Pager         *types.Pager      `json:"pager"`
}

type TaskService

type TaskService struct {
}

func GetTaskSvcInst

func GetTaskSvcInst() *TaskService

func (*TaskService) Describe

func (*TaskService) GetRunningTask added in v0.3.0

func (s *TaskService) GetRunningTask(ctx context.Context, serviceClusterId, taskId int64) (*TaskDetail, error)

func (*TaskService) HasRunningTask added in v0.2.0

func (s *TaskService) HasRunningTask(ctx context.Context, serviceName, clusterName string) (bool, error)

func (*TaskService) Info added in v0.1.1

func (s *TaskService) Info(ctx context.Context, svcReq *TaskInfoSvcReq) (*TaskInfoSvcResp, error)

func (*TaskService) InstanceList added in v0.1.1

func (s *TaskService) InstanceList(ctx context.Context, page, pageSize int, taskId int64, taskStatus types.InstanceStatus) (int64, []types.InstInfoResp, error)

func (*TaskService) Instances

type TemplateSvc

type TemplateSvc struct {
	Create types.Action
	Info   types.Action
	Update types.Action
}

func GetTemplateSvcInst

func GetTemplateSvcInst() *TemplateSvc

func (*TemplateSvc) Delete

func (s *TemplateSvc) Delete(ctx context.Context, tmpExpandIds []int64) (int64, error)

func (*TemplateSvc) ExecAct

func (s *TemplateSvc) ExecAct(ctx context.Context, args interface{}, act types.Action) (svcResp interface{}, err error)

func (*TemplateSvc) InfoAction

func (s *TemplateSvc) InfoAction(ctx context.Context, svcReq *TmplInfoSvcReq) (*TemplateSvcResp, error)

func (*TemplateSvc) List

func (s *TemplateSvc) List(ctx context.Context, serviceName string, page, pageSize, serviceClusterId int) (map[string]interface{}, error)

func (*TemplateSvc) ListDeployTemplates added in v0.3.0

func (s *TemplateSvc) ListDeployTemplates(ctx context.Context, serviceName string, page, pageSize, serviceClusterId int) (map[string]interface{}, error)

func (*TemplateSvc) UpdateAction

func (s *TemplateSvc) UpdateAction(ctx context.Context, svcReq *TmplUpdateSvcReq) (*TemplateSvcResp, error)

func (*TemplateSvc) UpdateContainerTemplate added in v0.3.0

func (s *TemplateSvc) UpdateContainerTemplate(ctx context.Context, svcReq *TmplUpdateSvcReq) (*TemplateSvcResp, error)

func (*TemplateSvc) UpdateInstanceTemplate added in v0.3.0

func (s *TemplateSvc) UpdateInstanceTemplate(ctx context.Context, svcReq *TmplUpdateSvcReq) (*TemplateSvcResp, error)

type TemplateSvcReq

type TemplateSvcReq struct {
	TmplExpandSvcReq *TmplExpandSvcReq
	TmplInfoSvcReq   *TmplInfoSvcReq
	TmplUpdateSvcReq *TmplUpdateSvcReq
}

type TemplateSvcResp

type TemplateSvcResp struct {
	TmplExpandSvcResp *TmplExpandSvcResp
	TmplInfoSvcResp   *TmplInfoSvcResp
	TmplUpdateSvcResp *TmplUpdateSvcResp
}

type TmplDeployReq added in v0.3.0

type TmplDeployReq struct {
	TmplInfo   *types.TmpInfo    `json:"tmpl_info"`
	DeployInfo *types.DeployInfo `json:"deploy_info"`
}

type TmplExpandSvcReq

type TmplExpandSvcReq struct {
	EndStep    string             `json:"end_step"`
	TmplInfo   *types.TmpInfo     `json:"tmpl_info"`
	BaseEnv    *types.BaseEnv     `json:"base_env"`
	ServiceEnv *types.ServiceEnv  `json:"service_env"`
	DeployInfo *types.DeployInfo  `json:"deploy_info"`
	Mount      *types.ParamsMount `json:"mount"`
}

type TmplExpandSvcResp

type TmplExpandSvcResp struct {
	TmplId       string `json:"tmpl_id"`
	DeployTmplId string `json:"deploy_tmpl_id"`
}

type TmplInfoSvcReq

type TmplInfoSvcReq struct {
	TmplExpandId int64 `json:"tmpl_expand_id"`
}

type TmplInfoSvcResp

type TmplInfoSvcResp struct {
	TmplInfo   *types.TmpInfo     `json:"tmpl_info"`
	BaseEnv    *types.BaseEnv     `json:"base_env"`
	ServiceEnv *types.ServiceEnv  `json:"service_env"`
	Mount      *types.ParamsMount `json:"mount"`
	DeployInfo *types.DeployInfo  `json:"deploy_info"`
}

type TmplUpdateSvcReq

type TmplUpdateSvcReq struct {
	TmplExpandId int64              `json:"tmpl_expand_id"`
	EndStep      string             `json:"end_step"`
	TmplInfo     *types.TmpInfo     `json:"tmpl_info"`
	BaseEnv      *types.BaseEnv     `json:"base_env"`
	ServiceEnv   *types.ServiceEnv  `json:"service_env"`
	Mount        *types.ParamsMount `json:"mount"`
	DeployInfo   *types.DeployInfo  `json:"deploy_info"`
}

type TmplUpdateSvcResp

type TmplUpdateSvcResp struct {
	TmplExpandId int64 `json:"tmpl_expand_id"`
}

type UmountSlbSvcReq

type UmountSlbSvcReq struct {
	UmountInstCnt int64                    `json:"umount_inst_cnt"`
	SlbInfo       *nodeact.ParamsMountInfo `json:"slb_info"`
}

type ZadigResp added in v0.3.0

type ZadigResp struct {
	Token string `json:"token"`
}

type ZadigSvc added in v0.3.0

type ZadigSvc struct {
}

func GetZadigSvcInst added in v0.3.0

func GetZadigSvcInst() *ZadigSvc

func (*ZadigSvc) GetWorkflowTasks added in v0.3.0

func (s *ZadigSvc) GetWorkflowTasks(ctx context.Context, serviceName, workflowName, fileType string, pageNum, pageSize int) (int, []*zadigcli.WorkflowTaskResp, error)

func (*ZadigSvc) GetWorkflows added in v0.3.0

func (s *ZadigSvc) GetWorkflows(ctx context.Context, serviceName string) ([]*zadigcli.WorkflowResp, error)

Jump to

Keyboard shortcuts

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