Closed pirfalt closed 5 years ago
This seems like a no brainer to me. I don't really understand why there's a HandlerFunc
adapter and not a Handler
adapter. AHandler
adapter is more closely aligned with the other adapters as it allows the use of the http.ServeMux
as a multiplexer.
Issue #18
Description of changes:
Add a new
HandlerAdapter
for thehttp.HandlerFunc
interface.This is a general interface which all the other concrete adapter sources already implements. In addition to, example https://github.com/grpc-ecosystem/grpc-gateway and the go standard library.
Any of them could delegate to this adapter if they wanted to.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.