@daocloud-proto/mcamel-mysql 0.18.0-rc1-4 → 0.20.0-rc1-3
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 +112 -0
- package/package.json +1 -1
package/mysql.pb.ts
CHANGED
|
@@ -56,6 +56,19 @@ export enum Status {
|
|
|
56
56
|
MgrUnknown = "MgrUnknown",
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
export enum GetSlowlogPodListRespItemNodeType {
|
|
60
|
+
Master = "Master",
|
|
61
|
+
Replica = "Replica",
|
|
62
|
+
PhpAdmin = "PhpAdmin",
|
|
63
|
+
PRIMARY = "PRIMARY",
|
|
64
|
+
SECONDARY = "SECONDARY",
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export enum GetSlowlogListReqSortDir {
|
|
68
|
+
ASC = "ASC",
|
|
69
|
+
DESC = "DESC",
|
|
70
|
+
}
|
|
71
|
+
|
|
59
72
|
export enum GetMinioListReqSortDir {
|
|
60
73
|
ASC = "ASC",
|
|
61
74
|
DESC = "DESC",
|
|
@@ -156,6 +169,90 @@ export enum MysqlClusterItemStatusRestoreInitialStatus {
|
|
|
156
169
|
Succeeded = "Succeeded",
|
|
157
170
|
}
|
|
158
171
|
|
|
172
|
+
export type GetSlowlogPodListReq = {
|
|
173
|
+
cluster?: string
|
|
174
|
+
namespace?: string
|
|
175
|
+
name?: string
|
|
176
|
+
instanceType?: InstanceType
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export type GetSlowlogPodListRespItem = {
|
|
180
|
+
podName?: string
|
|
181
|
+
slowLogCount?: number
|
|
182
|
+
nodeType?: GetSlowlogPodListRespItemNodeType
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export type GetSlowlogPodListResp = {
|
|
186
|
+
items?: GetSlowlogPodListRespItem[]
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export type UpdateSlowlogStatusReq = {
|
|
190
|
+
cluster?: string
|
|
191
|
+
namespace?: string
|
|
192
|
+
name?: string
|
|
193
|
+
instanceType?: InstanceType
|
|
194
|
+
enable?: boolean
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export type UpdateSlowlogStatusResp = {
|
|
198
|
+
message?: string
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export type GetSlowlogConfReq = {
|
|
202
|
+
cluster?: string
|
|
203
|
+
namespace?: string
|
|
204
|
+
name?: string
|
|
205
|
+
instanceType?: InstanceType
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export type GetSlowlogConfResp = {
|
|
209
|
+
longQueryTime?: string
|
|
210
|
+
slowQueryLog?: boolean
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export type DeleteSlowlogReq = {
|
|
214
|
+
cluster?: string
|
|
215
|
+
namespace?: string
|
|
216
|
+
name?: string
|
|
217
|
+
podName?: string[]
|
|
218
|
+
instanceType?: InstanceType
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export type DeleteSlowlogResp = {
|
|
222
|
+
message?: string
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export type GetSlowlogListReq = {
|
|
226
|
+
page?: number
|
|
227
|
+
pageSize?: number
|
|
228
|
+
sortDir?: GetSlowlogListReqSortDir
|
|
229
|
+
sortBy?: string
|
|
230
|
+
searchKey?: string
|
|
231
|
+
cluster?: string
|
|
232
|
+
namespace?: string
|
|
233
|
+
name?: string
|
|
234
|
+
podName?: string
|
|
235
|
+
instanceType?: InstanceType
|
|
236
|
+
fromDate?: string
|
|
237
|
+
toDate?: string
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export type GetSlowlogListRespItem = {
|
|
241
|
+
startTime?: string
|
|
242
|
+
db?: string
|
|
243
|
+
sqlText?: string
|
|
244
|
+
queryTime?: string
|
|
245
|
+
lockTime?: string
|
|
246
|
+
rowsExamined?: string
|
|
247
|
+
rowsSent?: string
|
|
248
|
+
userHost?: string
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export type GetSlowlogListResp = {
|
|
252
|
+
items?: GetSlowlogListRespItem[]
|
|
253
|
+
pagination?: CommonCommon.Pagination
|
|
254
|
+
}
|
|
255
|
+
|
|
159
256
|
export type GetTopologyRequest = {
|
|
160
257
|
cluster?: string
|
|
161
258
|
namespace?: string
|
|
@@ -789,4 +886,19 @@ export class MysqlMgr {
|
|
|
789
886
|
static GetTopology(req: GetTopologyRequest, initReq?: fm.InitReq): Promise<GetTopologyResp> {
|
|
790
887
|
return fm.fetchReq<GetTopologyRequest, GetTopologyResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/${req["namespace"]}/${req["name"]}/${req["instanceType"]}/topology?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name", "instanceType"])}`, {...initReq, method: "GET"})
|
|
791
888
|
}
|
|
889
|
+
static GetSlowlogList(req: GetSlowlogListReq, initReq?: fm.InitReq): Promise<GetSlowlogListResp> {
|
|
890
|
+
return fm.fetchReq<GetSlowlogListReq, GetSlowlogListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/${req["namespace"]}/${req["name"]}/${req["podName"]}/${req["instanceType"]}/slowlog?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name", "podName", "instanceType"])}`, {...initReq, method: "GET"})
|
|
891
|
+
}
|
|
892
|
+
static DeleteSlowlog(req: DeleteSlowlogReq, initReq?: fm.InitReq): Promise<DeleteSlowlogResp> {
|
|
893
|
+
return fm.fetchReq<DeleteSlowlogReq, DeleteSlowlogResp>(`/apis/mcamel.io/mysql/v1alpha2/mysql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/${req["instanceType"]}/slowlog`, {...initReq, method: "DELETE", body: JSON.stringify(req)})
|
|
894
|
+
}
|
|
895
|
+
static GetSlowlogConf(req: GetSlowlogConfReq, initReq?: fm.InitReq): Promise<GetSlowlogConfResp> {
|
|
896
|
+
return fm.fetchReq<GetSlowlogConfReq, GetSlowlogConfResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/${req["namespace"]}/${req["name"]}/${req["instanceType"]}/slowlog/conf?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name", "instanceType"])}`, {...initReq, method: "GET"})
|
|
897
|
+
}
|
|
898
|
+
static UpdateSlowlogStatus(req: UpdateSlowlogStatusReq, initReq?: fm.InitReq): Promise<UpdateSlowlogStatusResp> {
|
|
899
|
+
return fm.fetchReq<UpdateSlowlogStatusReq, UpdateSlowlogStatusResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/${req["namespace"]}/${req["name"]}/${req["instanceType"]}/slowlog/toggle`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
900
|
+
}
|
|
901
|
+
static GetSlowlogPodList(req: GetSlowlogPodListReq, initReq?: fm.InitReq): Promise<GetSlowlogPodListResp> {
|
|
902
|
+
return fm.fetchReq<GetSlowlogPodListReq, GetSlowlogPodListResp>(`/apis/mcamel.io/mysql/v1alpha2/${req["cluster"]}/${req["namespace"]}/${req["name"]}/${req["instanceType"]}/slowlog/pods?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name", "instanceType"])}`, {...initReq, method: "GET"})
|
|
903
|
+
}
|
|
792
904
|
}
|