mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-08-21 14:09:00 +00:00
switch modules to accept an InputHandler instead of the full router
This commit is contained in:
@@ -4,9 +4,7 @@ import (
|
||||
"context"
|
||||
)
|
||||
|
||||
type RouteIO interface {
|
||||
HandleInput(ctx context.Context, sourceId string, payload any) (bool, []RouteIOError)
|
||||
}
|
||||
type InputHandler func(ctx context.Context, sourceId string, payload any) (bool, []RouteIOError)
|
||||
|
||||
type RouteIOError struct {
|
||||
Index int `json:"index"`
|
||||
|
||||
Reference in New Issue
Block a user