refactor command routing similar to http.ServeMux
Issue #65
closed
Provides better maintainability, testability, and lays the foundation for easier plugin support.
- benchmark perf tradeoffs between regex and string matches
- investigate abstracting commands as
command.CommandFunc
Comments (2)
-
reporter -
reporter - changed status to closed
Refactor command routing internals. Closes
#65Simpler, more performant, and more extensible command routing. Replace switch-and-regex based routing with string comparing, function pointer based CommandRouter component.
Initial impl micro-benchmark results:
BenchmarkSwitchRouter 500000 3865 ns/op BenchmarkCommandRouter 1000000 1212 ns/op
→ <<cset 6df3c4d6ed7c>>
- Log in to comment
Initial impl ubenchmarks