MCPcopy Index your code
hub / github.com/cilium/cilium / HandlerFor

Method HandlerFor

api/v1/server/restapi/cilium_api_api.go:709–722  ·  view source on GitHub ↗

HandlerFor gets a http.Handler for the provided operation method and path

(method, path string)

Source from the content-addressed store, hash-verified

707
708// HandlerFor gets a http.Handler for the provided operation method and path
709func (o *CiliumAPIAPI) HandlerFor(method, path string) (http.Handler, bool) {
710 if o.handlers == nil {
711 return nil, false
712 }
713 um := strings.ToUpper(method)
714 if _, ok := o.handlers[um]; !ok {
715 return nil, false
716 }
717 if path == "/" {
718 path = ""
719 }
720 h, ok := o.handlers[um][path]
721 return h, ok
722}
723
724// Context returns the middleware context for the cilium API API
725func (o *CiliumAPIAPI) Context() *middleware.Context {

Callers 4

ServerHandlerFunction · 0.45
NewFunction · 0.45
AddServerRuntimeHooksMethod · 0.45
StartMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected