Documentation ¶
Index ¶
- Constants
- func AddBatchTaskParsingNum(num int, updateTime time.Time) (int, error)
- func BeginBatchTask(batchID int) error
- func ConfirmNodesBatch(nodeInfo *NodeOfBatchInfo) error
- func CreateBatchTask(taskInfo *BatchTaskRecord) error
- func CreateGroup(groupInfo *NodeGroupInfo) error
- func CreateNode(nodeInfo *NodeBasicInfo) error
- func CreateNodeOfBatch(nodeInfo *NodeOfBatchInfo) error
- func DeleteGroup(groupInfo *NodeGroupInfo) error
- func DeleteNode(nodeInfo *NodeBasicInfo) error
- func DeleteNodeOfBatch(nodeInfo *NodeOfBatchInfo) error
- func FinishBatchTask(batchID int) error
- func UpdateBatchTask(taskInfo *BatchTaskRecord) error
- func UpdateGroup(groupInfo *NodeGroupInfo) error
- func UpdateNode(nodeInfo *NodeBasicInfo) error
- type BatchTaskRecord
- type NodeBasicInfo
- type NodeGroupInfo
- type NodeOfBatchInfo
Constants ¶
View Source
const (
TableNodeBasicInfo string = "NodeBasicInfos"
)
table contants
View Source
const (
TableNodeGroupInfo string = "NodeGroupInfos"
)
table contants
Variables ¶
This section is empty.
Functions ¶
func AddBatchTaskParsingNum ¶
func BeginBatchTask ¶
func ConfirmNodesBatch ¶
func ConfirmNodesBatch(nodeInfo *NodeOfBatchInfo) error
func CreateBatchTask ¶
func CreateBatchTask(taskInfo *BatchTaskRecord) error
func CreateGroup ¶
func CreateGroup(groupInfo *NodeGroupInfo) error
func CreateNode ¶
func CreateNode(nodeInfo *NodeBasicInfo) error
func CreateNodeOfBatch ¶
func CreateNodeOfBatch(nodeInfo *NodeOfBatchInfo) error
func DeleteGroup ¶
func DeleteGroup(groupInfo *NodeGroupInfo) error
func DeleteNode ¶
func DeleteNode(nodeInfo *NodeBasicInfo) error
func DeleteNodeOfBatch ¶
func DeleteNodeOfBatch(nodeInfo *NodeOfBatchInfo) error
func FinishBatchTask ¶
func UpdateBatchTask ¶
func UpdateBatchTask(taskInfo *BatchTaskRecord) error
func UpdateGroup ¶
func UpdateGroup(groupInfo *NodeGroupInfo) error
func UpdateNode ¶
func UpdateNode(nodeInfo *NodeBasicInfo) error
Types ¶
type BatchTaskRecord ¶
type BatchTaskRecord struct { ID int64 `gorm:"column:Id;primary_key" json:"id"` ClusterId int64 `gorm:"column:ClusterId;not null" json:"clusterId"` GroupId int64 `gorm:"column:GroupId;not null" json:"groupId"` UserId int64 `gorm:"column:UserId;not null" json:"userId"` Status string `gorm:"column:Status" json:"status"` ErrMsg string `gorm:"column:ErrMsg" json:"errMsg"` ParsingFileNum int `gorm:"column:ParsingFileNum" json:"parsingFileNum"` CreateAt time.Time `gorm:"column:CreateAt;not null" json:"createAt"` UpdateAt time.Time `gorm:"column:UpdateAt;not null" json:"updateAt"` }
func GetBatchTaskByID ¶
func GetBatchTaskByID(id int) (BatchTaskRecord, error)
type NodeBasicInfo ¶
type NodeBasicInfo struct { ID int64 `gorm:"column:Id;primary_key" json:"id"` NodeName string `gorm:"uniqueIndex:user_node;column:NodeName;size:255;not null" json:"name"` ClusterId int64 `gorm:"uniqueIndex:user_node;column:ClusterId;not null" json:"clusterId"` GroupId int64 `gorm:"uniqueIndex:user_node;column:GroupId;not null" json:"groupId"` UserId int64 `gorm:"uniqueIndex:user_node;column:UserId;not null" json:"userId"` NodeType string `gorm:"column:NodeType;size:128;not null" json:"nodeType"` Arch string `gorm:"column:Arch;size:128;not null" json:"arch"` UniqueName string `gorm:"column:UniqueName;size:255;not null" json:"uniqueName"` CpuCore int `gorm:"column:CpuCore;not null" json:"cpuCore"` Memory int64 `gorm:"column:Memory;not null" json:"memory"` Status string `gorm:"column:Status;size:255;not null" json:"status"` Roles string `gorm:"column:Roles;size:255;not null" json:"roles"` ContainerRuntime string `gorm:"column:ContainerRuntime;size:255;not null" json:"runtime"` OsImage string `gorm:"column:OsImage;size:255;not null" json:"osImage"` InterIp string `gorm:"column:InterIp;size:255;not null" json:"interIp"` OuterIp string `gorm:"column:OuterIp;size:255" json:"outerIp"` CreateAt time.Time `gorm:"column:CreateAt;not null" json:"createAt"` UpdateAt time.Time `gorm:"column:UpdateAt;not null" json:"updateAt"` }
NodeName is unique in Cluster/Group/User
func (NodeBasicInfo) TableName ¶
func (NodeBasicInfo) TableName() string
type NodeGroupInfo ¶
type NodeGroupInfo struct { ID int64 `gorm:"column:Id;primary_key" json:"id"` ClusterId int64 `gorm:"uniqueIndex:node_group;column:ClusterId;not null" json:"clusterId"` GroupId int64 `gorm:"uniqueIndex:node_group;column:GroupId;not null" json:"groupId"` UserId int64 `gorm:"uniqueIndex:node_group;column:UserId;not null" json:"userId"` GroupName string `gorm:"uniqueIndex:node_group;column:GroupName;size:255;not null" json:"groupName"` CreateAt time.Time `gorm:"column:CreateAt;not null" json:"createAt"` UpdateAt time.Time `gorm:"column:UpdateAt;not null" json:"updateAt"` }
NodeGroup is unique in Cluster/Group/User
func (NodeGroupInfo) TableName ¶
func (NodeGroupInfo) TableName() string
type NodeOfBatchInfo ¶
type NodeOfBatchInfo struct { ID int64 `gorm:"column:Id;primary_key" json:"id"` NodeID int64 `gorm:"uniqueIndex:user_node;column:NodeID;not null" json:"nodeID"` BatchID int64 `gorm:"column:BatchID;not null" json:"batchID"` ClusterId int64 `gorm:"uniqueIndex:user_node;column:ClusterId;not null" json:"clusterId"` GroupId int64 `gorm:"uniqueIndex:user_node;column:GroupId;not null" json:"groupId"` UserId int64 `gorm:"uniqueIndex:user_node;column:UserId;not null" json:"userId"` NodeName string `gorm:"uniqueIndex:user_node;column:NodeName;size:255;not null" json:"name"` NodeType string `gorm:"column:NodeType;size:128;not null" json:"nodeType"` Arch string `gorm:"column:Arch;size:128;not null" json:"arch"` Address string `gorm:"column:Address" json:"address"` Port string `gorm:"column:Port" json:"port"` Sudoer string `gorm:"column:Sudoer" json:"sudoer"` Password string `gorm:"column:Password" json:"password"` IsConfirm bool `gorm:"column:IsConfirm" json:"isConfirm"` CreateAt time.Time `gorm:"column:CreateAt;not null" json:"createAt"` UpdateAt time.Time `gorm:"column:UpdateAt;not null" json:"updateAt"` }
NodeOfBatchInfo is one case of batch before comfirmation
Click to show internal directories.
Click to hide internal directories.