Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Logger ¶
func Logger(h httprouter.Handle) httprouter.Handle
Logger is a middleware that prints http logs.
Types ¶
type Server ¶
type Server struct { Middleware func(next httprouter.Handle) httprouter.Handle // contains filtered or unexported fields }
Server implements gateway.HTTPServer by using julienschmidt/httprouter.
func NewWithRouter ¶
func NewWithRouter(addr string, router *httprouter.Router) *Server
NewWithRouter returns a server with preconfigured router.
func (*Server) RegisterHandler ¶
RegisterHandler configures the handler to handle http rpcx invoke. It wraps ServiceHandler into httprouter.Handle.
Click to show internal directories.
Click to hide internal directories.