Documentation
¶
Overview ¶
Package app provides the application composition root and lifecycle management. It wires all dependencies and provides the main entry point for running the server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App holds the application state and dependencies.
func New ¶
New creates a new App with all dependencies initialized.
Parameters:
- cfg: The loaded configuration every dependency is built from.
Returns:
- app: The wired application.
- error: Non-nil when a dependency fails to initialize.
func (*App) Run ¶
Run starts the application server and blocks until shutdown.
Once the application's context ends, it returns only after the requests still running have finished or shutdownTimeout has passed, so Close never stops the queue or the database under them.
Returns:
- error: Non-nil when the listener fails for a reason other than shutdown.
Click to show internal directories.
Click to hide internal directories.