//Convenience method
//Equivalent to calling Handle on all plugins individually
335317
func (ph *Manager) HandleAll(pls ...Plugin) {
	for _, pl := range pls {
		ph.Handle(pl)
	}
}
440639
func (n *nessusImpl) AllPlugins() (chan PluginDetails, error) {
	plugChan := make(chan PluginDetails, 20)

	families, err := n.PluginFamilies()
	if err != nil {
		return nil, err
	}
	idChan := make(chan int64, 20)
	var wgf sync.WaitGroup
	var wgp sync.WaitGroup
	// Launch a goroutine per family to get all the plugins of those families.
	for _, family := range families {
		wgf.Add(1)
		go func(famID int64) {
			defer wgf.Done()
			famDetails, err := n.FamilyDetails(famID)
			if err != nil {
				return
			}
			for _, plugin := range famDetails.Plugins {
				wgp.Add(1)
				idChan <- plugin.ID
			}
		}(family.ID)
	}
	// Launch our workers getting individual plugin details.
	for i := 0; i < 10; i++ {
		go func() {
			for id := range idChan {
				plugin, err := n.PluginDetails(id)
				if err != nil {
					wgp.Done()
					continue
				}
				plugChan <- *plugin
				wgp.Done()
			}
		}()
	}

	go func() {
		wgf.Wait()
		// Once we finished adding all the plugin IDs, we can close the channel.
		close(idChan)
		// Once all the plugins have been returned, we can close the plugin channel
		// to let the receiver know.
		wgp.Wait()
		close(plugChan)
	}()

	return plugChan, nil
}
842146
func (fn OrderCreateHandlerFunc) Handle(params OrderCreateParams, principal interface{}) middleware.Responder {
	return fn(params, principal)
}
248818
func (f HandlerFunc) Handle(w http.ResponseWriter, r *http.Request) error {
	w.Header().Set("Content-Type", "application/json")
	return f(w, r)
}
746963
func Init(handler cfg.Handler) error {
	std = New(handler)
	return std.Init()
}
113303
func (m *Method) PreHandle(handler Handler) *Method {
	m.preHandlers = append(m.preHandlers, handler)
	return m
}
15133
func (cg *ContextGroup) Handle(method, path string, handler http.HandlerFunc) {
	cg.group.Handle(method, path, func(w http.ResponseWriter, r *http.Request, params map[string]string) {
		if params != nil {
			r = r.WithContext(AddParamsToContext(r.Context(), params))
		}
		handler(w, r)
	})
}
739728
func (p *Plugin) runHandlers() {
	if !p.activated() {
		return
	}

	handlers.RLock()
	if !p.handlersRun {
		for _, iface := range p.Manifest.Implements {
			hdlrs, handled := handlers.extpointHandlers[iface]
			if !handled {
				continue
			}
			for _, handler := range hdlrs {
				handler(p.name, p.client)
			}
		}
		p.handlersRun = true
	}
	handlers.RUnlock()

}
1358470
func (f FuncReqHandler) Handle(req *http.Request, ctx *ProxyCtx) (*http.Request, *http.Response) {
	return f(req, ctx)
}
339804
func (fn GetIDHandlerFunc) Handle(params GetIDParams, principal *models.Principal) middleware.Responder {
	return fn(params, principal)
}
262954
func (n *Negroni) UseHandlerFunc(handlerFunc func(rw http.ResponseWriter, r *http.Request)) {
	n.UseHandler(http.HandlerFunc(handlerFunc))
}
962965
func WrapHandler(h *webdav.Handler, confs ...func(c *Config)) gin.HandlerFunc {
	defaultConfig := &Config{
		URL: "doc.json",
	}

	for _, c := range confs {
		c(defaultConfig)
	}

	return CustomWrapHandler(defaultConfig, h)
}
333766
func Handle(httpMethod, relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes {
	return engine().Handle(httpMethod, relativePath, handlers...)
}
904983
func (f HandlerFunc) Handle(im *Image, params Params) (*Image, error) {
	return f(im, params)
}
1319529
func (b *MultiHandler) Handle(rec *Record) {
	wg := sync.WaitGroup{}
	wg.Add(len(b.handlers))
	for _, handler := range b.handlers {
		go func(handler Handler) {
			handler.Handle(rec)
			wg.Done()
		}(handler)
	}
	wg.Wait()
}
1136224
func (fn GetOrderHandlerFunc) Handle(params GetOrderParams, principal *models.Principal) middleware.Responder {
	return fn(params, principal)
}
642997
func Handle(mux *http.ServeMux, prefix string, handler Handler) {
	HandleAnnotations(mux, prefix, handler)
	HandleQuery(mux, prefix, handler)
	HandleSearch(mux, prefix, handler)

	// Registering a global handler is a common thing that applications do, to
	// avoid overriding one that may already exist we first check that none were
	// previously registered.
	root := path.Join("/", prefix)

	if _, pattern := mux.Handler(&http.Request{
		URL: &url.URL{Path: root},
	}); len(pattern) == 0 {
		mux.HandleFunc(root, func(res http.ResponseWriter, req *http.Request) {
			setResponseHeaders(res)
		})
	}
}