Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Project Structure

jetwarp is a multi-module repository. Each adapter and driver lives in its own go.mod so downstream users only download what they actually import.


Top-level layout

/
├── adapter/                # Core adapter + registry (root module)
├── compat/
│   └── routingpath/        # Public façade for path normalization (root module)
├── drv/                    # Driver interface: drv.Drv, capabilities, kinds (root module)
├── drivers/v1/             # Concrete drivers — each is a separate Go module
│   ├── chi/
│   ├── echo/
│   ├── fiber/
│   ├── gin/
│   └── stdlib/
├── internal/
│   └── routingpath/        # Implementation (not importable from submodules)
├── openapi/
│   └── oas3/               # OpenAPI 3.2 generator (separate module)
│       └── validate/       # Dev-only spec validator (separate module)
├── tests/
│   ├── suite/              # Conformance suite: RunDriver, RunAdapter, RunDriverSmoke
│   └── testkit/            # Mock drivers used by the suite
├── tools/                  # Shell scripts: test-all.sh, lint-all.sh, release.sh, …
├── docs/                   # This documentation site (mdBook)
├── examples/               # Runnable example applications
├── go.mod                  # Root module: codeberg.org/iaconlabs/jetwarp
├── errors.go               # Sentinel errors (ErrJetwarp, ErrNilDriver, …)
├── version.go              # Version constant
├── STABILITY.md            # Public API stability policy
├── CHANGELOG.md            # Release notes
└── RELEASE_GUIDE.md        # Operator runbook for releases

go.work is not committed. Contributors create it locally with go work init.


What lives in which module

Package pathModuleNotes
adapter/rootCore router, middleware composition, registry
adapter/chi/adapter/chiChi adapter wrapper (one-liner: core.New(driver.New()))
adapter/echo/adapter/echoEcho adapter wrapper
adapter/fiber/adapter/fiberFiber adapter wrapper
adapter/gin/adapter/ginGin adapter wrapper
adapter/stdlib/adapter/stdlibStdlib adapter wrapper
compat/routingpath/rootStable façade for submodules to import
drv/rootdrv.Drv interface, Capability, Kind, Method
drivers/v1/chi/drivers/v1/chichi driver implementation
drivers/v1/echo/drivers/v1/echoEcho v5 driver
drivers/v1/fiber/drivers/v1/fiberFiber v3 driver
drivers/v1/gin/drivers/v1/ginGin driver
drivers/v1/stdlib/drivers/v1/stdlibstdlib (net/http) driver
internal/routingpath/rootPath normalization + validation (implementation)
openapi/oas3/openapi/oas3OpenAPI 3.2 generator
openapi/oas3/validate/openapi/oas3/validatepb33f-powered validator (dev-only)
tests/suite/rootConformance test entry points
tests/testkit/rootMock drivers

Why compat/routingpath exists

Go’s internal/ visibility rules prevent submodules from importing packages under internal/ of the root module. Because drivers, adapters, and the OpenAPI module all need path normalization helpers, there is a thin public façade at compat/routingpath that re-exports the relevant functions.

compat/routingpath is classified as “Internal-stability” in STABILITY.md. It is not a primary user-facing API but is stable enough for drivers built inside or alongside this repo.


Key files in the root module

  • errors.go — all sentinel errors (ErrJetwarp, ErrNilDriver, ErrNativeMWUnsupported, …)
  • adapter/adapter.go — the Adapter and RegistryProvider interfaces
  • adapter/router_implementation.go — core adapter implementation
  • drv/driver.go — the Drv interface
  • drv/capabilities.go — capability bitmask and constants
  • tests/suite/driver_suite.goRunDriver entry point
  • tests/suite/adapter_suite.goRunAdapter entry point

Tools

ScriptPurpose
tools/test-all.shRun go test ./... for every module
tools/lint-all.shRun golangci-lint for every module
tools/open_api_smoke.shSmoke-test OpenAPI output
tools/release.shCreate and (optionally) push lockstep tags

The release runbook is in RELEASE_GUIDE.md.