chi

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package chi provides Chi router integration for Modulex.

Instead of forcing every Modulex consumer to depend on Chi, the core modulex.Registry no longer exposes a Router method. Applications that use Chi register the router as a typed service and modules that need it resolve the service by its key.

Index

Constants

This section is empty.

Variables

View Source
var RouterKey = modulex.NewKey[gochi.Router]("chi.Router")

RouterKey is the typed service key used to register and resolve a Chi router.

Functions

func RegisterRouter

func RegisterRouter(reg modulex.Registry, router gochi.Router) error

RegisterRouter registers a Chi router in the registry so modules can resolve it without importing modulex/chi in the composition root.

func ResolveRouter

func ResolveRouter(reg modulex.Registry) (gochi.Router, error)

ResolveRouter retrieves the Chi router registered by RegisterRouter.

Types

This section is empty.

Jump to

Keyboard shortcuts

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