Documentation ¶
Index ¶
- Constants
- Variables
- type ComfirmBatchReq
- type CreateBatchRsp
- type CreateEdgeNodeReq
- type CreateEdgeNodeRsp
- type CreateNodeGroupReq
- type CreateNodeGroupRsp
- type CreateNodeOfBatchReq
- type DeleteEdgeNodeReq
- type DeleteEdgeNodeRsp
- type DeleteNodeGroupReq
- type DeleteNodeGroupRsp
- type DeleteNodeOfBatchReq
- type DescribeEdgeNodesReq
- type DescribeEdgeNodesRsp
- type DescribeNodeGroupReq
- type DescribeNodeGroupRsp
- type GetInstallScriptReq
- type GetInstallScriptRsp
- type ListArchTypeReq
- type ListArchTypeRsp
- type ListEdgeNodeTypeReq
- type ListEdgeNodeTypeRsp
- type ListEdgeNodesReq
- type ListEdgeNodesRsp
- type ListNodeGroupReq
- type ListNodeGroupRsp
- type ListNodeOfBatchReq
- type ListNodeOfBatchRsp
- type UploadBatchCSVReq
Constants ¶
View Source
const ( StatusOnline string = "Online" StatusOffline string = "Offline" StatusNotInstalled string = "NotInstalled" StatusInstalling string = "Installing" StatusDeleting string = "Deleting" )
node status
View Source
const ( EdgeRoleKey string = "node-role.kubernetes.io/edge" AgentRoleKey string = "node-role.kubernetes.io/agent" EdgeRole string = "edge" AgentRole string = "agent" )
node roles
View Source
const (
TransferCountEach int = 10
)
Variables ¶
View Source
var ( ErrNodeNotExist = errors.New("node not exist") ErrNodeTypeNotExist = errors.New("node type not exist") ErrGetNode = errors.New("get node err") ErrDeleteStatusDeleting = errors.New("delete failed! status is deleting") )
View Source
var CSVSavePath string = "/tmp/apulisedge/upload/nodeBatch"
View Source
var TypesOfNode = []string{"Raspberrypi 4B", "Atlas 500", "Generic"}
node types
Functions ¶
This section is empty.
Types ¶
type ComfirmBatchReq ¶
type ComfirmBatchReq struct {
ID int `json:"id" validate:"required:"`
}
type CreateBatchRsp ¶
type CreateBatchRsp struct {
BatchID int `json:"batchID"`
}
type CreateEdgeNodeReq ¶
type CreateEdgeNodeReq struct { Name string `json:"name" validate:"required"` NodeType string `json:"nodeType" validate:"required"` }
Create edge node
type CreateEdgeNodeRsp ¶
type CreateEdgeNodeRsp struct {
Node *nodeentity.NodeBasicInfo `json:"node"`
}
type CreateNodeGroupReq ¶
type CreateNodeGroupReq struct {
GroupName string `json:"name" validate:"required"`
}
Create node group
type CreateNodeGroupRsp ¶
type CreateNodeGroupRsp struct {
Group *nodeentity.NodeGroupInfo `json:"node"`
}
type CreateNodeOfBatchReq ¶
type CreateNodeOfBatchReq struct { ID int `json:"id" validate:"required"` Name string `json:"name" validate:"required"` NodeType string `json:"nodeType" validate:"required"` Arch string `json:"arch" validate:"required"` Address string `json:"address" validate:"required"` Port string `json:"port" validate:"required"` Sudoer string `json:"sudoer" validate:"required"` Password string `json:"password" validate:"required"` }
type DeleteEdgeNodeReq ¶
type DeleteEdgeNodeReq struct {
Name string `json:"name" validate:"required"`
}
Delete edge node
type DeleteEdgeNodeRsp ¶
type DeleteEdgeNodeRsp struct { }
type DeleteNodeGroupReq ¶
type DeleteNodeGroupReq struct {
GroupName string `json:"groupName" validate:"required"`
}
Delete node group
type DeleteNodeGroupRsp ¶
type DeleteNodeGroupRsp struct { }
type DeleteNodeOfBatchReq ¶
type DeleteNodeOfBatchReq struct {
ID int64 `json:"id" validate:"required"`
}
type DescribeEdgeNodesReq ¶
type DescribeEdgeNodesReq struct {
Name string `json:"name" validate:"required"`
}
Describe edge node protocol
type DescribeEdgeNodesRsp ¶
type DescribeEdgeNodesRsp struct {
Node *nodeentity.NodeBasicInfo `json:"node"`
}
type DescribeNodeGroupReq ¶
type DescribeNodeGroupReq struct {
GroupName string `json:"groupName" validate:"required"`
}
Describe group
type DescribeNodeGroupRsp ¶
type DescribeNodeGroupRsp struct {
Group *nodeentity.NodeGroupInfo `json:"group"`
}
type GetInstallScriptReq ¶
type GetInstallScriptRsp ¶
type GetInstallScriptRsp struct {
Script string `json:"script"`
}
type ListArchTypeReq ¶
type ListArchTypeReq struct { }
///////// arch type /////////////// List arch type
type ListArchTypeRsp ¶
type ListArchTypeRsp struct {
Types []string `json:"types"`
}
type ListEdgeNodeTypeReq ¶
type ListEdgeNodeTypeReq struct { }
///////// node type /////////////// List node type
type ListEdgeNodeTypeRsp ¶
type ListEdgeNodeTypeRsp struct {
Types []string `json:"types"`
}
type ListEdgeNodesReq ¶
type ListEdgeNodesReq struct { PageNum int `json:"pageNum" validate:"required,gte=1,lte=1000"` PageSize int `json:"pageSize" validate:"required,gte=1,lte=1000"` }
List edge nodes
type ListEdgeNodesRsp ¶
type ListEdgeNodesRsp struct { Total int `json:"total"` Nodes *[]nodeentity.NodeBasicInfo `json:"nodes"` }
type ListNodeGroupReq ¶
type ListNodeGroupReq struct { PageNum int `json:"pageNum" validate:"required,gte=1,lte=1000"` PageSize int `json:"pageSize" validate:"required,gte=1,lte=1000"` }
List group
type ListNodeGroupRsp ¶
type ListNodeGroupRsp struct { Total int `json:"total"` Groups *[]nodeentity.NodeGroupInfo `json:"groups"` }
type ListNodeOfBatchReq ¶
type ListNodeOfBatchRsp ¶
type ListNodeOfBatchRsp struct { ProceedingFile int `json:"proceedingFile"` Status string `json:"status"` ErrMsg string `json:"errMsg"` NodeList []nodeentity.NodeOfBatchInfo `json:"nodeList"` }
type UploadBatchCSVReq ¶
type UploadBatchCSVReq struct {
BatchID int `form:"batchID"`
}
Click to show internal directories.
Click to hide internal directories.