class Kemal::RouteHandler
- Kemal::RouteHandler
- Reference
- Object
Included Modules
- HTTP::Handler
Defined in:
kemal/route_handler.crConstant Summary
-
CACHED_ROUTES_LIMIT =
1024
-
INSTANCE =
new
Constructors
Instance Method Summary
-
#add_route(method : String, path : String, &handler : HTTP::Server::Context -> _)
Adds a given route to routing tree.
- #cached_routes : Hash(String, Radix::Result(Kemal::Route))
- #cached_routes=(cached_routes : Hash(String, Radix::Result(Kemal::Route)))
- #call(context : HTTP::Server::Context)
-
#lookup_route(verb : String, path : String)
Looks up the route from the Radix::Tree for the first time and caches to improve performance.
- #routes : Radix::Tree(Kemal::Route)
- #routes=(routes : Radix::Tree(Kemal::Route))
Constructor Detail
Instance Method Detail
def add_route(method : String, path : String, &handler : HTTP::Server::Context -> _)
#
Adds a given route to routing tree.
def lookup_route(verb : String, path : String)
#
Looks up the route from the Radix::Tree for the first time and caches to improve performance.