Experimental server side wrappers for handlers

This commit is contained in:
Asim
2015-12-02 00:47:52 +00:00
parent 0c9f8411bb
commit dae745f30f
4 changed files with 61 additions and 42 deletions

9
server/server_wrapper.go Normal file
View File

@@ -0,0 +1,9 @@
package server
import (
"golang.org/x/net/context"
)
type HandlerFunc func(ctx context.Context, req interface{}, rsp interface{}) error
type Wrapper func(HandlerFunc) HandlerFunc