Files
questions/aggregates.yaml
T

24 lines
780 B
YAML
Raw Normal View History

# State graphs for event-sourced buckets - see portal's
# src/aggregates/mod.rs. Bucket names are redoal_-prefixed because
# both portal instances (uhhm.no and redoal.com) share one NATS
# JetStream; a bare "subscribers" would collide with uhhm's.
#
# redoal_gestures (index.yaml's record_as for drawn paths) has no
# entry on purpose: plain KV, no lifecycle - a drawn gesture is a
# fact, not a process.
aggregates:
- bucket: redoal_subscribers
initial: open
states:
open: { event: subscribed }
unsubscribed: { event: unsubscribed }
transitions:
open: [unsubscribed]
- bucket: redoal_watchers
initial: open
states:
open: { event: subscribed }
unsubscribed: { event: unsubscribed }
transitions:
open: [unsubscribed]