| | |
| | | NodeIps []string `json:"nodeIps"` |
| | | } |
| | | |
| | | // @Summary 创建集群 |
| | | // @Description 创建集群 |
| | | // @Accept json |
| | | // @Produce json |
| | | // @Tags cluster |
| | | // @Param clusterArg body controllers.ClusterCreateVo true "集群创建参数" |
| | | // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" |
| | | // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" |
| | | // @Router /data/api-v/cluster/create [post] |
| | | |
| | | func (cc ClusterController) Create(c *gin.Context) { |
| | | var clusterVo ClusterCreateVo |
| | | err := c.BindJSON(&clusterVo) |
| | |
| | | } |
| | | } |
| | | |
| | | // @Summary 生成集群6位随机密码 |
| | | // @Description 生成集群6位随机密码 |
| | | // @Produce json |
| | | // @Tags cluster |
| | | // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" |
| | | // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" |
| | | // @Router /data/api-v/cluster/randomPwd [get] |
| | | |
| | | func (cc ClusterController) RandomPwd(c *gin.Context) { |
| | | pwd := fmt.Sprintf("%06v", rand.New(rand.NewSource(time.Now().UnixNano())).Int31n(1000000)) |
| | | util.ResponseFormat(c,code.Success,pwd) |
| | | } |
| | | |
| | | // @Summary 搜索集群 |
| | | // @Description 搜索集群 |
| | | // @Accept json |
| | | // @Produce json |
| | | // @Tags cluster |
| | | // @Param searchArg body controllers.ClusterSearchVo true "集群搜索参数" |
| | | // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" |
| | | // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" |
| | | // @Router /data/api-v/cluster/search [post] |
| | | |
| | | func (cc ClusterController) Search(c *gin.Context) { |
| | | var csv ClusterSearchVo |
| | | err := c.BindJSON(&csv) |
| | |
| | | } |
| | | } |
| | | |
| | | // @Summary 通过searchNum异步获取集群节点信息 |
| | | // @Description 通过searchNum异步获取集群节点信息 |
| | | // @Accept json |
| | | // @Produce json |
| | | // @Tags cluster |
| | | // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" |
| | | // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" |
| | | // @Router /data/api-v/cluster/getNodesByNum [get] |
| | | |
| | | func (cc ClusterController) GetSearchNodes(c *gin.Context) { |
| | | var api dbapi.ClusterApi |
| | | b, d := api.GetSearchNodes() |
| | |
| | | } |
| | | } |
| | | |
| | | // @Summary 通过searchNum停止搜索 |
| | | // @Description 通过searchNum停止搜索 |
| | | // @Produce json |
| | | // @Tags cluster |
| | | // @Param searchNum query string true "搜索编号" |
| | | // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" |
| | | // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" |
| | | // @Router /data/api-v/cluster/stopSearching [post] |
| | | |
| | | func (cc ClusterController) StopSearching(c *gin.Context) { |
| | | searchNum := c.Query("searchNum") |
| | | if searchNum == "" { |
| | |
| | | } |
| | | |
| | | |
| | | // @Summary 加入集群 |
| | | // @Description 加入集群 |
| | | // @Accept json |
| | | // @Produce json |
| | | // @Tags cluster |
| | | // @Param clusterArg body controllers.ClusterCreateVo true "集群创建参数" |
| | | // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" |
| | | // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" |
| | | // @Router /data/api-v/cluster/joinCluster [post] |
| | | func (cc ClusterController) JoinCluster(c *gin.Context) { |
| | | var arg ClusterJoinVo |
| | | err := c.BindJSON(&arg) |