@@ -27,15 +27,15 @@ import (
27
27
apimodel "github.com/polarismesh/specification/source/go/api/v1/model"
28
28
apiservice "github.com/polarismesh/specification/source/go/api/v1/service_manage"
29
29
30
+ "github.com/polarismesh/polaris/admin"
30
31
httpcommon "github.com/polarismesh/polaris/apiserver/httpserver/http"
31
32
api "github.com/polarismesh/polaris/common/api/v1"
32
33
"github.com/polarismesh/polaris/common/model"
33
34
"github.com/polarismesh/polaris/common/utils"
34
- "github.com/polarismesh/polaris/maintain"
35
35
)
36
36
37
37
// GetMaintainAccessServer 运维接口
38
- func (h * HTTPServer ) GetMaintainAccessServer () * restful.WebService {
38
+ func (h * HTTPServer ) GetAdminAccessServer () * restful.WebService {
39
39
ws := new (restful.WebService )
40
40
ws .Path ("/maintain/v1" ).Consumes (restful .MIME_JSON ).Produces (restful .MIME_JSON )
41
41
@@ -62,7 +62,7 @@ func (h *HTTPServer) GetMaintainAccessServer() *restful.WebService {
62
62
func (h * HTTPServer ) GetServerConnections (req * restful.Request , rsp * restful.Response ) {
63
63
ctx := initContext (req )
64
64
params := httpcommon .ParseQueryParams (req )
65
- connReq := maintain .ConnReq {
65
+ connReq := admin .ConnReq {
66
66
Protocol : params ["protocol" ],
67
67
Host : params ["host" ],
68
68
}
@@ -87,7 +87,7 @@ func (h *HTTPServer) GetServerConnStats(req *restful.Request, rsp *restful.Respo
87
87
}
88
88
}
89
89
90
- connReq := maintain .ConnReq {
90
+ connReq := admin .ConnReq {
91
91
Protocol : params ["protocol" ],
92
92
Host : params ["host" ],
93
93
Amount : amount ,
@@ -105,7 +105,7 @@ func (h *HTTPServer) GetServerConnStats(req *restful.Request, rsp *restful.Respo
105
105
func (h * HTTPServer ) CloseConnections (req * restful.Request , rsp * restful.Response ) {
106
106
log .Info ("[MAINTAIN] Start doing close connections" )
107
107
ctx := initContext (req )
108
- var connReqs []maintain .ConnReq
108
+ var connReqs []admin .ConnReq
109
109
decoder := json .NewDecoder (req .Request .Body )
110
110
if err := decoder .Decode (& connReqs ); err != nil {
111
111
log .Errorf ("[MAINTAIN] close connection decode body err: %s" , err .Error ())
0 commit comments