Add catchall for router
Feature Request
Crates
tonic
Motivation
While trying to implement a gRPC proxy server (and blend it with locally-implemented services), I found that I was forced to use the NamedService trait and tie that "generic" service to a single service name due to how the router tests leading strings. Rather than using an empty string as the name for the service, I thought it might be useful to have a means to intercept all requests at the bottom of the routing stack in case you want to forward anything you can't handle locally to another server.
Proposal
The simplest means I found was to add add_catchall_service(). This likely requires you to implement a full tower service that's able to inspect the to perform the appropriate action (and return tonic-compatible replies).
Alternatives
A more elegant solution would be to support services that can accept or decline the request (i.e., provide their own route predicate).
Sorry for the delay on this, I think this is a great idea but I want to refactor some of the transport so will consider this in the new version.
Any news on this?