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:
2026-01-15 18:26:45 -06:00
parent a6c133319a
commit 1d43adcfa0
6 changed files with 143 additions and 22 deletions

3
doc.go
View File

@@ -234,7 +234,8 @@
// - dispatch.Fanout: one buffered queue + worker goroutine per sink
//
// - dispatch.CompileRoutes(*config.Config) compiles cfg.Routes into []dispatch.Route.
// If routes: is omitted, it defaults to "all sinks receive all kinds".
// If routes: is omitted, it defaults to "all sinks receive all kinds". If a route
// omits kinds: (or sets it empty), that route matches all kinds.
//
// - logging
// Shared logger type used across feedkit packages.