natsrt

package module
v0.0.0-...-8769a7f Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 6 Imported by: 0

README

realtime-nats

A NATS transport for togo realtime. Implements togo.Broker: Publish fans events over a NATS subject (so every app instance — and any other service on your NATS — receives them), and the SSE Handler subscribes to NATS and streams events to browsers. Overrides the default in-process SSE broker.

Great for multi-instance fan-out and bridging your message queue to services.

Install

togo install togo-framework/realtime-nats

Configure (.env)

NATS_URL=nats://127.0.0.1:4222
NATS_SUBJECT=togo.realtime

If NATS is unreachable at boot, the plugin logs and keeps the default broker.

MIT © togo-framework

Documentation

Overview

Package natsrt is a NATS transport for togo realtime. It implements togo.Broker: Publish fans events out over a NATS subject (so every app instance and any other service connected to NATS receives them), and Handler() is an SSE endpoint that subscribes to NATS and streams events to browser clients. Overrides the default in-process SSE broker when installed.

togo install togo-framework/realtime-nats

Env: NATS_URL (default nats://127.0.0.1:4222), NATS_SUBJECT (default togo.realtime).

Jump to

Keyboard shortcuts

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