application

package
v0.0.0-...-bd520fb Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusUnPublished string = "UnPublished"
	StatusPublished   string = "Published"
)

application status

View Source
const (
	AppStatusUnpublished string = "Unpublished"
	AppStatusPublished   string = "Published"
	AppStatusOffline     string = "Offline"
)

application status

View Source
const (
	StatusInit       string = "Init"
	StatusDeploying  string = "Deploying"
	StatusRunning    string = "Running"
	StatusUpdateInit string = "UpdateInit"
	StatusAbnormal   string = "Abnormal"
	StatusDeleting   string = "Deleting"
)

deploy status

View Source
const (
	AppUserDefine string = "UserDefine"
	AppSysDefine  string = "System"
	AppTypeAll    string = "All"
)
View Source
const (
	RestartPolicyAlways    string = "Always"
	RestartPolicyOnFailure string = "OnFailure"
	RestartPolicyNever     string = "Never"
)

restart policy

View Source
const (
	NetworkTypeHost        string = "Host"
	NetworkTypePortMapping string = "PortMapping"
)

network type

View Source
const (
	DefaultNamespace string = "default"
)
View Source
const (
	TransferCountEach int = 10
)

for ticker

Variables

View Source
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 CreateEdgeApplicationRsp

type CreateEdgeApplicationRsp struct {
	AppCreated     string `json:"appCreated"`
	VersionCreated string `json:"versionCreated"`
}

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 PortMapping struct {
	ContainerPort int `json:"containerPort" validate:"required"`
	HostPort      int `json:"hostPort" validate:"required"`
}

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 {
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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