Documentation
¶
Overview ¶
Package modulekit provides module-safe accessors for runtime dependencies.
Index ¶
- type Runtime
- func (r Runtime) AuthEngine() *goauth.Engine
- func (r Runtime) AuthMode(overrides ...auth.Mode) auth.Mode
- func (r Runtime) CacheConfig() config.CacheConfig
- func (r Runtime) CacheManager() *cache.Manager
- func (r Runtime) Dependencies() *app.Dependencies
- func (r Runtime) Limiter() ratelimit.Limiter
- func (r Runtime) Postgres() *pgxpool.Pool
- func (r Runtime) RateLimitConfig() config.RateLimitConfig
- func (r Runtime) Redis() *redis.Client
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime gives modules a single injected surface for optional infrastructure dependencies used during route registration and handler/service wiring.
func New ¶
func New(deps *app.Dependencies) Runtime
New creates a module runtime wrapper around app dependencies.
func (Runtime) AuthEngine ¶
AuthEngine returns configured goAuth engine when auth is enabled.
func (Runtime) CacheConfig ¶
func (r Runtime) CacheConfig() config.CacheConfig
CacheConfig returns resolved cache configuration snapshot.
func (Runtime) CacheManager ¶
CacheManager returns configured cache manager when caching is enabled.
func (Runtime) Dependencies ¶
func (r Runtime) Dependencies() *app.Dependencies
Dependencies returns raw dependency bag for advanced module wiring.
func (Runtime) RateLimitConfig ¶
func (r Runtime) RateLimitConfig() config.RateLimitConfig
RateLimitConfig returns resolved rate-limit configuration snapshot.
Click to show internal directories.
Click to hide internal directories.