28
28
import com .alipay .sofa .jraft .RouteTable ;
29
29
import com .alipay .sofa .jraft .conf .Configuration ;
30
30
import com .alipay .sofa .jraft .entity .PeerId ;
31
+ import io .swagger .annotations .Api ;
32
+ import io .swagger .annotations .ApiOperation ;
31
33
import org .apache .seata .common .ConfigurationKeys ;
32
34
import org .apache .seata .common .metadata .MetadataResponse ;
33
35
import org .apache .seata .common .metadata .Node ;
55
57
/**
56
58
*/
57
59
@ RestController
60
+ @ Api (tags = "Raft cluster APIs" )
58
61
@ RequestMapping ("/metadata/v1" )
59
62
public class ClusterController {
60
63
@@ -73,6 +76,7 @@ private void init() {
73
76
this .serverProperties = applicationContext .getBean (ServerProperties .class );
74
77
}
75
78
79
+ @ ApiOperation ("changeCluster" )
76
80
@ PostMapping ("/changeCluster" )
77
81
public Result <?> changeCluster (@ RequestParam String raftClusterStr ) {
78
82
Result <?> result = new Result <>();
@@ -89,6 +93,7 @@ public Result<?> changeCluster(@RequestParam String raftClusterStr) {
89
93
return result ;
90
94
}
91
95
96
+ @ ApiOperation ("cluster" )
92
97
@ GetMapping ("/cluster" )
93
98
public MetadataResponse cluster (String group ) {
94
99
MetadataResponse metadataResponse = new MetadataResponse ();
@@ -122,6 +127,7 @@ public MetadataResponse cluster(String group) {
122
127
return metadataResponse ;
123
128
}
124
129
130
+ @ ApiOperation ("watch follower" )
125
131
@ PostMapping ("/watch" )
126
132
public void watch (HttpServletRequest request , @ RequestParam Map <String , Object > groupTerms ,
127
133
@ RequestParam (defaultValue = "28000" ) int timeout ) {
0 commit comments