dispatch: allow empty route kinds (match all) + add routing tests
- config: permit routes[].kinds to be omitted/empty; treat as "all kinds"
- dispatch: compile empty kinds to Route{Kinds:nil} (match all kinds)
- tests: add coverage for route compilation + config validation edge cases
Files:
- config/load.go
- config/config.go
- dispatch/routes.go
- config/validate_test.go
- dispatch/routes_test.go
This commit is contained in:
@@ -54,7 +54,10 @@ type RouteConfig struct {
|
||||
Sink string `yaml:"sink"` // sink name
|
||||
|
||||
// Kinds is domain-defined. feedkit only enforces that each entry is non-empty.
|
||||
// Whether a given daemon "recognizes" a kind is domain-specific validation.
|
||||
//
|
||||
// If Kinds is omitted or empty, the route matches ALL kinds.
|
||||
// This is useful when you want explicit per-sink routing rules even when a
|
||||
// particular sink should receive everything.
|
||||
Kinds []string `yaml:"kinds"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user