@rivetkit/rivetkit-napi 2.3.0-rc.6 → 2.3.0-rc.8
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/index.d.ts +13 -7
- package/index.js +10 -1
- package/package.json +9 -9
package/index.d.ts
CHANGED
|
@@ -174,16 +174,24 @@ export interface JsServerlessResponseHead {
|
|
|
174
174
|
status: number
|
|
175
175
|
headers: Record<string, string>
|
|
176
176
|
}
|
|
177
|
-
export interface
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
body: Buffer
|
|
177
|
+
export interface JsRegistryDiagnostics {
|
|
178
|
+
mode: string
|
|
179
|
+
envoyActiveActorCount?: number
|
|
181
180
|
}
|
|
182
181
|
export interface JsServerlessStreamError {
|
|
183
182
|
group: string
|
|
184
183
|
code: string
|
|
185
184
|
message: string
|
|
186
185
|
}
|
|
186
|
+
export declare function jsSetEventloopLagQuantile(quantile: string, seconds: number): void
|
|
187
|
+
export declare function jsSetEventloopUtilization(value: number): void
|
|
188
|
+
export declare function jsSetEventloopHeartbeatTsMs(epochMs: number): void
|
|
189
|
+
export declare function jsAddProcessCpuSeconds(mode: string, seconds: number): void
|
|
190
|
+
export declare function jsSetProcessResidentMemoryBytes(bytes: number): void
|
|
191
|
+
export declare function jsSetHeapBytes(state: string, bytes: number): void
|
|
192
|
+
export declare function jsObserveGcDuration(kind: string, seconds: number): void
|
|
193
|
+
export declare function jsSetActiveHandles(count: number): void
|
|
194
|
+
export declare function jsSetActiveRequests(count: number): void
|
|
187
195
|
/** Options for KV list operations. */
|
|
188
196
|
export interface JsKvListOptions {
|
|
189
197
|
reverse?: boolean
|
|
@@ -317,9 +325,7 @@ export declare class CoreRegistry {
|
|
|
317
325
|
*/
|
|
318
326
|
shutdown(): Promise<void>
|
|
319
327
|
actorStopThresholdMs(): Promise<number | null>
|
|
320
|
-
|
|
321
|
-
metadata(): JsRegistryRouteResponse
|
|
322
|
-
metrics(): JsRegistryRouteResponse
|
|
328
|
+
diagnostics(): Promise<JsRegistryDiagnostics>
|
|
323
329
|
handleServerlessRequest(req: JsServerlessRequest, onStreamEvent: (...args: any[]) => any, cancelToken: CancellationToken, config: JsServeConfig): Promise<JsServerlessResponseHead>
|
|
324
330
|
}
|
|
325
331
|
export declare class Schedule {
|
package/index.js
CHANGED
|
@@ -310,7 +310,7 @@ if (!nativeBinding) {
|
|
|
310
310
|
throw new Error(`Failed to load native binding`)
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
const { ActorContext, NapiActorFactory, CancellationToken, ConnHandle, JsNativeDatabase, Kv, Queue, QueueMessage, CoreRegistry, Schedule, WebSocket } = nativeBinding
|
|
313
|
+
const { ActorContext, NapiActorFactory, CancellationToken, ConnHandle, JsNativeDatabase, Kv, Queue, QueueMessage, CoreRegistry, jsSetEventloopLagQuantile, jsSetEventloopUtilization, jsSetEventloopHeartbeatTsMs, jsAddProcessCpuSeconds, jsSetProcessResidentMemoryBytes, jsSetHeapBytes, jsObserveGcDuration, jsSetActiveHandles, jsSetActiveRequests, Schedule, WebSocket } = nativeBinding
|
|
314
314
|
|
|
315
315
|
module.exports.ActorContext = ActorContext
|
|
316
316
|
module.exports.NapiActorFactory = NapiActorFactory
|
|
@@ -321,5 +321,14 @@ module.exports.Kv = Kv
|
|
|
321
321
|
module.exports.Queue = Queue
|
|
322
322
|
module.exports.QueueMessage = QueueMessage
|
|
323
323
|
module.exports.CoreRegistry = CoreRegistry
|
|
324
|
+
module.exports.jsSetEventloopLagQuantile = jsSetEventloopLagQuantile
|
|
325
|
+
module.exports.jsSetEventloopUtilization = jsSetEventloopUtilization
|
|
326
|
+
module.exports.jsSetEventloopHeartbeatTsMs = jsSetEventloopHeartbeatTsMs
|
|
327
|
+
module.exports.jsAddProcessCpuSeconds = jsAddProcessCpuSeconds
|
|
328
|
+
module.exports.jsSetProcessResidentMemoryBytes = jsSetProcessResidentMemoryBytes
|
|
329
|
+
module.exports.jsSetHeapBytes = jsSetHeapBytes
|
|
330
|
+
module.exports.jsObserveGcDuration = jsObserveGcDuration
|
|
331
|
+
module.exports.jsSetActiveHandles = jsSetActiveHandles
|
|
332
|
+
module.exports.jsSetActiveRequests = jsSetActiveRequests
|
|
324
333
|
module.exports.Schedule = Schedule
|
|
325
334
|
module.exports.WebSocket = WebSocket
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivetkit/rivetkit-napi",
|
|
3
|
-
"version": "2.3.0-rc.
|
|
3
|
+
"version": "2.3.0-rc.8",
|
|
4
4
|
"description": "Native N-API addon for RivetKit providing envoy client and SQLite access",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "index.js",
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@napi-rs/cli": "^2.18.4",
|
|
46
|
-
"@rivetkit/engine-envoy-protocol": "2.3.0-rc.
|
|
46
|
+
"@rivetkit/engine-envoy-protocol": "2.3.0-rc.8"
|
|
47
47
|
},
|
|
48
48
|
"optionalDependencies": {
|
|
49
|
-
"@rivetkit/rivetkit-napi-darwin-arm64": "2.3.0-rc.
|
|
50
|
-
"@rivetkit/rivetkit-napi-darwin-x64": "2.3.0-rc.
|
|
51
|
-
"@rivetkit/rivetkit-napi-linux-arm64-gnu": "2.3.0-rc.
|
|
52
|
-
"@rivetkit/rivetkit-napi-linux-arm64-musl": "2.3.0-rc.
|
|
53
|
-
"@rivetkit/rivetkit-napi-linux-x64-gnu": "2.3.0-rc.
|
|
54
|
-
"@rivetkit/rivetkit-napi-linux-x64-musl": "2.3.0-rc.
|
|
55
|
-
"@rivetkit/rivetkit-napi-win32-x64-msvc": "2.3.0-rc.
|
|
49
|
+
"@rivetkit/rivetkit-napi-darwin-arm64": "2.3.0-rc.8",
|
|
50
|
+
"@rivetkit/rivetkit-napi-darwin-x64": "2.3.0-rc.8",
|
|
51
|
+
"@rivetkit/rivetkit-napi-linux-arm64-gnu": "2.3.0-rc.8",
|
|
52
|
+
"@rivetkit/rivetkit-napi-linux-arm64-musl": "2.3.0-rc.8",
|
|
53
|
+
"@rivetkit/rivetkit-napi-linux-x64-gnu": "2.3.0-rc.8",
|
|
54
|
+
"@rivetkit/rivetkit-napi-linux-x64-musl": "2.3.0-rc.8",
|
|
55
|
+
"@rivetkit/rivetkit-napi-win32-x64-msvc": "2.3.0-rc.8"
|
|
56
56
|
}
|
|
57
57
|
}
|