durable-streaming-firestore

command
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

This sample demonstrates durable streaming with Firestore backend. Unlike in-memory streaming, Firestore-backed streams survive server restarts and can be accessed across multiple server instances.

Prerequisites:

  • Firebase/GCP project with Firestore enabled
  • Run: gcloud auth application-default login
  • Set: export FIREBASE_PROJECT_ID=your-project-id

To run:

go run .

In another terminal, start a streaming request:

curl -N -i -H "Accept: text/event-stream" \
  -d '{"data": 5}' \
  http://localhost:8088/countdown

Note the X-Genkit-Stream-Id header. To reconnect to the same stream:

curl -N -H "Accept: text/event-stream" \
  -H "X-Genkit-Stream-Id: <stream-id>" \
  -d '{"data": 5}' \
  http://localhost:8088/countdown

Jump to

Keyboard shortcuts

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