Documentation
¶
Overview ¶
Command demoapp is the Caerus Motors reference binary.
main.go is the golden-path wiring file: declare FrameworkOptions (always-on core seeds + chassis + the Motors app class) and RunWithSignals. Configuration sources are owned by their components; the framework absorbs argv. Product machinery lives under the app as Subcomponents (interest VPQ, catalog-summary refresher) — main does not declare those siblings.
Process shapes:
serve (default) — HTTP API, interest VPQ, catalog-summary, signals
--postgresql.job=migrate — Init postgres + closure → Migrate → exit
--demoapp.job=seed — Init app closure → seed fleet → exit
--demoapp.job=doctor — Init app closure → ping deps → exit
--demoapp.job=price — Init app closure → get|set price → exit
(positional: get <uuid> | set <uuid> <cents>)
Production multi-replica: run `--postgresql.job=migrate` as a Job, then serve without migrate-on-init. This binary keeps migrate-on-init ON so `make run` stays one command locally.
Click to show internal directories.
Click to hide internal directories.