pull all non-request scoped values out of context

This commit is contained in:
Joel Wetzell
2026-05-06 21:33:16 -05:00
parent eb25c73f3a
commit 833bd529d6
98 changed files with 328 additions and 584 deletions

View File

@@ -33,12 +33,7 @@ func (mcm *MockCounterModule) Output(context.Context, any) error {
return nil
}
func (mcm *MockCounterModule) Start(ctx context.Context) error {
router, ok := ctx.Value(common.RouterContextKey).(common.RouteIO)
if !ok {
return fmt.Errorf("mock.counter could not get router from context")
}
func (mcm *MockCounterModule) Start(ctx context.Context, router common.RouteIO) error {
mcm.router = router
moduleContext, cancel := context.WithCancel(ctx)
mcm.ctx = moduleContext