@daocloud-proto/mcamel-postgresql 0.0.2-449 → 0.0.2-451
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/package.json +1 -1
- package/postgresql.pb.ts +50 -0
package/package.json
CHANGED
package/postgresql.pb.ts
CHANGED
|
@@ -23,6 +23,20 @@ export enum Status {
|
|
|
23
23
|
Creating = "Creating",
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
export enum GetPostgresqlTopologyRespNodePodStatus {
|
|
27
|
+
Pending = "Pending",
|
|
28
|
+
Running = "Running",
|
|
29
|
+
Succeeded = "Succeeded",
|
|
30
|
+
Failed = "Failed",
|
|
31
|
+
Unknown = "Unknown",
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export enum GetPostgresqlTopologyRespNodeRole {
|
|
35
|
+
RoleUnknown = "RoleUnknown",
|
|
36
|
+
RoleMaster = "RoleMaster",
|
|
37
|
+
RoleReplica = "RoleReplica",
|
|
38
|
+
}
|
|
39
|
+
|
|
26
40
|
export enum GetPostgresqlS3ConfigListReqSortDir {
|
|
27
41
|
ASC = "ASC",
|
|
28
42
|
DESC = "DESC",
|
|
@@ -110,6 +124,39 @@ export enum GetPostgresqlConfRespItemsParamType {
|
|
|
110
124
|
conf = "conf",
|
|
111
125
|
}
|
|
112
126
|
|
|
127
|
+
export type GetPostgresqlTopologyReq = {
|
|
128
|
+
cluster?: string
|
|
129
|
+
namespace?: string
|
|
130
|
+
name?: string
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export type GetPostgresqlTopologyRespNode = {
|
|
134
|
+
cluster?: string
|
|
135
|
+
namespace?: string
|
|
136
|
+
podName?: string
|
|
137
|
+
ip?: string
|
|
138
|
+
podStatus?: GetPostgresqlTopologyRespNodePodStatus
|
|
139
|
+
totalContainer?: number
|
|
140
|
+
totalContainerReady?: number
|
|
141
|
+
podCpuRequest?: string
|
|
142
|
+
podMemoryRequest?: string
|
|
143
|
+
podCpuLimit?: string
|
|
144
|
+
podMemoryLimit?: string
|
|
145
|
+
role?: GetPostgresqlTopologyRespNodeRole
|
|
146
|
+
syncState?: string
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export type GetPostgresqlTopologyRespEdges = {
|
|
150
|
+
source?: string
|
|
151
|
+
target?: string
|
|
152
|
+
properties?: {[key: string]: string}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export type GetPostgresqlTopologyResp = {
|
|
156
|
+
nodes?: GetPostgresqlTopologyRespNode[]
|
|
157
|
+
edges?: GetPostgresqlTopologyRespEdges[]
|
|
158
|
+
}
|
|
159
|
+
|
|
113
160
|
export type CreatePostgresqlRestoreReq = {
|
|
114
161
|
cluster?: string
|
|
115
162
|
namespace?: string
|
|
@@ -612,4 +659,7 @@ export class Postgresql {
|
|
|
612
659
|
static CreateBucketExistChecking(req: CreateBucketExistCheckingReq, initReq?: fm.InitReq): Promise<CreateBucketExistCheckingResp> {
|
|
613
660
|
return fm.fetchReq<CreateBucketExistCheckingReq, CreateBucketExistCheckingResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/s3/config/checking`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
614
661
|
}
|
|
662
|
+
static GetPostgresqlTopology(req: GetPostgresqlTopologyReq, initReq?: fm.InitReq): Promise<GetPostgresqlTopologyResp> {
|
|
663
|
+
return fm.fetchReq<GetPostgresqlTopologyReq, GetPostgresqlTopologyResp>(`/apis/mcamel.io/postgresql/v1alpha1/postgresql/${req["cluster"]}/${req["namespace"]}/${req["name"]}/topology?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
664
|
+
}
|
|
615
665
|
}
|