type WrappedHandler … func (wrapped *WrappedHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request) { … } func (wrapped *WrappedHandler) restfulHandle(req *restful.Request, resp *restful.Response) { … } func (wrapped *WrappedHandler) GenerateWebService(prefix string, returnType interface{ … } // WrapAggregatedDiscoveryToHandler wraps a handler with an option to // emit the aggregated discovery by passing in the aggregated // discovery type in content negotiation headers: eg: (Accept: // application/json;v=v2;g=apidiscovery.k8s.io;as=APIGroupDiscoveryList) func WrapAggregatedDiscoveryToHandler(handler http.Handler, aggHandler http.Handler) *WrappedHandler { … }