modulekit

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package modulekit provides module-safe accessors for runtime dependencies.

Index

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

func (r Runtime) AuthEngine() *goauth.Engine

AuthEngine returns configured goAuth engine when auth is enabled.

func (Runtime) AuthMode

func (r Runtime) AuthMode(overrides ...auth.Mode) auth.Mode

AuthMode returns resolved auth mode, optionally overridden per route.

func (Runtime) CacheConfig

func (r Runtime) CacheConfig() config.CacheConfig

CacheConfig returns resolved cache configuration snapshot.

func (Runtime) CacheManager

func (r Runtime) CacheManager() *cache.Manager

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) DocumentStore added in v0.7.0

func (r Runtime) DocumentStore() storage.DocumentStore

DocumentStore returns the document storage backend.

func (Runtime) Limiter

func (r Runtime) Limiter() ratelimit.Limiter

Limiter returns configured route limiter when rate limiting is enabled.

func (Runtime) RateLimitConfig

func (r Runtime) RateLimitConfig() config.RateLimitConfig

RateLimitConfig returns resolved rate-limit configuration snapshot.

func (Runtime) Redis

func (r Runtime) Redis() *redis.Client

Redis returns configured redis client when Redis is enabled.

func (Runtime) RelationalStore added in v0.7.0

func (r Runtime) RelationalStore() storage.RelationalStore

RelationalStore returns the relational storage backend.

func (Runtime) Store added in v0.7.0

func (r Runtime) Store() storage.Store

Store returns the primary configured storage backend.

Jump to

Keyboard shortcuts

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