demoapp

command
v0.0.0-...-93c756f Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

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.

Jump to

Keyboard shortcuts

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