@daocloud-proto/insight 0.13.2 → 0.14.0-dev-7c7eac4f
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/fetch.pb.ts
CHANGED
|
@@ -4,10 +4,119 @@
|
|
|
4
4
|
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* base64 encoder and decoder
|
|
9
|
+
* Copied and adapted from https://github.com/protobufjs/protobuf.js/blob/master/lib/base64/index.js
|
|
10
|
+
*/
|
|
11
|
+
// Base64 encoding table
|
|
12
|
+
const b64 = new Array(64);
|
|
13
|
+
|
|
14
|
+
// Base64 decoding table
|
|
15
|
+
const s64 = new Array(123);
|
|
16
|
+
|
|
17
|
+
// 65..90, 97..122, 48..57, 43, 47
|
|
18
|
+
for (let i = 0; i < 64;)
|
|
19
|
+
s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;
|
|
20
|
+
|
|
21
|
+
export function b64Encode(buffer: Uint8Array, start: number, end: number): string {
|
|
22
|
+
let parts: string[] = null;
|
|
23
|
+
const chunk = [];
|
|
24
|
+
let i = 0, // output index
|
|
25
|
+
j = 0, // goto index
|
|
26
|
+
t; // temporary
|
|
27
|
+
while (start < end) {
|
|
28
|
+
const b = buffer[start++];
|
|
29
|
+
switch (j) {
|
|
30
|
+
case 0:
|
|
31
|
+
chunk[i++] = b64[b >> 2];
|
|
32
|
+
t = (b & 3) << 4;
|
|
33
|
+
j = 1;
|
|
34
|
+
break;
|
|
35
|
+
case 1:
|
|
36
|
+
chunk[i++] = b64[t | b >> 4];
|
|
37
|
+
t = (b & 15) << 2;
|
|
38
|
+
j = 2;
|
|
39
|
+
break;
|
|
40
|
+
case 2:
|
|
41
|
+
chunk[i++] = b64[t | b >> 6];
|
|
42
|
+
chunk[i++] = b64[b & 63];
|
|
43
|
+
j = 0;
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
if (i > 8191) {
|
|
47
|
+
(parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
|
|
48
|
+
i = 0;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (j) {
|
|
52
|
+
chunk[i++] = b64[t];
|
|
53
|
+
chunk[i++] = 61;
|
|
54
|
+
if (j === 1)
|
|
55
|
+
chunk[i++] = 61;
|
|
56
|
+
}
|
|
57
|
+
if (parts) {
|
|
58
|
+
if (i)
|
|
59
|
+
parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
|
|
60
|
+
return parts.join("");
|
|
61
|
+
}
|
|
62
|
+
return String.fromCharCode.apply(String, chunk.slice(0, i));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const invalidEncoding = "invalid encoding";
|
|
66
|
+
|
|
67
|
+
export function b64Decode(s: string): Uint8Array {
|
|
68
|
+
const buffer = [];
|
|
69
|
+
let offset = 0;
|
|
70
|
+
let j = 0, // goto index
|
|
71
|
+
t; // temporary
|
|
72
|
+
for (let i = 0; i < s.length;) {
|
|
73
|
+
let c = s.charCodeAt(i++);
|
|
74
|
+
if (c === 61 && j > 1)
|
|
75
|
+
break;
|
|
76
|
+
if ((c = s64[c]) === undefined)
|
|
77
|
+
throw Error(invalidEncoding);
|
|
78
|
+
switch (j) {
|
|
79
|
+
case 0:
|
|
80
|
+
t = c;
|
|
81
|
+
j = 1;
|
|
82
|
+
break;
|
|
83
|
+
case 1:
|
|
84
|
+
buffer[offset++] = t << 2 | (c & 48) >> 4;
|
|
85
|
+
t = c;
|
|
86
|
+
j = 2;
|
|
87
|
+
break;
|
|
88
|
+
case 2:
|
|
89
|
+
buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;
|
|
90
|
+
t = c;
|
|
91
|
+
j = 3;
|
|
92
|
+
break;
|
|
93
|
+
case 3:
|
|
94
|
+
buffer[offset++] = (t & 3) << 6 | c;
|
|
95
|
+
j = 0;
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
if (j === 1)
|
|
100
|
+
throw Error(invalidEncoding);
|
|
101
|
+
return new Uint8Array(buffer);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function b64Test(s: string): boolean {
|
|
105
|
+
return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(s);
|
|
106
|
+
}
|
|
107
|
+
|
|
7
108
|
export interface InitReq extends RequestInit {
|
|
8
109
|
pathPrefix?: string
|
|
9
110
|
}
|
|
10
111
|
|
|
112
|
+
export function replacer(key: any, value: any): any {
|
|
113
|
+
if(value && value.constructor === Uint8Array) {
|
|
114
|
+
return b64Encode(value, 0, value.length);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return value;
|
|
118
|
+
}
|
|
119
|
+
|
|
11
120
|
export function fetchReq<I, O>(path: string, init?: InitReq): Promise<O> {
|
|
12
121
|
const {pathPrefix, ...req} = init || {}
|
|
13
122
|
|
|
@@ -91,6 +91,7 @@ export type BaseGraphQuery = {
|
|
|
91
91
|
end?: string
|
|
92
92
|
extensionFilters?: string
|
|
93
93
|
graphType?: GraphType
|
|
94
|
+
clusterNames?: string[]
|
|
94
95
|
}
|
|
95
96
|
|
|
96
97
|
export type BaseMetricsQuery = {
|
|
@@ -102,6 +103,7 @@ export type BaseMetricsQuery = {
|
|
|
102
103
|
lookback?: string
|
|
103
104
|
step?: string
|
|
104
105
|
ratePer?: string
|
|
106
|
+
clusterName?: string
|
|
105
107
|
}
|
|
106
108
|
|
|
107
109
|
export type NodeMetricResponse = {
|
|
@@ -70,7 +70,7 @@ export class Insight {
|
|
|
70
70
|
return fm.fetchReq<empty, userinfo>(`/apis/insight.io/v1alpha1/userinfo?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
71
71
|
}
|
|
72
72
|
static GetHelmInstallConfig(req: helmInstallConfigRequest, initReq?: fm.InitReq): Promise<helmInstallConfigResponse> {
|
|
73
|
-
return fm.fetchReq<helmInstallConfigRequest, helmInstallConfigResponse>(`/apis/insight.io/v1alpha1/agentinstallparam`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
73
|
+
return fm.fetchReq<helmInstallConfigRequest, helmInstallConfigResponse>(`/apis/insight.io/v1alpha1/agentinstallparam`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
export class FeatureGatesService {
|
|
@@ -89,16 +89,16 @@ export class Alert {
|
|
|
89
89
|
return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.RuleID, InsightIoApiInsightV1alpha1Alert.Rule>(`/apis/insight.io/v1alpha1/alert/rules/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
90
90
|
}
|
|
91
91
|
static CreateRule(req: InsightIoApiInsightV1alpha1Alert.CreateRuleRequest, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Alert.Rule> {
|
|
92
|
-
return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.CreateRuleRequest, InsightIoApiInsightV1alpha1Alert.Rule>(`/apis/insight.io/v1alpha1/alert/rules`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
92
|
+
return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.CreateRuleRequest, InsightIoApiInsightV1alpha1Alert.Rule>(`/apis/insight.io/v1alpha1/alert/rules`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
93
93
|
}
|
|
94
94
|
static UpdateRule(req: InsightIoApiInsightV1alpha1Alert.UpdateRuleRequest, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Alert.Rule> {
|
|
95
|
-
return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.UpdateRuleRequest, InsightIoApiInsightV1alpha1Alert.Rule>(`/apis/insight.io/v1alpha1/alert/rules/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
95
|
+
return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.UpdateRuleRequest, InsightIoApiInsightV1alpha1Alert.Rule>(`/apis/insight.io/v1alpha1/alert/rules/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
96
96
|
}
|
|
97
97
|
static DeleteRule(req: InsightIoApiInsightV1alpha1Alert.RuleID, initReq?: fm.InitReq): Promise<empty> {
|
|
98
98
|
return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.RuleID, empty>(`/apis/insight.io/v1alpha1/alert/rules/${req["id"]}`, {...initReq, method: "DELETE"})
|
|
99
99
|
}
|
|
100
100
|
static CleanRules(req: InsightIoApiInsightV1alpha1Alert.CleanRuleRequest, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Alert.CleanRuleResponse> {
|
|
101
|
-
return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.CleanRuleRequest, InsightIoApiInsightV1alpha1Alert.CleanRuleResponse>(`/apis/insight.io/v1alpha1/alert/rules/clean`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
101
|
+
return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.CleanRuleRequest, InsightIoApiInsightV1alpha1Alert.CleanRuleResponse>(`/apis/insight.io/v1alpha1/alert/rules/clean`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
102
102
|
}
|
|
103
103
|
static ListAlerts(req: InsightIoApiInsightV1alpha1Alert.ListAlertsRequest, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Alert.ListAlertsResponse> {
|
|
104
104
|
return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.ListAlertsRequest, InsightIoApiInsightV1alpha1Alert.ListAlertsResponse>(`/apis/insight.io/v1alpha1/alert/alerts?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -107,13 +107,13 @@ export class Alert {
|
|
|
107
107
|
return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.CountAlertRequest, InsightIoApiInsightV1alpha1Alert.CountAlertResponse>(`/apis/insight.io/v1alpha1/alert/alertcount?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
108
108
|
}
|
|
109
109
|
static AlertHook(req: InsightIoApiInsightV1alpha1Alert.AMHookRequest, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Alert.AMHookRequest> {
|
|
110
|
-
return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.AMHookRequest, InsightIoApiInsightV1alpha1Alert.AMHookRequest>(`/apis/insight.io/v1alpha1/alert/hook`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
110
|
+
return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.AMHookRequest, InsightIoApiInsightV1alpha1Alert.AMHookRequest>(`/apis/insight.io/v1alpha1/alert/hook`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
111
111
|
}
|
|
112
112
|
static GetAlertHistoryRetentionPeriod(req: empty, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Alert.AlertHistoryRetentionPeriod> {
|
|
113
113
|
return fm.fetchReq<empty, InsightIoApiInsightV1alpha1Alert.AlertHistoryRetentionPeriod>(`/apis/insight.io/v1alpha1/alert/history/retentionperiod?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
114
114
|
}
|
|
115
115
|
static UpdateAlertHistoryRetentionPeriod(req: InsightIoApiInsightV1alpha1Alert.AlertHistoryRetentionPeriod, initReq?: fm.InitReq): Promise<empty> {
|
|
116
|
-
return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.AlertHistoryRetentionPeriod, empty>(`/apis/insight.io/v1alpha1/alert/history/retentionperiod`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
116
|
+
return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.AlertHistoryRetentionPeriod, empty>(`/apis/insight.io/v1alpha1/alert/history/retentionperiod`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
117
117
|
}
|
|
118
118
|
static CleanAlertHistory(req: empty, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Alert.CleanAlertHistoryResponse> {
|
|
119
119
|
return fm.fetchReq<empty, InsightIoApiInsightV1alpha1Alert.CleanAlertHistoryResponse>(`/apis/insight.io/v1alpha1/alert/history/clean`, {...initReq, method: "PUT"})
|
|
@@ -125,13 +125,13 @@ export class Alert {
|
|
|
125
125
|
return fm.fetchReq<InsightIoApiInsightV1alpha1Notify.GetReceiversRequest, InsightIoApiInsightV1alpha1Notify.ReceiverDataResponse>(`/apis/insight.io/v1alpha1/alert/receivers/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
|
|
126
126
|
}
|
|
127
127
|
static TestReceiver(req: InsightIoApiInsightV1alpha1Notify.Receiver, initReq?: fm.InitReq): Promise<empty> {
|
|
128
|
-
return fm.fetchReq<InsightIoApiInsightV1alpha1Notify.Receiver, empty>(`/apis/insight.io/v1alpha1/alert/receivers/test`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
128
|
+
return fm.fetchReq<InsightIoApiInsightV1alpha1Notify.Receiver, empty>(`/apis/insight.io/v1alpha1/alert/receivers/test`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
129
129
|
}
|
|
130
130
|
static CreateReceiver(req: InsightIoApiInsightV1alpha1Notify.Receiver, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Notify.ReceiverDataResponse> {
|
|
131
|
-
return fm.fetchReq<InsightIoApiInsightV1alpha1Notify.Receiver, InsightIoApiInsightV1alpha1Notify.ReceiverDataResponse>(`/apis/insight.io/v1alpha1/alert/receivers`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
131
|
+
return fm.fetchReq<InsightIoApiInsightV1alpha1Notify.Receiver, InsightIoApiInsightV1alpha1Notify.ReceiverDataResponse>(`/apis/insight.io/v1alpha1/alert/receivers`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
132
132
|
}
|
|
133
133
|
static UpdateReceiver(req: InsightIoApiInsightV1alpha1Notify.Receiver, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Notify.ReceiverDataResponse> {
|
|
134
|
-
return fm.fetchReq<InsightIoApiInsightV1alpha1Notify.Receiver, InsightIoApiInsightV1alpha1Notify.ReceiverDataResponse>(`/apis/insight.io/v1alpha1/alert/receivers/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
134
|
+
return fm.fetchReq<InsightIoApiInsightV1alpha1Notify.Receiver, InsightIoApiInsightV1alpha1Notify.ReceiverDataResponse>(`/apis/insight.io/v1alpha1/alert/receivers/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
135
135
|
}
|
|
136
136
|
static DeleteReceiver(req: InsightIoApiInsightV1alpha1Notify.DeleteReceiversRequest, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Notify.ReceiverDataResponse> {
|
|
137
137
|
return fm.fetchReq<InsightIoApiInsightV1alpha1Notify.DeleteReceiversRequest, InsightIoApiInsightV1alpha1Notify.ReceiverDataResponse>(`/apis/insight.io/v1alpha1/alert/receivers/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
@@ -143,10 +143,10 @@ export class Alert {
|
|
|
143
143
|
return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.TemplateName, InsightIoApiInsightV1alpha1Alert.Template>(`/apis/insight.io/v1alpha1/alert/templates/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
|
|
144
144
|
}
|
|
145
145
|
static CreateTemplate(req: InsightIoApiInsightV1alpha1Alert.CreateTemplateRequest, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Alert.Template> {
|
|
146
|
-
return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.CreateTemplateRequest, InsightIoApiInsightV1alpha1Alert.Template>(`/apis/insight.io/v1alpha1/alert/templates`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
146
|
+
return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.CreateTemplateRequest, InsightIoApiInsightV1alpha1Alert.Template>(`/apis/insight.io/v1alpha1/alert/templates`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
147
147
|
}
|
|
148
148
|
static UpdateTemplate(req: InsightIoApiInsightV1alpha1Alert.CreateTemplateRequest, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Alert.Template> {
|
|
149
|
-
return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.CreateTemplateRequest, InsightIoApiInsightV1alpha1Alert.Template>(`/apis/insight.io/v1alpha1/alert/templates/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
149
|
+
return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.CreateTemplateRequest, InsightIoApiInsightV1alpha1Alert.Template>(`/apis/insight.io/v1alpha1/alert/templates/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
150
150
|
}
|
|
151
151
|
static DeleteTemplate(req: InsightIoApiInsightV1alpha1Alert.TemplateName, initReq?: fm.InitReq): Promise<empty> {
|
|
152
152
|
return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.TemplateName, empty>(`/apis/insight.io/v1alpha1/alert/templates/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
@@ -157,16 +157,16 @@ export class Log {
|
|
|
157
157
|
return fm.fetchReq<InsightIoApiLogV1alpha1Log.SearchLogRequest, InsightIoApiLogV1alpha1Log.SearchLogResponse>(`/apis/insight.io/v1alpha1/log/search?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
158
158
|
}
|
|
159
159
|
static QueryLog(req: InsightIoApiLogV1alpha1Log.QueryLogRequest, initReq?: fm.InitReq): Promise<InsightIoApiLogV1alpha1Log.QueryLogResponse> {
|
|
160
|
-
return fm.fetchReq<InsightIoApiLogV1alpha1Log.QueryLogRequest, InsightIoApiLogV1alpha1Log.QueryLogResponse>(`/apis/insight.io/v1alpha1/log/query`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
160
|
+
return fm.fetchReq<InsightIoApiLogV1alpha1Log.QueryLogRequest, InsightIoApiLogV1alpha1Log.QueryLogResponse>(`/apis/insight.io/v1alpha1/log/query`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
161
161
|
}
|
|
162
162
|
static QueryLogHistogram(req: InsightIoApiLogV1alpha1Log.QueryLogHistogramRequest, initReq?: fm.InitReq): Promise<InsightIoApiLogV1alpha1Log.QueryLogHistogramResponse> {
|
|
163
|
-
return fm.fetchReq<InsightIoApiLogV1alpha1Log.QueryLogHistogramRequest, InsightIoApiLogV1alpha1Log.QueryLogHistogramResponse>(`/apis/insight.io/v1alpha1/log/histogram`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
163
|
+
return fm.fetchReq<InsightIoApiLogV1alpha1Log.QueryLogHistogramRequest, InsightIoApiLogV1alpha1Log.QueryLogHistogramResponse>(`/apis/insight.io/v1alpha1/log/histogram`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
164
164
|
}
|
|
165
165
|
static QueryLogContext(req: InsightIoApiLogV1alpha1Log.QueryLogContextRequest, initReq?: fm.InitReq): Promise<InsightIoApiLogV1alpha1Log.QueryLogResponse> {
|
|
166
|
-
return fm.fetchReq<InsightIoApiLogV1alpha1Log.QueryLogContextRequest, InsightIoApiLogV1alpha1Log.QueryLogResponse>(`/apis/insight.io/v1alpha1/log/context`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
166
|
+
return fm.fetchReq<InsightIoApiLogV1alpha1Log.QueryLogContextRequest, InsightIoApiLogV1alpha1Log.QueryLogResponse>(`/apis/insight.io/v1alpha1/log/context`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
167
167
|
}
|
|
168
168
|
static DownloadLog(req: InsightIoApiLogV1alpha1Log.DownloadLogRequest, initReq?: fm.InitReq): Promise<InsightIoApiLogV1alpha1Log.DownloadLogResponse> {
|
|
169
|
-
return fm.fetchReq<InsightIoApiLogV1alpha1Log.DownloadLogRequest, InsightIoApiLogV1alpha1Log.DownloadLogResponse>(`/apis/insight.io/v1alpha1/log/export`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
169
|
+
return fm.fetchReq<InsightIoApiLogV1alpha1Log.DownloadLogRequest, InsightIoApiLogV1alpha1Log.DownloadLogResponse>(`/apis/insight.io/v1alpha1/log/export`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
170
170
|
}
|
|
171
171
|
static ListLogFilePaths(req: InsightIoApiLogV1alpha1Log.ListLogFilePathsRequest, initReq?: fm.InitReq): Promise<InsightIoApiLogV1alpha1Log.ListLogFilePathsResponse> {
|
|
172
172
|
return fm.fetchReq<InsightIoApiLogV1alpha1Log.ListLogFilePathsRequest, InsightIoApiLogV1alpha1Log.ListLogFilePathsResponse>(`/apis/insight.io/v1alpha1/log/filepaths?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -180,10 +180,10 @@ export class Metric {
|
|
|
180
180
|
return fm.fetchReq<InsightIoApiMetricV1alpha1Metric.PrometheusQueryRangeRequest, InsightIoApiMetricV1alpha1Metric.PrometheusQueryRangeResult>(`/apis/insight.io/v1alpha1/metric/queryrange?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
181
181
|
}
|
|
182
182
|
static BatchQueryMetric(req: InsightIoApiMetricV1alpha1Metric.BatchQueryRequest, initReq?: fm.InitReq): Promise<InsightIoApiMetricV1alpha1Metric.BatchQueryResponse> {
|
|
183
|
-
return fm.fetchReq<InsightIoApiMetricV1alpha1Metric.BatchQueryRequest, InsightIoApiMetricV1alpha1Metric.BatchQueryResponse>(`/apis/insight.io/v1alpha1/metric/query`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
183
|
+
return fm.fetchReq<InsightIoApiMetricV1alpha1Metric.BatchQueryRequest, InsightIoApiMetricV1alpha1Metric.BatchQueryResponse>(`/apis/insight.io/v1alpha1/metric/query`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
184
184
|
}
|
|
185
185
|
static BatchQueryRangeMetric(req: InsightIoApiMetricV1alpha1Metric.BatchQueryRangeRequest, initReq?: fm.InitReq): Promise<InsightIoApiMetricV1alpha1Metric.BatchQueryRangeResponse> {
|
|
186
|
-
return fm.fetchReq<InsightIoApiMetricV1alpha1Metric.BatchQueryRangeRequest, InsightIoApiMetricV1alpha1Metric.BatchQueryRangeResponse>(`/apis/insight.io/v1alpha1/metric/queryrange`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
186
|
+
return fm.fetchReq<InsightIoApiMetricV1alpha1Metric.BatchQueryRangeRequest, InsightIoApiMetricV1alpha1Metric.BatchQueryRangeResponse>(`/apis/insight.io/v1alpha1/metric/queryrange`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
export class Resource {
|
|
@@ -268,6 +268,9 @@ export class Resource {
|
|
|
268
268
|
static GetAgentSummary(req: InsightIoApiResourceV1alpha1Cluster.GetAgentSummaryRequest, initReq?: fm.InitReq): Promise<InsightIoApiResourceV1alpha1Cluster.AgentSummary> {
|
|
269
269
|
return fm.fetchReq<InsightIoApiResourceV1alpha1Cluster.GetAgentSummaryRequest, InsightIoApiResourceV1alpha1Cluster.AgentSummary>(`/apis/insight.io/v1alpha1/clusters/${req["cluster"]}/agent?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
270
270
|
}
|
|
271
|
+
static GetServerComponentSummary(req: empty, initReq?: fm.InitReq): Promise<InsightIoApiResourceV1alpha1Cluster.ServerComponentSummary> {
|
|
272
|
+
return fm.fetchReq<empty, InsightIoApiResourceV1alpha1Cluster.ServerComponentSummary>(`/apis/insight.io/v1alpha1/server/component?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
273
|
+
}
|
|
271
274
|
}
|
|
272
275
|
export class Tracing {
|
|
273
276
|
static ListServiceNames(req: InsightIoApiTracingV1alpha1Tracing.ListServiceNamesRequest, initReq?: fm.InitReq): Promise<InsightIoApiTracingV1alpha1Tracing.GetServiceNamesResponse> {
|
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import * as InsightIoApiTypeV1alpha1Page from "../../type/v1alpha1/page.pb"
|
|
8
8
|
import * as InsightIoApiResourceV1alpha1Pod from "./pod.pb"
|
|
9
9
|
import * as InsightIoApiResourceV1alpha1Type from "./type.pb"
|
|
10
|
+
import * as InsightIoApiResourceV1alpha1Workload from "./workload.pb"
|
|
10
11
|
|
|
11
12
|
export enum ClusterPhase {
|
|
12
13
|
CLUSTER_PHASE_UNSPECIFIED = "CLUSTER_PHASE_UNSPECIFIED",
|
|
@@ -127,4 +128,19 @@ export type AgentSummary = {
|
|
|
127
128
|
|
|
128
129
|
export type agentModuleStatus = {
|
|
129
130
|
pods?: InsightIoApiResourceV1alpha1Pod.Pod[]
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export type ServerComponentSummary = {
|
|
134
|
+
summary?: serverComponent[]
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export type serverComponent = {
|
|
138
|
+
name?: string
|
|
139
|
+
workloadKind?: InsightIoApiResourceV1alpha1Workload.WorkloadKind
|
|
140
|
+
phase?: InsightIoApiResourceV1alpha1Workload.WorkloadPhase
|
|
141
|
+
availability?: boolean
|
|
142
|
+
message?: string
|
|
143
|
+
version?: string
|
|
144
|
+
podNumSummary?: InsightIoApiResourceV1alpha1Type.ResourceNumSummary
|
|
145
|
+
creationTimestamp?: string
|
|
130
146
|
}
|
|
@@ -32,14 +32,8 @@ export type BatchQueryBaseRequest = {
|
|
|
32
32
|
serviceName?: string[]
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
export type Operation = {
|
|
36
|
-
operation?: string
|
|
37
|
-
spanKind?: InsightIoApiSpan_metricV1alpha1Otelspankind.SpanKind
|
|
38
|
-
callsTotal?: number
|
|
39
|
-
}
|
|
40
|
-
|
|
41
35
|
export type OperationsQueryResponse = {
|
|
42
|
-
operations?:
|
|
36
|
+
operations?: string[]
|
|
43
37
|
}
|
|
44
38
|
|
|
45
39
|
|