@daocloud-proto/skoala 0.5.1-80 → 0.5.1-82
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.
|
@@ -149,11 +149,11 @@ export type ListNacosServiceReq = {
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
export type ListNacosServiceRes = {
|
|
152
|
-
items?:
|
|
152
|
+
items?: NacosServiceBrief[]
|
|
153
153
|
pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
export type
|
|
156
|
+
export type NacosServiceBrief = {
|
|
157
157
|
name?: string
|
|
158
158
|
groupName?: string
|
|
159
159
|
clusterCount?: number
|
|
@@ -162,16 +162,52 @@ export type HostNacosService = {
|
|
|
162
162
|
triggerFlag?: boolean
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
+
export type NacosInstanceCluster = {
|
|
166
|
+
defaultCheckPort?: string
|
|
167
|
+
defaultPort?: string
|
|
168
|
+
healthChecker?: {[key: string]: string}
|
|
169
|
+
metadata?: {[key: string]: string}
|
|
170
|
+
name?: string
|
|
171
|
+
serviceName?: string
|
|
172
|
+
useIpPort4Check?: boolean
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export type NacosServiceDetail = {
|
|
176
|
+
groupName?: string
|
|
177
|
+
metadata?: {[key: string]: string}
|
|
178
|
+
name?: string
|
|
179
|
+
protectThreshold?: number
|
|
180
|
+
selector?: {[key: string]: string}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export type NacosServiceInstance = {
|
|
184
|
+
clusterName?: string
|
|
185
|
+
enabled?: boolean
|
|
186
|
+
ephemeral?: boolean
|
|
187
|
+
healthy?: boolean
|
|
188
|
+
instanceHeartBeatInterval?: number
|
|
189
|
+
instanceHeartBeatTimeOut?: number
|
|
190
|
+
ip?: string
|
|
191
|
+
ipDeleteTimeout?: number
|
|
192
|
+
metadata?: {[key: string]: string}
|
|
193
|
+
port?: number
|
|
194
|
+
serviceName?: string
|
|
195
|
+
weight?: number
|
|
196
|
+
}
|
|
197
|
+
|
|
165
198
|
export type GetNacosServiceReq = {
|
|
166
199
|
workspaceId?: string
|
|
167
200
|
clusterName?: string
|
|
168
201
|
nacosName?: string
|
|
169
202
|
namespaceName?: string
|
|
170
203
|
nacosNamespace?: string
|
|
204
|
+
nacosGroupName?: string
|
|
171
205
|
nacosService?: string
|
|
172
206
|
}
|
|
173
207
|
|
|
174
208
|
export type GetNacosServiceRes = {
|
|
209
|
+
clusters?: NacosInstanceCluster[]
|
|
210
|
+
service?: NacosServiceDetail
|
|
175
211
|
}
|
|
176
212
|
|
|
177
213
|
export type GetNacosServiceAPIReq = {
|
|
@@ -180,12 +216,31 @@ export type GetNacosServiceAPIReq = {
|
|
|
180
216
|
nacosName?: string
|
|
181
217
|
namespaceName?: string
|
|
182
218
|
nacosNamespace?: string
|
|
219
|
+
nacosGroupName?: string
|
|
183
220
|
nacosService?: string
|
|
184
221
|
}
|
|
185
222
|
|
|
186
223
|
export type GetNacosServiceAPIRes = {
|
|
187
224
|
}
|
|
188
225
|
|
|
226
|
+
export type ListNacosServiceInstanceReq = {
|
|
227
|
+
workspaceId?: string
|
|
228
|
+
clusterName?: string
|
|
229
|
+
nacosName?: string
|
|
230
|
+
namespaceName?: string
|
|
231
|
+
nacosNamespace?: string
|
|
232
|
+
nacosGroupName?: string
|
|
233
|
+
nacosClusterName?: string
|
|
234
|
+
nacosService?: string
|
|
235
|
+
page?: number
|
|
236
|
+
pageSize?: number
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export type ListNacosServiceInstanceRes = {
|
|
240
|
+
items?: NacosServiceInstance[]
|
|
241
|
+
pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
|
|
242
|
+
}
|
|
243
|
+
|
|
189
244
|
export type ListNamespaceReq = {
|
|
190
245
|
workspaceId?: string
|
|
191
246
|
clusterName?: string
|
|
@@ -110,6 +110,9 @@ export class Nacos {
|
|
|
110
110
|
static GetServiceAPI(req: SkoalaApiHostedV1alpha1Nacos.GetNacosServiceAPIReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Nacos.GetNacosServiceAPIRes> {
|
|
111
111
|
return fm.fetchReq<SkoalaApiHostedV1alpha1Nacos.GetNacosServiceAPIReq, SkoalaApiHostedV1alpha1Nacos.GetNacosServiceAPIRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/nacoses/${req["nacosName"]}/namespaces/${req["nacosNamespace"]}/services/${req["nacosService"]}/apis?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "nacosName", "nacosNamespace", "nacosService"])}`, {...initReq, method: "GET"})
|
|
112
112
|
}
|
|
113
|
+
static ListServiceInstance(req: SkoalaApiHostedV1alpha1Nacos.ListNacosServiceInstanceReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Nacos.ListNacosServiceInstanceRes> {
|
|
114
|
+
return fm.fetchReq<SkoalaApiHostedV1alpha1Nacos.ListNacosServiceInstanceReq, SkoalaApiHostedV1alpha1Nacos.ListNacosServiceInstanceRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/nacoses/${req["nacosName"]}/namespaces/${req["nacosNamespace"]}/services/${req["nacosService"]}/instances?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "nacosName", "nacosNamespace", "nacosService"])}`, {...initReq, method: "GET"})
|
|
115
|
+
}
|
|
113
116
|
static ListNamespace(req: SkoalaApiHostedV1alpha1Nacos.ListNamespaceReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Nacos.ListNamespaceRes> {
|
|
114
117
|
return fm.fetchReq<SkoalaApiHostedV1alpha1Nacos.ListNamespaceReq, SkoalaApiHostedV1alpha1Nacos.ListNamespaceRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/nacoses/${req["nacosName"]}/namespaces?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "nacosName"])}`, {...initReq, method: "GET"})
|
|
115
118
|
}
|