|
|
@@ -0,0 +1,25 @@
|
|
|
+package cn.reghao.devops.manager.machine.controller;
|
|
|
+
|
|
|
+import cn.reghao.jutil.jdk.result.WebResult;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.http.MediaType;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author reghao
|
|
|
+ * @date 2024-01-04 15:34:39
|
|
|
+ */
|
|
|
+@Slf4j
|
|
|
+@Api(tags = "机器接口")
|
|
|
+@RestController
|
|
|
+@RequestMapping("/api/cluster")
|
|
|
+public class ClusterController {
|
|
|
+ @ApiOperation(value = "设置机器环境")
|
|
|
+ @PostMapping(value = "/notify/keepalived", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
+ public String notify(@RequestParam("lvs") String lvs, @RequestParam("type") String type) {
|
|
|
+ log.info("{} -> {}", lvs, type);
|
|
|
+ return WebResult.success();
|
|
|
+ }
|
|
|
+}
|