CodeVetter · Repo Unpack · System map
gofiber/fiber
The runtime entrypoint is a library API used by consumer applications. App owns configuration, routing, hooks, state, and a context pool, while fasthttp owns HTTP serving. Binding, middleware, and the outbound client form distinct packages around that core. Storage is abstracted behind an interface; repository automation is largely delegated to organization-level GitHub workflows.
- The README's executable example creates fiber.New(), registers app.Get("/", handler), and calls app.Listen(":3000"); applications supply the main function.
- go.mod declares module github.com/gofiber/fiber/v3, Go 1.26.0, fasthttp v1.74.0, schema, utils/v2, and serialization dependencies.
- New constructs the context sync.Pool, hooks, mount fields, process-local State, SharedState, and per-method route stacks before invoking init.
- init starts configured services, loads configured views, constructs fasthttp.Server, and transfers body limits, timeouts, buffer sizes, and streaming settings to it.
- Listen supports cloned TLSConfig, certificate files, AutoCertManager, client-certificate configuration, and a prefork branch; ordinary serving ends in server.Serve(ln).
- Prefork delegates process management to fasthttp/prefork with REUSEPORT, recovery settings, and a child ServeFunc that performs application startup.
- State holds dependencies in sync.Map; SharedState delegates byte and encoded-value operations to Config.SharedStorage through the context-aware Storage interface.
- Makefile defines audit, benchmark, generation, formatting, lint, and race-enabled testing; lint and benchmark workflows delegate execution to gofiber/.github workflows referenced at main.