switch modules to accept an InputHandler instead of the full router

This commit is contained in:
Joel Wetzell
2026-05-20 21:03:41 -05:00
parent be0b1c4a5f
commit 4cedd58a76
31 changed files with 301 additions and 297 deletions
+5 -5
View File
@@ -18,7 +18,7 @@ type TestModule struct {
id string
}
func (m *TestModule) Start(ctx context.Context, router common.RouteIO) error {
func (m *TestModule) Start(ctx context.Context, inputHandler common.InputHandler) error {
<-ctx.Done()
return nil
}
@@ -43,7 +43,7 @@ type TestOutputModule struct {
id string
}
func (m *TestOutputModule) Start(ctx context.Context, router common.RouteIO) error {
func (m *TestOutputModule) Start(ctx context.Context, inputHandler common.InputHandler) error {
<-ctx.Done()
return nil
}
@@ -74,7 +74,7 @@ type TestKVModule struct {
kvData map[string]any
}
func (m *TestKVModule) Start(ctx context.Context, router common.RouteIO) error {
func (m *TestKVModule) Start(ctx context.Context, inputHandler common.InputHandler) error {
<-ctx.Done()
return nil
}
@@ -119,7 +119,7 @@ type TestDBModule struct {
db *sql.DB
}
func (m *TestDBModule) Start(ctx context.Context, router common.RouteIO) error {
func (m *TestDBModule) Start(ctx context.Context, inputHandler common.InputHandler) error {
<-ctx.Done()
return nil
}
@@ -167,7 +167,7 @@ type TestPubSubModule struct {
id string
}
func (m *TestPubSubModule) Start(ctx context.Context, router common.RouteIO) error {
func (m *TestPubSubModule) Start(ctx context.Context, inputHandler common.InputHandler) error {
<-ctx.Done()
return nil
}