@daocloud-proto/skoala 0.14.0 → 0.15.0-2

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.
@@ -54,4 +54,14 @@ export type InsightMonitorMetrics = {
54
54
  diskWrite?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
55
55
  netBytesReceived?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
56
56
  netBytesTransmitted?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
57
+ }
58
+
59
+ export type NacosInsightMetrics = {
60
+ enabled?: boolean
61
+ serviceCount?: number
62
+ avgPushCost?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
63
+ maxPushCost?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
64
+ failedPush?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
65
+ configCount?: number
66
+ longPolling?: number
57
67
  }
@@ -12,6 +12,11 @@ export enum ListNamespaceReqGatewayStatus {
12
12
  Unavailable = "Unavailable",
13
13
  }
14
14
 
15
+ export enum ListRegistryServiceReqRegistryType {
16
+ hosted = "hosted",
17
+ integrated = "integrated",
18
+ }
19
+
15
20
  export enum RegistryServiceInfoRegistryType {
16
21
  NACOS = "NACOS",
17
22
  EUREKA = "EUREKA",
@@ -89,6 +94,11 @@ export type ListMeshServiceReq = {
89
94
  export type ListRegistryServiceReq = {
90
95
  workspaceId?: string
91
96
  registryId?: string
97
+ kubernetesClusterName?: string
98
+ kubernetesNamespaceName?: string
99
+ registryName?: string
100
+ nacosNamespaceName?: string
101
+ registryType?: ListRegistryServiceReqRegistryType
92
102
  serviceName?: string
93
103
  page?: number
94
104
  pageSize?: number
@@ -115,6 +125,7 @@ export type RegistryServiceInfo = {
115
125
  kubernetesPorts?: string[]
116
126
  kubernetesLabels?: string[]
117
127
  registryType?: RegistryServiceInfoRegistryType
128
+ isHosted?: boolean
118
129
  }
119
130
 
120
131
  export type ListMeshServiceRes = {
@@ -101,6 +101,12 @@ export type AdvancedAPIConfig = {
101
101
  requestHeadersPolicy?: HeaderPolicy
102
102
  responseHeadersPolicy?: HeaderPolicy
103
103
  jwtPolicy?: JWTPolicy
104
+ authPolicy?: AuthPolicy
105
+ }
106
+
107
+ export type AuthPolicy = {
108
+ context?: {[key: string]: string}
109
+ disabled?: boolean
104
110
  }
105
111
 
106
112
  export type JWTPolicy = {
@@ -21,6 +21,7 @@ export enum ServiceSource {
21
21
  SOURCE_MESH = "SOURCE_MESH",
22
22
  SOURCE_REGISTRY = "SOURCE_REGISTRY",
23
23
  SOURCE_EXTERNAL = "SOURCE_EXTERNAL",
24
+ SOURCE_HOSTED_REGISTRY = "SOURCE_HOSTED_REGISTRY",
24
25
  }
25
26
 
26
27
  export enum SesameServiceType {
@@ -168,7 +169,15 @@ type BaseExternalServiceConf = {
168
169
  }
169
170
 
170
171
  export type ExternalServiceConf = BaseExternalServiceConf
171
- & OneOf<{ kubernetesService: KubernetesService; registryService: RegistryService; externalService: ExternalService; meshService: MeshService }>
172
+ & OneOf<{ kubernetesService: KubernetesService; registryService: RegistryService; externalService: ExternalService; meshService: MeshService; hostedRegistryService: HostedRegistryService }>
173
+
174
+
175
+ type BaseHostedRegistryService = {
176
+ registrationName?: string
177
+ }
178
+
179
+ export type HostedRegistryService = BaseHostedRegistryService
180
+ & OneOf<{ eurekaService: EurekaService; nacosService: NacosService; zookeeperService: ZookeeperService; kubernetesService: KubernetesService; meshService: MeshService }>
172
181
 
173
182
  export type CircuitBreakerPolicy = {
174
183
  maxConnections?: number
@@ -100,15 +100,13 @@ export type Nacos = {
100
100
  version?: string
101
101
  nodeCount?: number
102
102
  healthNodeCount?: number
103
- serviceCount?: number
104
- configCount?: number
105
- insightEnabled?: boolean
106
103
  database?: NacosDatabase
107
104
  resources?: SkoalaApiGeneralV1alpha1Resource.ResourceRequirements
108
105
  condition?: NacosCondition[]
109
106
  certificationEnabled?: boolean
110
107
  volume?: Volume
111
108
  createAt?: string
109
+ insight?: SkoalaApiGeneralV1alpha1Insight.NacosInsightMetrics
112
110
  }
113
111
 
114
112
  export type NacosDatabase = {
@@ -23,6 +23,17 @@ export enum ControlBehavior {
23
23
  WAITING_IN_QUEUE = "WAITING_IN_QUEUE",
24
24
  }
25
25
 
26
+ export enum MachineType {
27
+ EMBEDDED = "EMBEDDED",
28
+ ALONE = "ALONE",
29
+ }
30
+
31
+ export enum ListClusterFlowClientStatus {
32
+ OFF = "OFF",
33
+ PENDING = "PENDING",
34
+ CONNECTED = "CONNECTED",
35
+ }
36
+
26
37
  export enum DegradeRuleGrade {
27
38
  SLOW_REQUEST_RATIO = "SLOW_REQUEST_RATIO",
28
39
  ERROR_RATIO = "ERROR_RATIO",
@@ -103,6 +114,73 @@ export type ListResourceRes = {
103
114
  pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
104
115
  }
105
116
 
117
+ export type ListClusterFlowServer = {
118
+ serverId?: string
119
+ port?: number
120
+ machineType?: MachineType
121
+ clientCount?: number
122
+ currentQps?: number
123
+ maxQps?: number
124
+ }
125
+
126
+ export type ListClusterFlowClient = {
127
+ clientId?: string
128
+ connectStatus?: ListClusterFlowClientStatus
129
+ }
130
+
131
+ export type ListClusterFlow = {
132
+ server?: ListClusterFlowServer
133
+ client?: ListClusterFlowClient
134
+ }
135
+
136
+ export type ListClusterFlowReq = {
137
+ workspaceId?: string
138
+ clusterName?: string
139
+ namespaceName?: string
140
+ sentinelName?: string
141
+ appName?: string
142
+ }
143
+
144
+ export type DeleteClusterFlowReq = {
145
+ workspaceId?: string
146
+ clusterName?: string
147
+ namespaceName?: string
148
+ sentinelName?: string
149
+ appName?: string
150
+ serverId?: string
151
+ }
152
+
153
+ export type ListClusterFlowRes = {
154
+ items?: ListClusterFlow[]
155
+ pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
156
+ }
157
+
158
+ export type ListTokenServerReq = {
159
+ workspaceId?: string
160
+ clusterName?: string
161
+ namespaceName?: string
162
+ sentinelName?: string
163
+ appName?: string
164
+ }
165
+
166
+ export type ListTokenServerRes = {
167
+ items?: string[]
168
+ pagination?: SkoalaApiGeneralV1alpha1Common.Pagination
169
+ }
170
+
171
+ export type TokenServerReq = {
172
+ workspaceId?: string
173
+ clusterName?: string
174
+ namespaceName?: string
175
+ sentinelName?: string
176
+ appName?: string
177
+ machineType?: MachineType
178
+ machineId?: string
179
+ port?: number
180
+ maxQps?: number
181
+ clients?: string[]
182
+ }
183
+
106
184
  export type FlowRule = {
107
185
  id?: string
108
186
  app?: string
@@ -45,6 +45,18 @@ export type VirtualhostConfig = {
45
45
  corsPolicy?: CorsPolicy
46
46
  tlsPolicy?: VirtualhostTLSPolicy
47
47
  jwtProviders?: JwtProvider[]
48
+ authPolicy?: AuthorizationPolicy
49
+ }
50
+
51
+ export type AuthorizationPolicy = {
52
+ disabled?: boolean
53
+ context?: {[key: string]: string}
54
+ authServer?: string
55
+ failOpen?: boolean
56
+ responseTimeout?: string
57
+ maxRequestBytes?: number
58
+ allowPartialMessage?: boolean
59
+ packAsBytes?: boolean
48
60
  }
49
61
 
50
62
  export type JwtProvider = {
@@ -101,6 +113,7 @@ export type VirtualhostInfo = {
101
113
  secretNamespaceName?: string
102
114
  healthCheckUrl?: string
103
115
  enableJWT?: boolean
116
+ enableAuth?: boolean
104
117
  namespaceName?: string
105
118
  apiCount?: number
106
119
  updatedAt?: string
@@ -130,6 +143,7 @@ export type GetVirtualhostRes = {
130
143
  corsPolicy?: CorsPolicy
131
144
  tlsPolicy?: VirtualhostTLSPolicy
132
145
  jwtProviders?: JwtProvider[]
146
+ authorizationPolicy?: AuthorizationPolicy
133
147
  }
134
148
 
135
149
  export type UpdateVirtualhostReq = {
@@ -208,10 +222,4 @@ export type LocalRateLimitPolicy = {
208
222
  export type TimeUnit = {
209
223
  time?: number
210
224
  unit?: TimeUnitUnit
211
- }
212
-
213
- export type Authorization = {
214
- }
215
-
216
- export type AuthPolicy = {
217
225
  }
@@ -261,6 +261,18 @@ export class Sentinel {
261
261
  static ListResource(req: SkoalaApiHostedV1alpha1Sentinel.ListResourceReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Sentinel.ListResourceRes> {
262
262
  return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.ListResourceReq, SkoalaApiHostedV1alpha1Sentinel.ListResourceRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/sentinels/${req["sentinelName"]}/apps/${req["appName"]}/resources?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "sentinelName", "appName"])}`, {...initReq, method: "GET"})
263
263
  }
264
+ static ListClusterFlow(req: SkoalaApiHostedV1alpha1Sentinel.ListClusterFlowReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Sentinel.ListClusterFlowRes> {
265
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.ListClusterFlowReq, SkoalaApiHostedV1alpha1Sentinel.ListClusterFlowRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/sentinels/${req["sentinelName"]}/apps/${req["appName"]}/cluster-flows?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "sentinelName", "appName"])}`, {...initReq, method: "GET"})
266
+ }
267
+ static ListTokenServer(req: SkoalaApiHostedV1alpha1Sentinel.ListTokenServerReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Sentinel.ListTokenServerRes> {
268
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.ListTokenServerReq, SkoalaApiHostedV1alpha1Sentinel.ListTokenServerRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/sentinels/${req["sentinelName"]}/apps/${req["appName"]}/token-servers?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName", "sentinelName", "appName"])}`, {...initReq, method: "GET"})
269
+ }
270
+ static CreateOrUpdateTokenServer(req: SkoalaApiHostedV1alpha1Sentinel.TokenServerReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
271
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.TokenServerReq, GoogleProtobufEmpty.Empty>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/sentinels/${req["sentinelName"]}/apps/${req["appName"]}/token-servers`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
272
+ }
273
+ static DeleteClusterFlow(req: SkoalaApiHostedV1alpha1Sentinel.DeleteClusterFlowReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
274
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.DeleteClusterFlowReq, GoogleProtobufEmpty.Empty>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/sentinels/${req["sentinelName"]}/apps/${req["appName"]}/cluster-flows/${req["serverId"]}`, {...initReq, method: "DELETE"})
275
+ }
264
276
  static CreateFlowRule(req: SkoalaApiHostedV1alpha1Sentinel.CreateFlowRuleReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
265
277
  return fm.fetchReq<SkoalaApiHostedV1alpha1Sentinel.CreateFlowRuleReq, GoogleProtobufEmpty.Empty>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/sentinels/${req["sentinelName"]}/apps/${req["appName"]}/flow-rules`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
266
278
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/skoala",
3
- "version": "0.14.0",
3
+ "version": "0.15.0-2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {