Documentation
¶
Overview ¶
Package app provides the Application service layer that owns the full Genie lifecycle: config → bootstrap → start → close. It is the single place where all dependencies (DB, tools, codeowner, messenger, cron, background worker, HTTP server) are wired together.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Application orchestrates the Genie lifecycle. Create one with NewApplication, call Bootstrap to initialise all dependencies, then Start to run the HTTP server. Call Close to release resources.
func NewApplication ¶
func NewApplication( config config.GenieConfig, workingDir string, ) (*Application, error)
NewApplication creates a new Application with validated parameters. No side-effects — heavy initialisation happens in Bootstrap.
func (*Application) Bootstrap ¶
func (a *Application) Bootstrap(ctx context.Context) error
Bootstrap initialises all dependencies: database, tools, vector memory, audit logger, HITL approval store, cron store, messenger, and the CodeOwner agent. Call exactly once after NewApplication.
func (*Application) Close ¶
func (a *Application) Close(ctx context.Context)
Close releases all resources acquired during Bootstrap. Safe to call even if Bootstrap was only partially successful.