pubsub

package
v1.801.264 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package pubsub embeds the Hanzo PubSub core data plane (NATS + JetStream) as an in-process cloud subsystem (HIP-0106) — the same fold pattern as iam/kms/tasks. When enabled it binds the NATS client port (default :4222) and serves JetStream over the cloud data dir; the embedded Kafka adaptor (clients/kafka) and any in-cluster NATS/Kafka client talk to it. It is a single embedded node running JetStream over the local file store — there is NO ZooKeeper, raft, or etcd in the path (Lux consensus only; the optional Quasar PQ control plane is a follow-up, see github.com/hanzoai/pubsub/embed).

It mounts NO HTTP routes of its own: it is a background TCP server. Cloud's generic per-subsystem liveness route answers /v1/pubsub/health, and the K8s Service TCP-probes :4222 directly.

ACTIVATION is opt-in via CLOUD_PUBSUB_ENABLED (a staged cutover from the standalone `pubsub` Deployment). Unset ⇒ the subsystem is a no-op and binds nothing, so every existing deployment is unaffected. Enabled ⇒ Open fails CLOSED: a bind/start error aborts boot rather than serving a phantom messaging plane.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mount

func Mount(app cloud.Router, deps cloud.Deps) error

Mount starts the embedded PubSub server when CLOUD_PUBSUB_ENABLED is set, binding NATS + JetStream in-process. Disabled by default (no-op).

func Shutdown added in v1.786.216

func Shutdown(_ context.Context) error

shutdown stops the embedded server on graceful cloud shutdown. Idempotent.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL