@daocloud-proto/mcamel-mysql 0.21.0-rc1-5 → 0.22.0-rc1-6

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.
Files changed (2) hide show
  1. package/mysql.pb.ts +24 -0
  2. package/package.json +1 -1
package/mysql.pb.ts CHANGED
@@ -23,6 +23,7 @@ export enum RoleType {
23
23
  Replica = "Replica",
24
24
  PRIMARY = "PRIMARY",
25
25
  SECONDARY = "SECONDARY",
26
+ Router = "Router",
26
27
  }
27
28
 
28
29
  export enum PodStatus {
@@ -157,6 +158,7 @@ export enum GetMysqlNodeListRespNodeType {
157
158
  PhpAdmin = "PhpAdmin",
158
159
  PRIMARY = "PRIMARY",
159
160
  SECONDARY = "SECONDARY",
161
+ MgrRouter = "MgrRouter",
160
162
  }
161
163
 
162
164
  export enum GetMysqlConfRespItemsParamType {
@@ -170,6 +172,25 @@ export enum MysqlClusterItemStatusRestoreInitialStatus {
170
172
  Succeeded = "Succeeded",
171
173
  }
172
174
 
175
+ export type GetPodsAndRolesReq = {
176
+ cluster?: string
177
+ namespace?: string
178
+ name?: string
179
+ workspaceId?: number
180
+ instanceType?: InstanceType
181
+ }
182
+
183
+ export type PodsAndRoles = {
184
+ podName?: string
185
+ podStatus?: PodStatus
186
+ }
187
+
188
+ export type GetPodsAndRolesResp = {
189
+ isHealthy?: boolean
190
+ source?: PodsAndRoles[]
191
+ replica?: PodsAndRoles[]
192
+ }
193
+
173
194
  export type GetSlowlogPodListReq = {
174
195
  cluster?: string
175
196
  namespace?: string
@@ -945,4 +966,7 @@ export class MysqlV3 {
945
966
  static SwitchMaster(req: SwitchMasterRequest, initReq?: fm.InitReq): Promise<SwitchMasterResp> {
946
967
  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)})
947
968
  }
969
+ static GetPodsAndRoles(req: GetPodsAndRolesReq, initReq?: fm.InitReq): Promise<GetPodsAndRolesResp> {
970
+ return fm.fetchReq<GetPodsAndRolesReq, GetPodsAndRolesResp>(`/apis/mcamel.io/mysql/v1alpha3/${req["workspaceId"]}/${req["cluster"]}/${req["namespace"]}/${req["name"]}/${req["instanceType"]}/pods_and_roles?${fm.renderURLSearchParams(req, ["workspaceId", "cluster", "namespace", "name", "instanceType"])}`, {...initReq, method: "GET"})
971
+ }
948
972
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/mcamel-mysql",
3
- "version":"0.21.0-rc1-5",
3
+ "version":"0.22.0-rc1-6",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {