Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
66283b2
docs: revise reimplementation plans with gap analysis
intel352 Mar 9, 2026
655bd1a
feat: add aggregate health service with providers, caching, and event…
intel352 Mar 9, 2026
316def2
feat: add TenantGuard enforcement layer for multi-tenant isolation
intel352 Mar 9, 2026
64bb3f6
feat: add dynamic reload manager with orchestrator, circuit breaker, …
intel352 Mar 9, 2026
baea918
feat: add contract verifier and performance benchmarks
intel352 Mar 9, 2026
6eb0971
feat: add BDD contract tests for reload and health subsystems
intel352 Mar 9, 2026
8f84f87
fix: resolve CI lint failures and letsencrypt checksum mismatch
intel352 Mar 9, 2026
3867ff2
fix: address all PR review comments
intel352 Mar 9, 2026
bbb7e2a
fix: address second round of PR review comments
intel352 Mar 10, 2026
80289d2
fix: address remaining PR review comments (round 3)
intel352 Mar 10, 2026
d29ee4a
fix: address round 4 PR review comments
intel352 Mar 10, 2026
9979492
fix: resolve contextcheck lint error in handleReload
intel352 Mar 10, 2026
e42a1d4
fix: address round 5 PR review comments
intel352 Mar 10, 2026
e48b208
fix: resolve err113 and wrapcheck lint errors
intel352 Mar 10, 2026
1adce01
docs: add modular v2 enhancements design doc
intel352 Mar 10, 2026
5a97bac
docs: add modular v2 enhancements implementation plan
intel352 Mar 10, 2026
c1477b9
chore: upgrade to Go 1.26, fix plan tech stack reference
intel352 Mar 10, 2026
fa3494f
Add WithModuleDependency builder option for config-driven dependency …
intel352 Mar 10, 2026
40d2094
feat: add Drainable interface with PreStop drain phase
intel352 Mar 10, 2026
ad2b8e5
feat: add application phase tracking with lifecycle transitions
intel352 Mar 10, 2026
ff0fc8b
feat: add WithParallelInit for concurrent module initialization
intel352 Mar 10, 2026
45ae6aa
feat: add RegisterTypedService/GetTypedService generic helpers
intel352 Mar 10, 2026
dd36523
feat: add OnServiceReady callback for service readiness events
intel352 Mar 10, 2026
ea32f0c
feat: add Plugin interface with WithPlugins builder option
intel352 Mar 10, 2026
d3d44a4
feat: add WithDynamicReload to wire ReloadOrchestrator into app lifec…
intel352 Mar 10, 2026
f404d1d
feat: add SecretResolver interface and ExpandSecrets utility
intel352 Mar 10, 2026
a7b59a2
feat: add configwatcher module with fsnotify file watching
intel352 Mar 10, 2026
1d9270e
feat: add SlogAdapter wrapping *slog.Logger for Logger interface
intel352 Mar 10, 2026
107589b
feat: add MetricsProvider interface and CollectAllMetrics
intel352 Mar 10, 2026
570c970
fix: address code review findings (C1, C2, I1-I3)
intel352 Mar 10, 2026
7a055f0
refactor: modernize codebase with gopls quickfixes
intel352 Mar 10, 2026
ef9f676
fix: address Copilot review findings from PR #83
intel352 Mar 10, 2026
63fd288
merge: resolve conflicts from origin/main into feat/reimplementation
intel352 Mar 10, 2026
357f242
fix: eliminate currentModule race in parallel init
intel352 Mar 10, 2026
ae4d98e
ci: upgrade Go version from 1.25 to 1.26 in all workflows
intel352 Mar 10, 2026
9b0913f
chore: upgrade Go 1.25 to 1.26 in all sub-module and example go.mod f…
intel352 Mar 10, 2026
5450d76
fix: address Go 1.26 lint issues in reverseproxy, scheduler, eventbus
intel352 Mar 10, 2026
8ec80f1
fix: resolve core lint issues (gofmt, errcheck, wrapcheck)
intel352 Mar 10, 2026
ae21c93
fix: resolve go vet false positives on Debug interface in feeders/yam…
intel352 Mar 10, 2026
d0d3f76
fix: correct gofmt formatting and nolint directive syntax
intel352 Mar 10, 2026
26568ef
fix: address Copilot review — mutex safety, slice copy, infinite loop…
intel352 Mar 10, 2026
c7248f4
fix: add gosec G118 suppression for kinesis and custom_memory eventbus
intel352 Mar 10, 2026
393a0e9
fix: pass full dependency graph to computeDepthLevels for accurate pa…
intel352 Mar 11, 2026
139711e
fix: reverseproxy proxy copies must preserve Director for backwards c…
intel352 Mar 11, 2026
c40ebeb
fix: resolve CI failures in examples, configwatcher, contract check, …
intel352 Mar 11, 2026
68985e4
fix: address remaining review comments — races, locking, interfaces, …
intel352 Mar 11, 2026
0483c23
fix: unwrap decorators for builder options, validate dependency hints
intel352 Mar 11, 2026
9dbf0e0
fix: use wrapped static error for dependency hint validation (err113)
intel352 Mar 11, 2026
5dedc9d
feat(eventbus): implement MetricsProvider and Drainable interfaces
intel352 Mar 11, 2026
1361527
feat(cache): implement MetricsProvider and Reloadable interfaces
intel352 Mar 11, 2026
b15c0aa
feat(scheduler): implement MetricsProvider and Drainable interfaces
intel352 Mar 11, 2026
89d13df
feat(database): implement MetricsProvider, Drainable, and Reloadable …
intel352 Mar 11, 2026
595d99a
feat(reverseproxy): implement MetricsProvider and Drainable interfaces
intel352 Mar 11, 2026
1cfda76
feat(httpserver): implement Drainable, Reloadable, and MetricsProvider
intel352 Mar 11, 2026
fdd7c23
chore: bump remaining modules to modular v1.12.1
intel352 Mar 11, 2026
23e1ed3
feat(eventlogger): implement Drainable interface
intel352 Mar 11, 2026
cce790f
merge: resolve conflicts from origin/main
intel352 Mar 11, 2026
5473869
style: fix gofmt formatting in examples and module tests
intel352 Mar 11, 2026
8783828
fix: remove replace directives, guard generateUniqueName Elem() panic
intel352 Mar 11, 2026
79877c0
fix: address data races and PR review feedback in v2 interfaces
intel352 Mar 11, 2026
4400b8c
fix: address CI failures — lint err113, eventlogger buffer overflow
intel352 Mar 11, 2026
362b7c4
fix: address PR review round 3 — sync, race, and logic fixes
intel352 Mar 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions examples/logger-reconfiguration/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func main() {

// Create a new logger based on configuration settings
var handler slog.Handler

// Configure handler based on log format
switch cfg.LogFormat {
case "json":
Expand All @@ -49,10 +49,10 @@ func main() {

// Create new logger with configuration-based settings
newLogger := slog.New(handler)

// Replace the logger before modules initialize
app.SetLogger(newLogger)

newLogger.Info("Logger reconfigured from configuration",
"format", cfg.LogFormat,
"level", cfg.LogLevel)
Expand Down Expand Up @@ -154,11 +154,11 @@ func (m *ServiceModule) Init(app modular.Application) error {
// This module also caches the logger
m.logger = app.Logger()
m.logger.Info("ServiceModule initialized", "module", m.Name(), "status", "ready")

// Demonstrate that the logger has the correct configuration
m.logger.Debug("Service module debug information",
m.logger.Debug("Service module debug information",
"feature", "logger_reconfiguration",
"working", true)

return nil
}
2 changes: 1 addition & 1 deletion modules/auth/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/GoCodeAlone/modular/modules/auth
go 1.26

require (
github.com/GoCodeAlone/modular v1.12.0
github.com/GoCodeAlone/modular v1.12.1
github.com/cloudevents/sdk-go/v2 v2.16.2
github.com/cucumber/godog v0.15.1
github.com/golang-jwt/jwt/v5 v5.2.3
Expand Down
4 changes: 2 additions & 2 deletions modules/auth/go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk=
github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/GoCodeAlone/modular v1.12.0 h1:C4tLfJe65rrUQsbtndiVfldtT8IRKZcHczNRNbBK4wo=
github.com/GoCodeAlone/modular v1.12.0/go.mod h1:ET7mlekRjkRq9mwJdWmaC2KDUWvjla2IqKVFrYO2JnY=
github.com/GoCodeAlone/modular v1.12.1 h1:FEyAPr7vDp+qrSjgWEZI7sH+YUN4/o6R58XuzpCSXUU=
github.com/GoCodeAlone/modular v1.12.1/go.mod h1:mKkOcJtHO/Xlkaeb7G6g0JgRYBwqTyAgQ9Vvs1NosNs=
github.com/cloudevents/sdk-go/v2 v2.16.2 h1:ZYDFrYke4FD+jM8TZTJJO6JhKHzOQl2oqpFK1D+NnQM=
github.com/cloudevents/sdk-go/v2 v2.16.2/go.mod h1:laOcGImm4nVJEU+PHnUrKL56CKmRL65RlQF0kRmW/kg=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
Expand Down
4 changes: 4 additions & 0 deletions modules/cache/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,8 @@ type CacheEngine interface {
//
// The context can be used for operation timeouts.
DeleteMulti(ctx context.Context, keys []string) error

// Stats returns engine-specific metrics as key-value pairs.
// Used by the MetricsProvider interface to collect operational metrics.
Stats(ctx context.Context) map[string]float64
}
2 changes: 1 addition & 1 deletion modules/cache/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.26
toolchain go1.26.0

require (
github.com/GoCodeAlone/modular v1.12.0
github.com/GoCodeAlone/modular v1.12.1
github.com/alicebob/miniredis/v2 v2.35.0
github.com/cloudevents/sdk-go/v2 v2.16.2
github.com/cucumber/godog v0.15.1
Expand Down
4 changes: 2 additions & 2 deletions modules/cache/go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk=
github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/GoCodeAlone/modular v1.12.0 h1:C4tLfJe65rrUQsbtndiVfldtT8IRKZcHczNRNbBK4wo=
github.com/GoCodeAlone/modular v1.12.0/go.mod h1:ET7mlekRjkRq9mwJdWmaC2KDUWvjla2IqKVFrYO2JnY=
github.com/GoCodeAlone/modular v1.12.1 h1:FEyAPr7vDp+qrSjgWEZI7sH+YUN4/o6R58XuzpCSXUU=
github.com/GoCodeAlone/modular v1.12.1/go.mod h1:mKkOcJtHO/Xlkaeb7G6g0JgRYBwqTyAgQ9Vvs1NosNs=
github.com/alicebob/miniredis/v2 v2.35.0 h1:QwLphYqCEAo1eu1TqPRN2jgVMPBweeQcR21jeqDCONI=
github.com/alicebob/miniredis/v2 v2.35.0/go.mod h1:TcL7YfarKPGDAthEtl5NBeHZfeUQj6OXMm/+iu5cLMM=
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
Expand Down
12 changes: 12 additions & 0 deletions modules/cache/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,18 @@ func (c *MemoryCache) DeleteMulti(ctx context.Context, keys []string) error {
return nil
}

// Stats returns memory cache metrics.
func (c *MemoryCache) Stats(_ context.Context) map[string]float64 {
c.mutex.RLock()
count := float64(len(c.items))
maxItems := float64(c.config.MaxItems)
c.mutex.RUnlock()
return map[string]float64{
"item_count": count,
"max_items": maxItems,
}
}

// startCleanupTimer starts the cleanup timer for expired items
func (c *MemoryCache) startCleanupTimer(ctx context.Context) {
// Run cleanup immediately on start
Expand Down
5 changes: 5 additions & 0 deletions modules/cache/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ const ServiceName = "cache.provider"
type CacheModule struct {
name string
config *CacheConfig
configMu sync.RWMutex // protects config field reads/writes during reload
logger modular.Logger
cacheEngine CacheEngine
// subject is the observable subject used for event emission. It can be written
Expand Down Expand Up @@ -377,7 +378,9 @@ func (m *CacheModule) Get(ctx context.Context, key string) (interface{}, bool) {
// err := cache.Set(ctx, "session:abc", sessionData, time.Hour)
func (m *CacheModule) Set(ctx context.Context, key string, value interface{}, ttl time.Duration) error {
if ttl == 0 {
m.configMu.RLock()
ttl = m.config.DefaultTTL
m.configMu.RUnlock()
}

if err := m.cacheEngine.Set(ctx, key, value, ttl); err != nil {
Expand Down Expand Up @@ -511,7 +514,9 @@ func (m *CacheModule) GetMulti(ctx context.Context, keys []string) (map[string]i
// err := cache.SetMulti(ctx, items, time.Minute*30)
func (m *CacheModule) SetMulti(ctx context.Context, items map[string]interface{}, ttl time.Duration) error {
if ttl == 0 {
m.configMu.RLock()
ttl = m.config.DefaultTTL
m.configMu.RUnlock()
}
if err := m.cacheEngine.SetMulti(ctx, items, ttl); err != nil {
return fmt.Errorf("failed to set multiple cache items: %w", err)
Expand Down
16 changes: 16 additions & 0 deletions modules/cache/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,19 @@ func (c *RedisCache) DeleteMulti(ctx context.Context, keys []string) error {
}
return nil
}

// Stats returns redis cache metrics using pool statistics (no network round-trip).
func (c *RedisCache) Stats(_ context.Context) map[string]float64 {
if c.client == nil {
return map[string]float64{"connected": 0}
}
ps := c.client.PoolStats()
return map[string]float64{
"connected": 1,
"pool_hits": float64(ps.Hits),
"pool_misses": float64(ps.Misses),
"total_conns": float64(ps.TotalConns),
"idle_conns": float64(ps.IdleConns),
"stale_conns": float64(ps.StaleConns),
}
}
71 changes: 71 additions & 0 deletions modules/cache/v2_interfaces.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
package cache

import (
"context"
"fmt"
"time"

"github.com/GoCodeAlone/modular"
)

// Compile-time interface checks.
var (
_ modular.MetricsProvider = (*CacheModule)(nil)
_ modular.Reloadable = (*CacheModule)(nil)
)

// CollectMetrics implements modular.MetricsProvider.
// It delegates to the underlying CacheEngine's Stats method.
// Safe to call before Init (returns empty metrics when engine is nil).
func (m *CacheModule) CollectMetrics(ctx context.Context) modular.ModuleMetrics {
if m.cacheEngine == nil {
return modular.ModuleMetrics{Name: m.name, Values: map[string]float64{}}
}
return modular.ModuleMetrics{
Name: m.name,
Values: m.cacheEngine.Stats(ctx),
}
}

// CanReload implements modular.Reloadable.
func (m *CacheModule) CanReload() bool {
return true
}

// ReloadTimeout implements modular.Reloadable.
func (m *CacheModule) ReloadTimeout() time.Duration {
return 5 * time.Second
}

// Reload implements modular.Reloadable.
// It applies configuration changes for DefaultTTL and MaxItems.
// CleanupInterval is not reloadable since the cleanup ticker is already running.
// Config writes are protected by configMu (and the engine's mutex for MaxItems)
// to avoid data races with concurrent reads.
func (m *CacheModule) Reload(_ context.Context, changes []modular.ConfigChange) error {
for _, ch := range changes {
switch ch.FieldPath {
case "defaultTTL":
if d, err := time.ParseDuration(ch.NewValue); err == nil {
m.configMu.Lock()
m.config.DefaultTTL = d
m.configMu.Unlock()
}
case "maxItems":
var n int
if _, err := fmt.Sscan(ch.NewValue, &n); err == nil && n > 0 {
m.configMu.Lock()
// MemoryCache reads MaxItems under its own mutex, so lock both.
if mc, ok := m.cacheEngine.(*MemoryCache); ok {
mc.mutex.Lock()
m.config.MaxItems = n
mc.mutex.Unlock()
} else {
m.config.MaxItems = n
}
m.configMu.Unlock()
}
}
}
return nil
}
73 changes: 73 additions & 0 deletions modules/cache/v2_interfaces_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
package cache

import (
"context"
"testing"
"time"

"github.com/GoCodeAlone/modular"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

// newTestCacheModule creates a CacheModule initialised with a memory engine for testing.
func newTestCacheModule(t *testing.T) (*CacheModule, context.Context) {
t.Helper()
module := NewModule().(*CacheModule)
app := newMockApp()

// Pre-register config with explicit values so struct-tag defaults are not needed.
cfg := &CacheConfig{
Engine: "memory",
DefaultTTL: 300 * time.Second,
CleanupInterval: 60 * time.Second,
MaxItems: 10000,
}
app.RegisterConfigSection(module.Name(), modular.NewStdConfigProvider(cfg))

require.NoError(t, module.RegisterConfig(app)) // skips (already registered)
require.NoError(t, module.Init(app))

ctx := context.Background()
require.NoError(t, module.Start(ctx))
t.Cleanup(func() { _ = module.Stop(ctx) })

return module, ctx
}

func TestCacheModule_CollectMetrics(t *testing.T) {
t.Parallel()

module, ctx := newTestCacheModule(t)

// Add some items
require.NoError(t, module.Set(ctx, "key1", "val1", time.Minute))
require.NoError(t, module.Set(ctx, "key2", "val2", time.Minute))
require.NoError(t, module.Set(ctx, "key3", "val3", time.Minute))

metrics := module.CollectMetrics(ctx)
assert.Equal(t, "cache", metrics.Name)
assert.Equal(t, 3.0, metrics.Values["item_count"])
assert.Equal(t, 10000.0, metrics.Values["max_items"])
}

func TestCacheModule_Reloadable(t *testing.T) {
t.Parallel()

module, ctx := newTestCacheModule(t)

// Verify interface compliance
var reloadable modular.Reloadable = module
assert.True(t, reloadable.CanReload())
assert.Equal(t, 5*time.Second, reloadable.ReloadTimeout())

// Verify reload updates config (cleanupInterval is not reloadable)
changes := []modular.ConfigChange{
{FieldPath: "defaultTTL", NewValue: "600s"},
{FieldPath: "maxItems", NewValue: "5000"},
}
require.NoError(t, reloadable.Reload(ctx, changes))

assert.Equal(t, 600*time.Second, module.config.DefaultTTL)
assert.Equal(t, 5000, module.config.MaxItems)
}
2 changes: 1 addition & 1 deletion modules/chimux/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/GoCodeAlone/modular/modules/chimux
go 1.26

require (
github.com/GoCodeAlone/modular v1.12.0
github.com/GoCodeAlone/modular v1.12.1
github.com/cloudevents/sdk-go/v2 v2.16.2
github.com/cucumber/godog v0.15.1
github.com/go-chi/chi/v5 v5.2.2
Expand Down
4 changes: 2 additions & 2 deletions modules/chimux/go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk=
github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/GoCodeAlone/modular v1.12.0 h1:C4tLfJe65rrUQsbtndiVfldtT8IRKZcHczNRNbBK4wo=
github.com/GoCodeAlone/modular v1.12.0/go.mod h1:ET7mlekRjkRq9mwJdWmaC2KDUWvjla2IqKVFrYO2JnY=
github.com/GoCodeAlone/modular v1.12.1 h1:FEyAPr7vDp+qrSjgWEZI7sH+YUN4/o6R58XuzpCSXUU=
github.com/GoCodeAlone/modular v1.12.1/go.mod h1:mKkOcJtHO/Xlkaeb7G6g0JgRYBwqTyAgQ9Vvs1NosNs=
github.com/cloudevents/sdk-go/v2 v2.16.2 h1:ZYDFrYke4FD+jM8TZTJJO6JhKHzOQl2oqpFK1D+NnQM=
github.com/cloudevents/sdk-go/v2 v2.16.2/go.mod h1:laOcGImm4nVJEU+PHnUrKL56CKmRL65RlQF0kRmW/kg=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
Expand Down
4 changes: 2 additions & 2 deletions modules/configwatcher/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/GoCodeAlone/modular/modules/configwatcher
go 1.26

require (
github.com/GoCodeAlone/modular v1.12.0
github.com/GoCodeAlone/modular v1.12.1
github.com/fsnotify/fsnotify v1.9.0
)

Expand All @@ -17,6 +17,6 @@ require (
github.com/modern-go/reflect2 v1.0.2 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/sys v0.21.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
8 changes: 4 additions & 4 deletions modules/configwatcher/go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk=
github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/GoCodeAlone/modular v1.12.0 h1:C4tLfJe65rrUQsbtndiVfldtT8IRKZcHczNRNbBK4wo=
github.com/GoCodeAlone/modular v1.12.0/go.mod h1:ET7mlekRjkRq9mwJdWmaC2KDUWvjla2IqKVFrYO2JnY=
github.com/GoCodeAlone/modular v1.12.1 h1:FEyAPr7vDp+qrSjgWEZI7sH+YUN4/o6R58XuzpCSXUU=
github.com/GoCodeAlone/modular v1.12.1/go.mod h1:mKkOcJtHO/Xlkaeb7G6g0JgRYBwqTyAgQ9Vvs1NosNs=
github.com/cloudevents/sdk-go/v2 v2.16.2 h1:ZYDFrYke4FD+jM8TZTJJO6JhKHzOQl2oqpFK1D+NnQM=
github.com/cloudevents/sdk-go/v2 v2.16.2/go.mod h1:laOcGImm4nVJEU+PHnUrKL56CKmRL65RlQF0kRmW/kg=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
Expand Down Expand Up @@ -74,8 +74,8 @@ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE=
golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
2 changes: 1 addition & 1 deletion modules/database/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/GoCodeAlone/modular/modules/database/v2
go 1.26

require (
github.com/GoCodeAlone/modular v1.12.0
github.com/GoCodeAlone/modular v1.12.1
github.com/aws/aws-sdk-go-v2/config v1.31.0
github.com/cloudevents/sdk-go/v2 v2.16.2
github.com/cucumber/godog v0.15.1
Expand Down
4 changes: 2 additions & 2 deletions modules/database/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ filippo.io/edwards25519 v1.1.1/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk=
github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/GoCodeAlone/modular v1.12.0 h1:C4tLfJe65rrUQsbtndiVfldtT8IRKZcHczNRNbBK4wo=
github.com/GoCodeAlone/modular v1.12.0/go.mod h1:ET7mlekRjkRq9mwJdWmaC2KDUWvjla2IqKVFrYO2JnY=
github.com/GoCodeAlone/modular v1.12.1 h1:FEyAPr7vDp+qrSjgWEZI7sH+YUN4/o6R58XuzpCSXUU=
github.com/GoCodeAlone/modular v1.12.1/go.mod h1:mKkOcJtHO/Xlkaeb7G6g0JgRYBwqTyAgQ9Vvs1NosNs=
github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
github.com/aws/aws-sdk-go-v2 v1.38.3 h1:B6cV4oxnMs45fql4yRH+/Po/YU+597zgWqvDpYMturk=
Expand Down
1 change: 1 addition & 0 deletions modules/database/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ func (l *lazyDefaultService) SetEventEmitter(emitter EventEmitter) {
type Module struct {
config *Config
connections map[string]*sql.DB
connMu sync.RWMutex // Protects connections map
services map[string]DatabaseService
subject modular.Subject // For event observation
subjectMu sync.RWMutex // Protects subject field from race conditions
Expand Down
Loading
Loading