@kwirthmagnify/kwirth-common-ai 0.5.57 → 0.5.58
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/dist/back.d.ts +45 -2
- package/dist/back.js +1 -1
- package/package.json +1 -1
package/dist/back.d.ts
CHANGED
|
@@ -74,10 +74,53 @@ export interface IK8sCapability {
|
|
|
74
74
|
appsApi: AppsV1Api;
|
|
75
75
|
networkApi: NetworkingV1Api;
|
|
76
76
|
}
|
|
77
|
+
export interface IMetricsPodSample {
|
|
78
|
+
podRef?: {
|
|
79
|
+
name?: string;
|
|
80
|
+
namespace?: string;
|
|
81
|
+
};
|
|
82
|
+
cpu?: {
|
|
83
|
+
usageNanoCores?: number;
|
|
84
|
+
};
|
|
85
|
+
memory?: {
|
|
86
|
+
workingSetBytes?: number;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export interface IMetricsNodeSample {
|
|
90
|
+
name?: string;
|
|
91
|
+
timestamp?: number;
|
|
92
|
+
summary?: {
|
|
93
|
+
cpu?: {
|
|
94
|
+
usageNanoCores?: number;
|
|
95
|
+
};
|
|
96
|
+
memory?: {
|
|
97
|
+
workingSetBytes?: number;
|
|
98
|
+
};
|
|
99
|
+
network?: {
|
|
100
|
+
rxBytes?: number;
|
|
101
|
+
txBytes?: number;
|
|
102
|
+
};
|
|
103
|
+
pods?: IMetricsPodSample[];
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
export interface IMetricsSample {
|
|
107
|
+
/** Segundos entre lecturas. Sin esto, una serie de numeros no dice a que ritmo pasa el tiempo. */
|
|
108
|
+
metricsInterval?: number;
|
|
109
|
+
cluster: {
|
|
110
|
+
vcpus: number;
|
|
111
|
+
memory: number;
|
|
112
|
+
/** Porcentajes, 0-100. */
|
|
113
|
+
cpuUsage: number;
|
|
114
|
+
memoryUsage: number;
|
|
115
|
+
txmbps: number;
|
|
116
|
+
rxmbps: number;
|
|
117
|
+
};
|
|
118
|
+
nodes: IMetricsNodeSample[];
|
|
119
|
+
}
|
|
77
120
|
/** Metricas del cluster (`ECapability.METRICS`). */
|
|
78
121
|
export interface IMetricsCapability {
|
|
79
|
-
/** Muestras
|
|
80
|
-
samples:
|
|
122
|
+
/** Muestras que el core mantiene en memoria. La mas reciente, al final. */
|
|
123
|
+
samples: IMetricsSample[];
|
|
81
124
|
}
|
|
82
125
|
/**
|
|
83
126
|
* Un elemento del buffer de eventos del core: el tipo de cambio y el objeto tal y como vino de la API.
|
package/dist/back.js
CHANGED
|
@@ -469,7 +469,7 @@ const buildToolHost = (requires, context) => {
|
|
|
469
469
|
};
|
|
470
470
|
}
|
|
471
471
|
if (requires.includes(index_1.ECapability.METRICS))
|
|
472
|
-
host.metrics = { samples: (_a = context.clusterMetrics) !== null && _a !== void 0 ? _a : [] };
|
|
472
|
+
host.metrics = { samples: ((_a = context.clusterMetrics) !== null && _a !== void 0 ? _a : []) };
|
|
473
473
|
if (requires.includes(index_1.ECapability.EVENTS))
|
|
474
474
|
host.events = { recent: ((_b = context.clusterEvents) !== null && _b !== void 0 ? _b : []) };
|
|
475
475
|
if (requires.includes(index_1.ECapability.REPOS))
|