mirror of
https://github.com/linka-cloud/grpc.git
synced 2025-06-22 09:12:28 +00:00
add http middleware, add option to use custom mux, improved logger kvs
This commit is contained in:
15
service/mux.go
Normal file
15
service/mux.go
Normal file
@ -0,0 +1,15 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/justinas/alice"
|
||||
)
|
||||
|
||||
type ServeMux interface {
|
||||
ServeHTTP(http.ResponseWriter, *http.Request)
|
||||
Handle(pattern string, handler http.Handler)
|
||||
HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
|
||||
}
|
||||
|
||||
type Middleware = alice.Constructor
|
Reference in New Issue
Block a user