Files
0dd334f3f4 embed: public in-process NATS+JetStream embedding surface for cloud (#24)
Add package embed — the ONE public surface for folding the Hanzo PubSub core
data plane (NATS + JetStream) into a host binary (hanzoai/cloud, HIP-0106),
mirroring iam/kms/tasks. Open() builds server.NewServer with JetStream on and
NoSigs (host owns signals), waits ReadyForConnections, and returns a handle with
ClientURL/NATS/Shutdown. Imports ONLY the self-contained, luxfi-free server
package — the same core the standalone pubsub deployment runs in prod
(--jetstream --store_dir, no consensus flags) — so a host compiles it cleanly
against its own dep set. Single-node JetStream over the file store: no
ZooKeeper/raft/etcd. The optional Quasar PQ + zapdb control plane stays in
package main (its internal/consensus adapter is pinned to the legacy
luxfi/consensus v1.22 API and is a follow-up to migrate before embedding).

Test proves a client round-trips core NATS and persists a JetStream publish.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
2026-07-07 14:08:21 -07:00
..