Expand description
OTP-shaped behavior callbacks — the typed slot of caixa.lisp
that points at the .lisp files implementing the lifecycle.
See theory/INSPIRATIONS.md §II.3 for the prior-art frame
(gen_server, gen_statem, gen_event). Authors implement the
callbacks; the runtime owns init / message dispatch / terminate.
(defcaixa
:nome "my-service"
:versao "0.1.0"
:kind Servico
:behavior ((:on-init "lib/init.lisp")
(:on-call "lib/handlers.lisp")
(:on-cast "lib/handlers.lisp")
(:on-info "lib/handlers.lisp")
(:on-state-change "lib/migrations.lisp")
(:on-terminate "lib/cleanup.lisp"))
:servicos ("servicos/my-service.computeunit.yaml"))Each slot is optional — caixas without explicit callbacks fall
back to the runtime defaults (no-op init, raw HTTP dispatch,
noop terminate). The StandardLayout invariant in layout.rs
verifies every declared path exists on disk before the build.
Structs§
- Behavior
Spec - Path-to-callback bindings for an OTP-shaped Servico.