MCPcopy Create free account
hub / github.com/baidu/EasyFaaS / WrapRestRouteFunc

Function WrapRestRouteFunc

pkg/server/context.go:89–94  ·  view source on GitHub ↗
(h func(*Context))

Source from the content-addressed store, hash-verified

87}
88
89func WrapRestRouteFunc(h func(*Context)) restful.RouteFunction {
90 return func(request *restful.Request, response *restful.Response) {
91 c := BuildContext(request, response)
92 h(c)
93 }
94}
95
96func WrapRestFilterFunction(h func(c *Context, chain *restful.FilterChain)) restful.FilterFunction {
97 return func(request *restful.Request, response *restful.Response, chain *restful.FilterChain) {

Callers 1

InstallAPIMethod · 0.92

Calls 1

BuildContextFunction · 0.70

Tested by

no test coverage detected