// RemoveHandler removes the handler with the given name from the muxer.
960107
func (msm *MultistreamMuxer) RemoveHandler(protocol string) {
	msm.handlerlock.Lock()
	defer msm.handlerlock.Unlock()

	msm.removeHandler(protocol)
}
1348555
func DeregisterReaderHandler(name string) {
	readerRegisterLock.Lock()
	delete(readerRegister, name)
	readerRegisterLock.Unlock()
}
120918
func (cl *Listener) StopHandler(alpn string) {
	cl.l.Lock()
	handler, ok := cl.handlers[alpn]
	delete(cl.handlers, alpn)
	cl.l.Unlock()
	if ok {
		handler.Stop()
	}
}
45367
func NetHandler(network, addr string, fmtr Format) (Handler, error) {
	conn, err := net.Dial(network, addr)
	if err != nil {
		return nil, err
	}

	return closingHandler{conn, StreamHandler(conn, fmtr)}, nil
}
690870
func (ovs *OvsdbClient) Unregister(handler NotificationHandler) error {
	ovs.handlersMutex.Lock()
	defer ovs.handlersMutex.Unlock()
	i, err := getHandlerIndex(handler, ovs.handlers)
	if err != nil {
		return err
	}
	ovs.handlers = append(ovs.handlers[:i], ovs.handlers[i+1:]...)
	return nil
}
1184245
func (c *Runtime) RemoveBinding(name string) (*gcdmessage.ChromeResponse, error) {
	var v RuntimeRemoveBindingParams
	v.Name = name
	return c.RemoveBindingWithParams(&v)
}
181247
func NameHandler(name string, handler cfg.Handler) *HandlerName {
	return &HandlerName{
		Name:    name,
		Handler: handler,
	}
}
872177
func (n *NodeDrainer) Remove(nodeID string) {
	n.l.Lock()
	defer n.l.Unlock()

	// TODO test the notifier is updated
	// Remove it from being tracked and remove it from the dealiner
	delete(n.nodes, nodeID)
	n.deadlineNotifier.Remove(nodeID)
}
809761
func (c *Controller) RemoveNotifier(name string) error {
	c.mu.Lock()
	defer c.mu.Unlock()
	currentNotifier, ok := c.notifiers[name]
	if !ok {
		return fmt.Errorf("Unknown notification service %s", name)
	}
	currentNotifier.removeSubscription()
	delete(c.notifiers, name)
	return nil
}
876617
func (m *Mux) RemoveHandler(meth, pat string) {
	m.mu.Lock()
	defer m.mu.Unlock()
	phs, ok := m.added[meth]
	if !ok {
		return
	}
	for i, ph := range phs {
		if ph.pat != pat {
			continue
		}
		head, tail := phs[:i], phs[i+1:]
		m.added[meth] = append(head, tail...)
		m.recreate()
		return
	}
}
348056
func (conn *Conn) HandleBG(name string, h Handler) Remover {
	return conn.bgHandlers.add(name, h)
}
1029119
func MultiHandler(handlers ...Handler) Handler {
	c := make([]Handler, len(handlers))
	copy(c, handlers)
	return &multiHandler{
		handlers: c,
	}
}
1197925
func (m *Mux) Handler(method, path string, handler HandlerFunc) Handler {
	return Handler{
		Method: method,
		Path:   path,
		Func:   handler,
	}
}
1197435
func (mm *MessageManager) removeHandler(messageType string, handlerID MessageHandlerId) {
	indexOfHandler := -1
	for i, activeHandler := range mm.listeners[messageType] {
		if activeHandler.MessageHandlerId == handlerID {
			indexOfHandler = i
			break
		}
	}
	// A handler might have already been removed during a previous Dispatch(), no action necessary
	if indexOfHandler == -1 {
		return
	}
	mm.listeners[messageType] = append(mm.listeners[messageType][:indexOfHandler], mm.listeners[messageType][indexOfHandler+1:]...)
}
1196149
func (handle ListenerHandle) Unregister() {
	listenerMutex.Lock()
	delete(listeners, handle)
	listenerMutex.Unlock()
}
976024
func (b *databaseBackend) connectionDeleteHandler() framework.OperationFunc {
	return func(ctx context.Context, req *logical.Request, data *framework.FieldData) (*logical.Response, error) {
		name := data.Get("name").(string)
		if name == "" {
			return logical.ErrorResponse(respErrEmptyName), nil
		}

		err := req.Storage.Delete(ctx, fmt.Sprintf("config/%s", name))
		if err != nil {
			return nil, errors.New("failed to delete connection configuration")
		}

		if err := b.ClearConnection(name); err != nil {
			return nil, err
		}

		return nil, nil
	}
}
724871
func (s *storageRESTServer) DeleteVolHandler(w http.ResponseWriter, r *http.Request) {
	if !s.IsValid(w, r) {
		return
	}
	vars := mux.Vars(r)
	volume := vars[storageRESTVolume]
	err := s.storage.DeleteVol(volume)
	if err != nil {
		s.writeErrorResponse(w, err)
	}
}