inaka / cowboy-trails

A couple of improvements over Cowboy Routes

Home Page:http://inaka.github.io/cowboy-trails/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add a function to retrieve the list of registered servers and hostmatches

elbrujohalcon opened this issue · comments

Currently, all/0 gives you all the trails from all servers/hostmatches and all/1,2 allow you to retrieve the list of trails for a particular one, but there is no function to retrieve the list of servers and hostmatches themselves.
So, we need to add the following functions to the trails module:

  • servers() -> [ranch:ref()]. - to retrieve the list of servers
  • host_matches(ranch:ref()) -> [route_match()]. - to retrieve the list of host matches for a server.