mirror of
https://github.com/DeBrosOfficial/orama.git
synced 2026-06-17 10:14:13 +00:00
- Add migrations for per-namespace publish sequences and persistent WebSocket function settings - Integrate PersistentWSManager and WSBridge into the gateway dependency graph - Upgrade serverless engine to use a multi-tier rate limiter - Update JWT claims to support custom application-defined fields
22 lines
974 B
Go
22 lines
974 B
Go
// Package persistent implements long-lived per-WebSocket WASM function
|
|
// instances. A persistent function is bound to one WS connection for its
|
|
// entire lifetime — its WASM module is instantiated once at upgrade,
|
|
// retains memory across frames, and is torn down on disconnect.
|
|
//
|
|
// See plan: core/plans/platform/06_PERSISTENT_WS_FUNCTIONS.md
|
|
//
|
|
// ABI: persistent functions export three WASM functions instead of using
|
|
// the default _start:
|
|
//
|
|
// ws_open(payloadPtr, payloadLen) → uint32 // 0 = accept, 1 = reject
|
|
// ws_frame(payloadPtr, payloadLen) → uint32 // 0 = ok, 1 = close
|
|
// ws_close(reasonPtr, reasonLen) → void
|
|
//
|
|
// The host calls each export at the appropriate lifecycle point. Frames
|
|
// are processed serially per connection — wazero instances are NOT
|
|
// goroutine-safe.
|
|
//
|
|
// Replies use the existing ws_send / ws_broadcast host functions; the
|
|
// function caches its own client_id (passed in ws_open) for outbound writes.
|
|
package persistent
|