Module System
How Redelay's plugin-based module system works in Go and Python.
2 min readConcept
Every feature in Redelay — events, auth, scheduler, storage — is a module that self-registers at startup. You blank-import it in Go or add it to the module list in Python.
Defining a module
Registering modules
Module interfaces (Go)
| Interface | Purpose |
|---|---|
Module | Base — Name(), Startup(), Shutdown() |
RoutesProvider | Mount HTTP routes via Routes(Router) |
MiddlewareProvider | Register middleware via Middleware(Router) |
MountProvider | Mount sub-routers at a path prefix |
Configurable | Discover other modules via Configure(*Registry) |
MCPProvider | Expose operations as MCP tools |
EventsProvider | Declare Kafka consumers via Consumers() |
Built-in modules
| Module | Package | Purpose |
|---|---|---|
auth | go-framework/modules/auth | JWT auth, token rotation, OAuth2 |
users | go-framework/modules/users | User CRUD, password hashing |
groups | go-framework/modules/groups | RBAC permission groups |
health | go-framework/modules/health | Health check endpoint |
openapi | go-framework/modules/openapi | Auto-generated API docs |
mcp | go-framework/modules/mcp | Model Context Protocol server |
modspec | go-framework/modules/modspec | Visual module browser |
Was this page helpful?