Documentation
¶
Index ¶
- Constants
- Variables
- type CreateAppNetwork
- type CreateEdgeApplicationReq
- type CreateEdgeApplicationRsp
- type DeleteEdgeApplicationReq
- type DeleteEdgeApplicationRsp
- type DeleteEdgeApplicationVersionReq
- type DeleteEdgeApplicationVersionRsp
- type DeployEdgeApplicationReq
- type DeployEdgeApplicationRsp
- type DescribeEdgeAppVersionReq
- type DescribeEdgeAppVersionRsp
- type DescribeEdgeApplicationReq
- type DescribeEdgeApplicationRsp
- type ListEdgeAppDeployReq
- type ListEdgeAppDeployRsp
- type ListEdgeApplicationReq
- type ListEdgeApplicationRsp
- type ListEdgeApplicationVersionReq
- type ListEdgeApplicationVersionRsp
- type ListNodeCanDeployReq
- type ListNodeCanDeployRsp
- type ListNodeDeployReq
- type ListNodeDeployRsp
- type OfflineEdgeApplicationVersionReq
- type OfflineEdgeApplicationVersionRsp
- type PortMapping
- type PublishEdgeApplicationVersionReq
- type PublishEdgeApplicationVersionRsp
- type UnDeployEdgeApplicationReq
- type UnDeployEdgeApplicationRsp
Constants ¶
const ( StatusUnPublished string = "UnPublished" StatusPublished string = "Published" )
application status
const ( AppStatusUnpublished string = "Unpublished" AppStatusPublished string = "Published" AppStatusOffline string = "Offline" )
application status
const ( StatusInit string = "Init" StatusDeploying string = "Deploying" StatusRunning string = "Running" StatusUpdateInit string = "UpdateInit" StatusAbnormal string = "Abnormal" StatusDeleting string = "Deleting" )
deploy status
const ( AppUserDefine string = "UserDefine" AppSysDefine string = "System" AppTypeAll string = "All" )
const ( RestartPolicyAlways string = "Always" RestartPolicyOnFailure string = "OnFailure" RestartPolicyNever string = "Never" )
restart policy
const ( NetworkTypeHost string = "Host" NetworkTypePortMapping string = "PortMapping" )
network type
const (
DefaultNamespace string = "default"
)
const (
TransferCountEach int = 10
)
for ticker
Variables ¶
var ( ErrDeployExist = errors.New("application deploy exist") ErrApplicationExist = errors.New("application exist") ErrApplicationVersionExist = errors.New("application version exist") ErrImageVersionNotExist = errors.New("image version not exist") ErrUnDeploying = errors.New("undeploying") ErrChangeAppVersionFailed = errors.New("change app version fail") ErrDeleteStatusNotOffline = errors.New("delete failed! status not offline") ErrDeleteStatusPublished = errors.New("delete failed! status is published") ErrDeployStatusNotPublished = errors.New("deploy failed! status not published") ErrWrongRestartPolicy = errors.New("wrong restart policy") ErrNetworkPortmappingEmpty = errors.New("need port mapping") ErrDeployPartFails = errors.New("part of deploy fails") ErrDeployAllFails = errors.New("all of deploy fails") ErrUpdatePartFails = errors.New("part of deploy update fails") ErrUpdateAllFails = errors.New("all of deploy update fails") ErrUnDeployPartFails = errors.New("part of undeploy fails") ErrUnDeployAllFails = errors.New("all of undeploy fails") )
Functions ¶
This section is empty.
Types ¶
type CreateAppNetwork ¶
type CreateAppNetwork struct { Type string `json:"type" validate:"required,oneof=Host PortMapping"` PortMappings []PortMapping `json:"portMappings"` }
type CreateEdgeApplicationReq ¶
type CreateEdgeApplicationReq struct { AppName string `json:"appName"` FunctionType string `json:"functionType"` Description string `json:"description"` ArchType []string `json:"archType" validate:"required"` Version string `json:"version"` OrgName string `json:"orgName"` ContainerImage string `json:"containerImage"` ContainerImageVersion string `json:"containerImageVersion"` CpuQuota float32 `json:"cpuQuota"` MaxCpuQuota float32 `json:"maxCpuQuota"` MemoryQuota float32 `json:"memoryQuota"` MaxMemoryQuota float32 `json:"maxMemoryQuota"` RestartPolicy string `json:"restartPolicy" validate:"required,oneof=Always OnFailure Never"` Network CreateAppNetwork `json:"network" validate:"required"` }
Create edge application ////////////////////////////////////////////////////////
type DeleteEdgeApplicationReq ¶
type DeleteEdgeApplicationReq struct {
AppName string `json:"appName"`
}
Delete edge application ///////////////////////////////////////////////////////
type DeleteEdgeApplicationRsp ¶
type DeleteEdgeApplicationRsp struct { }
type DeleteEdgeApplicationVersionReq ¶
type DeleteEdgeApplicationVersionReq struct { AppName string `json:"appName"` Version string `json:"version"` }
Delete edge application version
type DeleteEdgeApplicationVersionRsp ¶
type DeleteEdgeApplicationVersionRsp struct { }
type DeployEdgeApplicationReq ¶
type DeployEdgeApplicationReq struct { AppName string `json:"appName" validate:"required"` NodeNames []string `json:"nodeNames" validate:"required"` Version string `json:"version" validate:"required"` }
Deploy edge application
type DeployEdgeApplicationRsp ¶
type DeployEdgeApplicationRsp struct { }
type DescribeEdgeAppVersionReq ¶
type DescribeEdgeAppVersionReq struct { AppName string `json:"name" validate:"required"` Version string `json:"version" validate:"required"` }
///// Describe edge application version
type DescribeEdgeAppVersionRsp ¶
type DescribeEdgeAppVersionRsp struct {
AppVersion *appentity.ApplicationVersionInfo `json:"appVersion"`
}
type DescribeEdgeApplicationReq ¶
type DescribeEdgeApplicationReq struct {
AppName string `json:"name"`
}
Describe edge application ///////////////////////////////////////////////////////
type DescribeEdgeApplicationRsp ¶
type DescribeEdgeApplicationRsp struct {
App *appentity.ApplicationBasicInfo `json:"app"`
}
type ListEdgeAppDeployReq ¶
type ListEdgeAppDeployReq struct { AppName string `json:"appName" validate:"required"` Version string `json:"version" validate:"required"` PageNum int `json:"pageNum" validate:"required,gte=1,lte=1000"` PageSize int `json:"pageSize" validate:"required,gte=1,lte=1000"` }
List deploy
type ListEdgeAppDeployRsp ¶
type ListEdgeAppDeployRsp struct { Total int AppDeploys *[]appentity.ApplicationDeployInfo `json:"appDeploys"` }
type ListEdgeApplicationReq ¶
type ListEdgeApplicationReq struct { AppType string `json:"appType" validate:"oneof=UserDefine System All"` PageNum int `json:"pageNum" validate:"required,gte=1,lte=1000"` PageSize int `json:"pageSize" validate:"required,gte=1,lte=1000"` }
List edge application ////////////////////////////////////////////////////////
type ListEdgeApplicationRsp ¶
type ListEdgeApplicationRsp struct { Total int `json:"total"` Apps *[]appentity.ApplicationBasicInfo `json:"apps"` }
type ListEdgeApplicationVersionReq ¶
type ListEdgeApplicationVersionReq struct { AppName string `json:"appName"` PageNum int `json:"pageNum" validate:"gte=1,lte=1000"` PageSize int `json:"pageSize" validate:"gte=1,lte=1000"` }
List edge application version
type ListEdgeApplicationVersionRsp ¶
type ListEdgeApplicationVersionRsp struct { Total int `json:"total"` AppVersions *[]appentity.ApplicationVersionInfo `json:"appVersions"` }
type ListNodeCanDeployReq ¶
type ListNodeCanDeployReq struct { AppName string `json:"appName" validate:"required"` TargetVersion string `json:"targetVersion" validate:"required"` PageNum int `json:"pageNum" validate:"required,gte=1,lte=1000"` PageSize int `json:"pageSize" validate:"required,gte=1,lte=1000"` }
List node can deploy
type ListNodeCanDeployRsp ¶
type ListNodeCanDeployRsp struct { Total int Nodes *[]nodeentity.NodeBasicInfo `json:"nodes"` }
type ListNodeDeployReq ¶
type ListNodeDeployReq struct { Name string `json:"name" validate:"required"` PageNum int `json:"pageNum" validate:"required,gte=1,lte=1000"` PageSize int `json:"pageSize" validate:"required,gte=1,lte=1000"` }
List node deploy
type ListNodeDeployRsp ¶
type ListNodeDeployRsp struct { Total int AppDeploys *[]appentity.ApplicationDeployInfo `json:"appDeploys"` }
type OfflineEdgeApplicationVersionReq ¶
type OfflineEdgeApplicationVersionReq struct { AppName string `json:"appName"` Version string `json:"version"` }
/// offline application version
type OfflineEdgeApplicationVersionRsp ¶
type OfflineEdgeApplicationVersionRsp struct { }
type PortMapping ¶
type PublishEdgeApplicationVersionReq ¶
type PublishEdgeApplicationVersionReq struct { AppName string `json:"appName"` Version string `json:"version"` }
/// publish application version
type PublishEdgeApplicationVersionRsp ¶
type PublishEdgeApplicationVersionRsp struct { }
type UnDeployEdgeApplicationReq ¶
type UnDeployEdgeApplicationReq struct { AppName string `json:"appName" validate:"required"` NodeNames []string `json:"nodeNames" validate:"required"` Version string `json:"version" validate:"required"` }
undeploy edge application
type UnDeployEdgeApplicationRsp ¶
type UnDeployEdgeApplicationRsp struct { }