Help us shape the future of Go! Take the 2026 Go Developer Survey

app

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: AGPL-3.0 Imports: 31 Imported by: 0

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

func New(cfg *config.Config) (*App, error)

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) Close

func (app *App) Close()

Close cleans up application resources.

func (*App) Run

func (app *App) Run() error

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.

func (*App) Test

func (app *App) Test(req *http.Request) (*http.Response, error)

Test processes an HTTP request through the Fiber app and returns the response.

Parameters:

  • req: The request to process.

Returns:

  • resp: The response the router produced.
  • error: Non-nil when the router cannot process the request.

Directories

Path Synopsis
Package health provides health check logic for the outtake server.
Package health provides health check logic for the outtake server.

Jump to

Keyboard shortcuts

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