@daocloud-proto/mcamel-mysql 0.5.0-921 → 0.5.0-922
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mysql.pb.ts +16 -0
- package/package.json +1 -1
package/mysql.pb.ts
CHANGED
|
@@ -832,6 +832,19 @@ export type MysqlClusterItem = {
|
|
|
832
832
|
status?: MysqlClusterItemStatus
|
|
833
833
|
}
|
|
834
834
|
|
|
835
|
+
export type SwitchMasterRequest = {
|
|
836
|
+
cluster?: string
|
|
837
|
+
namespace?: string
|
|
838
|
+
name?: string
|
|
839
|
+
workspaceId?: number
|
|
840
|
+
newMasterPodName?: string
|
|
841
|
+
instanceType?: InstanceType
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
export type SwitchMasterResp = {
|
|
845
|
+
data?: string
|
|
846
|
+
}
|
|
847
|
+
|
|
835
848
|
export class MysqlV3 {
|
|
836
849
|
static GetMysqlList(req: GetMysqlListReq, initReq?: fm.InitReq): Promise<GetMysqlListResp> {
|
|
837
850
|
return fm.fetchReq<GetMysqlListReq, GetMysqlListResp>(`/apis/mcamel.io/mysql/v1alpha3/${req["workspaceId"]}/mysqls?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
|
|
@@ -920,4 +933,7 @@ export class MysqlV3 {
|
|
|
920
933
|
static GetSlowlogPodList(req: GetSlowlogPodListReq, initReq?: fm.InitReq): Promise<GetSlowlogPodListResp> {
|
|
921
934
|
return fm.fetchReq<GetSlowlogPodListReq, GetSlowlogPodListResp>(`/apis/mcamel.io/mysql/v1alpha3/${req["workspaceId"]}/${req["cluster"]}/${req["namespace"]}/${req["name"]}/${req["instanceType"]}/slowlog/pods?${fm.renderURLSearchParams(req, ["workspaceId", "cluster", "namespace", "name", "instanceType"])}`, {...initReq, method: "GET"})
|
|
922
935
|
}
|
|
936
|
+
static SwitchMaster(req: SwitchMasterRequest, initReq?: fm.InitReq): Promise<SwitchMasterResp> {
|
|
937
|
+
return fm.fetchReq<SwitchMasterRequest, SwitchMasterResp>(`/apis/mcamel.io/mysql/v1alpha3/${req["workspaceId"]}/${req["cluster"]}/${req["namespace"]}/${req["name"]}/${req["instanceType"]}/switch/master`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
938
|
+
}
|
|
923
939
|
}
|