@daocloud-proto/insight 0.18.2 → 0.19.0-rc1
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/event/v1alpha1/event.pb.ts +3 -3
- package/insight/v1alpha1/insight.pb.ts +4 -3
- package/log/v1alpha1/log.pb.ts +14 -2
- package/package.json +1 -1
- package/resource/v1alpha1/cluster.pb.ts +5 -2
- package/resource/v1alpha1/pod.pb.ts +14 -2
- package/resource/v1alpha1/workload.pb.ts +4 -3
- package/span_metric/v1alpha1/span_metric.pb.ts +5 -2
- package/tracing/v1alpha1/tracing.pb.ts +5 -2
|
@@ -8,8 +8,8 @@ import * as InsightIoApiTypeV1alpha1Page from "../../type/v1alpha1/page.pb"
|
|
|
8
8
|
|
|
9
9
|
export enum EventType {
|
|
10
10
|
TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
Normal = "Normal",
|
|
12
|
+
Warning = "Warning",
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export type QueryEventHistogramRequest = {
|
|
@@ -97,7 +97,7 @@ export type Event = {
|
|
|
97
97
|
source?: EventSource
|
|
98
98
|
reportingInstance?: string
|
|
99
99
|
metadata?: EventMetadata
|
|
100
|
-
type?:
|
|
100
|
+
type?: EventType
|
|
101
101
|
firstTimestamp?: string
|
|
102
102
|
involveObject?: EventInvolvedObject
|
|
103
103
|
clusterUuid?: string
|
|
@@ -65,6 +65,7 @@ export type GlobalConfig = {
|
|
|
65
65
|
export type userinfo = {
|
|
66
66
|
name?: string
|
|
67
67
|
isAdmin?: boolean
|
|
68
|
+
isClusterAdmin?: boolean
|
|
68
69
|
canView?: boolean
|
|
69
70
|
resourceTypes?: resourceType[]
|
|
70
71
|
}
|
|
@@ -331,7 +332,7 @@ export class Resource {
|
|
|
331
332
|
return fm.fetchReq<InsightIoApiResourceV1alpha1Pod.GetPodRequest, InsightIoApiResourceV1alpha1Pod.Pod>(`/apis/insight.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/pods/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
332
333
|
}
|
|
333
334
|
static GetPodJVMInfo(req: InsightIoApiResourceV1alpha1Pod.PodJVMRequest, initReq?: fm.InitReq): Promise<InsightIoApiResourceV1alpha1Pod.PodJVMInfo> {
|
|
334
|
-
return fm.fetchReq<InsightIoApiResourceV1alpha1Pod.PodJVMRequest, InsightIoApiResourceV1alpha1Pod.PodJVMInfo>(`/apis/insight.io/v1alpha1/
|
|
335
|
+
return fm.fetchReq<InsightIoApiResourceV1alpha1Pod.PodJVMRequest, InsightIoApiResourceV1alpha1Pod.PodJVMInfo>(`/apis/insight.io/v1alpha1/pods/${req["name"]}/jvm`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
335
336
|
}
|
|
336
337
|
static ListPodContainers(req: InsightIoApiResourceV1alpha1Pod.ListContainersRequest, initReq?: fm.InitReq): Promise<InsightIoApiResourceV1alpha1Pod.ListContainersResponse> {
|
|
337
338
|
return fm.fetchReq<InsightIoApiResourceV1alpha1Pod.ListContainersRequest, InsightIoApiResourceV1alpha1Pod.ListContainersResponse>(`/apis/insight.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/pods/${req["name"]}/containers?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
@@ -351,10 +352,10 @@ export class Resource {
|
|
|
351
352
|
}
|
|
352
353
|
export class Tracing {
|
|
353
354
|
static ListServiceNames(req: InsightIoApiTracingV1alpha1Tracing.ListServiceNamesRequest, initReq?: fm.InitReq): Promise<InsightIoApiTracingV1alpha1Tracing.GetServiceNamesResponse> {
|
|
354
|
-
return fm.fetchReq<InsightIoApiTracingV1alpha1Tracing.ListServiceNamesRequest, InsightIoApiTracingV1alpha1Tracing.GetServiceNamesResponse>(`/apis/insight.io/v1alpha1/traces/
|
|
355
|
+
return fm.fetchReq<InsightIoApiTracingV1alpha1Tracing.ListServiceNamesRequest, InsightIoApiTracingV1alpha1Tracing.GetServiceNamesResponse>(`/apis/insight.io/v1alpha1/traces/service-names?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
355
356
|
}
|
|
356
357
|
static GetServices(req: InsightIoApiSpan_metricV1alpha1Span_metric.GetServicesRequest, initReq?: fm.InitReq): Promise<InsightIoApiSpan_metricV1alpha1Span_metric.GetServicesResponse> {
|
|
357
|
-
return fm.fetchReq<InsightIoApiSpan_metricV1alpha1Span_metric.GetServicesRequest, InsightIoApiSpan_metricV1alpha1Span_metric.GetServicesResponse>(`/apis/insight.io/v1alpha1/traces/
|
|
358
|
+
return fm.fetchReq<InsightIoApiSpan_metricV1alpha1Span_metric.GetServicesRequest, InsightIoApiSpan_metricV1alpha1Span_metric.GetServicesResponse>(`/apis/insight.io/v1alpha1/traces/services?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
358
359
|
}
|
|
359
360
|
static QueryOperations(req: InsightIoApiTracingV1alpha1Tracing.QueryOperationsRequest, initReq?: fm.InitReq): Promise<InsightIoApiTracingV1alpha1Tracing.QueryOperationsResponse> {
|
|
360
361
|
return fm.fetchReq<InsightIoApiTracingV1alpha1Tracing.QueryOperationsRequest, InsightIoApiTracingV1alpha1Tracing.QueryOperationsResponse>(`/apis/insight.io/v1alpha1/traces/clusters/${req["clusterName"]}/operations?${fm.renderURLSearchParams(req, ["clusterName"])}`, {...initReq, method: "GET"})
|
package/log/v1alpha1/log.pb.ts
CHANGED
|
@@ -21,6 +21,17 @@ export enum DownloadFileType {
|
|
|
21
21
|
JSON = "JSON",
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
export enum LogField {
|
|
25
|
+
LOG_FIELD_UNSPECIFIED = "LOG_FIELD_UNSPECIFIED",
|
|
26
|
+
Timestamp = "Timestamp",
|
|
27
|
+
Cluster = "Cluster",
|
|
28
|
+
Namespace = "Namespace",
|
|
29
|
+
Pod = "Pod",
|
|
30
|
+
Container = "Container",
|
|
31
|
+
Node = "Node",
|
|
32
|
+
File = "File",
|
|
33
|
+
}
|
|
34
|
+
|
|
24
35
|
export type SearchLogRequest = {
|
|
25
36
|
index?: string
|
|
26
37
|
query?: string
|
|
@@ -80,6 +91,7 @@ export type LogContextResourceFilter = {
|
|
|
80
91
|
cluster?: string
|
|
81
92
|
pod?: string
|
|
82
93
|
container?: string
|
|
94
|
+
namespace?: string
|
|
83
95
|
}
|
|
84
96
|
|
|
85
97
|
export type LogContextSystemFilter = {
|
|
@@ -127,8 +139,8 @@ export type LogHistogramResult = {
|
|
|
127
139
|
export type DownloadLogRequest = {
|
|
128
140
|
type?: DownloadFileType
|
|
129
141
|
queryLog?: QueryLogRequest
|
|
130
|
-
|
|
131
|
-
fields?:
|
|
142
|
+
queryLogContext?: QueryLogContextRequest
|
|
143
|
+
fields?: LogField[]
|
|
132
144
|
}
|
|
133
145
|
|
|
134
146
|
export type DownloadLogResponse = {
|
package/package.json
CHANGED
|
@@ -41,8 +41,9 @@ export enum InsightAgentStatus {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
export enum Role {
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
ROLE_UNSPECIFIED = "ROLE_UNSPECIFIED",
|
|
45
|
+
ROLE_VIEWER = "ROLE_VIEWER",
|
|
46
|
+
ROLE_ADMIN = "ROLE_ADMIN",
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
export enum serverComponentName {
|
|
@@ -98,6 +99,7 @@ export type ClusterSummary = {
|
|
|
98
99
|
phase?: ClusterPhase
|
|
99
100
|
nodeNumSummary?: InsightIoApiResourceV1alpha1Type.ResourceNumSummary
|
|
100
101
|
insightAgentStatus?: insightAgentState
|
|
102
|
+
role?: Role
|
|
101
103
|
}
|
|
102
104
|
|
|
103
105
|
export type ClusterDetail = {
|
|
@@ -119,6 +121,7 @@ export type insightAgentState = {
|
|
|
119
121
|
status?: InsightAgentStatus
|
|
120
122
|
version?: string
|
|
121
123
|
createTime?: string
|
|
124
|
+
traceStatus?: InsightAgentStatus
|
|
122
125
|
}
|
|
123
126
|
|
|
124
127
|
export type ListNamespacesRequest = {
|
|
@@ -7,6 +7,15 @@
|
|
|
7
7
|
import * as InsightIoApiTypeV1alpha1Page from "../../type/v1alpha1/page.pb"
|
|
8
8
|
import * as InsightIoApiResourceV1alpha1Type from "./type.pb"
|
|
9
9
|
|
|
10
|
+
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
11
|
+
type OneOf<T> =
|
|
12
|
+
| { [k in keyof T]?: undefined }
|
|
13
|
+
| (
|
|
14
|
+
keyof T extends infer K ?
|
|
15
|
+
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
|
|
16
|
+
: never)
|
|
17
|
+
: never);
|
|
18
|
+
|
|
10
19
|
export enum PodPhase {
|
|
11
20
|
POD_PHASE_UNSPECIFIED = "POD_PHASE_UNSPECIFIED",
|
|
12
21
|
POD_PHASE_UNKNOWN = "POD_PHASE_UNKNOWN",
|
|
@@ -57,8 +66,8 @@ export type GetPodRequest = {
|
|
|
57
66
|
name?: string
|
|
58
67
|
}
|
|
59
68
|
|
|
60
|
-
|
|
61
|
-
|
|
69
|
+
|
|
70
|
+
type BasePodJVMRequest = {
|
|
62
71
|
namespace?: string
|
|
63
72
|
name?: string
|
|
64
73
|
start?: string
|
|
@@ -66,6 +75,9 @@ export type PodJVMRequest = {
|
|
|
66
75
|
step?: number
|
|
67
76
|
}
|
|
68
77
|
|
|
78
|
+
export type PodJVMRequest = BasePodJVMRequest
|
|
79
|
+
& OneOf<{ cluster: string; clusterName: string }>
|
|
80
|
+
|
|
69
81
|
export type Pod = {
|
|
70
82
|
name?: string
|
|
71
83
|
cluster?: string
|
|
@@ -8,9 +8,10 @@ import * as InsightIoApiTypeV1alpha1Page from "../../type/v1alpha1/page.pb"
|
|
|
8
8
|
import * as InsightIoApiResourceV1alpha1Type from "./type.pb"
|
|
9
9
|
|
|
10
10
|
export enum WorkloadKind {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
WORKLOAD_KIND_UNKNOWN = "WORKLOAD_KIND_UNKNOWN",
|
|
12
|
+
WORKLOAD_KIND_DEPLOYMENT = "WORKLOAD_KIND_DEPLOYMENT",
|
|
13
|
+
WORKLOAD_KIND_STATEFULSET = "WORKLOAD_KIND_STATEFULSET",
|
|
14
|
+
WORKLOAD_KIND_DAEMONSET = "WORKLOAD_KIND_DAEMONSET",
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
export enum WorkloadPhase {
|
|
@@ -85,7 +85,8 @@ export type GetOperationDetailResponse = {
|
|
|
85
85
|
pagination?: InsightIoApiTypeV1alpha1Page.Pagination
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
|
|
89
|
+
type BaseGetServicesRequest = {
|
|
89
90
|
namespace?: string
|
|
90
91
|
extensionFilters?: string
|
|
91
92
|
endTime?: string
|
|
@@ -94,9 +95,11 @@ export type GetServicesRequest = {
|
|
|
94
95
|
page?: number
|
|
95
96
|
pageSize?: number
|
|
96
97
|
sort?: string
|
|
97
|
-
clusterName?: string
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
export type GetServicesRequest = BaseGetServicesRequest
|
|
101
|
+
& OneOf<{ cluster: string; clusterName: string }>
|
|
102
|
+
|
|
100
103
|
export type ServiceItem = {
|
|
101
104
|
serviceName?: string
|
|
102
105
|
namespace?: string
|
|
@@ -51,11 +51,14 @@ type BaseTraceRequestById = {
|
|
|
51
51
|
export type TraceRequestById = BaseTraceRequestById
|
|
52
52
|
& OneOf<{ cluster: string; clusterName: string }>
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
|
|
55
|
+
type BaseListServiceNamesRequest = {
|
|
56
56
|
namespace?: string
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
export type ListServiceNamesRequest = BaseListServiceNamesRequest
|
|
60
|
+
& OneOf<{ cluster: string; clusterName: string }>
|
|
61
|
+
|
|
59
62
|
export type GetServiceNamesResponse = {
|
|
60
63
|
services?: string[]
|
|
61
64
|
}
|