// Handle is part of the watcher.NotifyHandler interface.
// Whenever a valid change is encountered the worker bounces,
// making the dependents bounce and get the new value
182364
func (h retryStrategyHandler) Handle(_ <-chan struct{}) error {
	newRetryStrategy, err := h.config.Facade.RetryStrategy(h.config.AgentTag)
	if err != nil {
		return errors.Trace(err)
	}
	if newRetryStrategy != h.config.RetryStrategy {
		return errors.Errorf("bouncing retrystrategy worker to get new values")
	}
	return nil
}
154152
func (eh userNoteUpdateEventHandler) Handle(s *Session, i interface{}) {
	if t, ok := i.(*UserNoteUpdate); ok {
		eh(s, t)
	}
}
1030585
func (eh messageReactionRemoveEventHandler) Handle(s *Session, i interface{}) {
	if t, ok := i.(*MessageReactionRemove); ok {
		eh(s, t)
	}
}
749312
func (eh guildUpdateEventHandler) Handle(s *Session, i interface{}) {
	if t, ok := i.(*GuildUpdate); ok {
		eh(s, t)
	}
}
74007
func (w *Worker) Handle(h TaskHandler) {

	w.mutx.Lock()
	defer w.mutx.Unlock()

	w.handlers[h.Id()] = h

	w.channels = append(w.channels, qname(h.Id()))

}
11176
func (l *handler) Handle(c net.Conn, abort <-chan struct{}) error {
	defer c.Close()

	// TODO(fwereade): 2016-03-17 lp:1558657
	err := c.SetDeadline(time.Now().Add(spool.DefaultTimeout))
	if err != nil {
		return errors.Annotate(err, "failed to set the deadline")
	}

	err = l.config.charmdir.Visit(func() error {
		return l.do(c)
	}, abort)
	if err != nil {
		fmt.Fprintf(c, "error: %v\n", err.Error())
	} else {
		fmt.Fprintf(c, "ok\n")
	}
	return errors.Trace(err)
}
343098
func (s *Subscription) Handle(es string, h HandlerFunc) error {
	if _, ok := validEvents[es]; !ok {
		return fmt.Errorf("unknown event: %s", es)
	}

	s.lock.Lock()
	s.handlers[es] = h
	s.lock.Unlock()
	return nil
}
438530
func (eh disconnectEventHandler) Handle(s *Session, i interface{}) {
	if t, ok := i.(*Disconnect); ok {
		eh(s, t)
	}
}
1358470
func (f FuncReqHandler) Handle(req *http.Request, ctx *ProxyCtx) (*http.Request, *http.Response) {
	return f(req, ctx)
}
67442
func (fn UpdateTaskHandlerFunc) Handle(params UpdateTaskParams, principal interface{}) middleware.Responder {
	return fn(params, principal)
}
1191413
func (h HandlerFunc) Handle(ctx *Context, res *http.Response, err error) {
	h(ctx, res, err)
}
1362910
func (eh messageUpdateEventHandler) Handle(s *Session, i interface{}) {
	if t, ok := i.(*MessageUpdate); ok {
		eh(s, t)
	}
}
889653
func (w *Handler) Handle(key string, h func(eventtypes.Message)) {
	w.mu.Lock()
	w.handlers[key] = h
	w.mu.Unlock()
}
182541
func (h *AsyncHttpHandler) handle(f func() (string, error)) {
	go func() {
		logger.Info("Started job %v", h.id)

		ts := time.Now()
		url, err := f()
		logger.Info("Completed job %v in %v", h.id, time.Since(ts))

		if err != nil {
			h.CompletedWithError(err)
		} else if url != "" {
			h.CompletedWithLocation(url)
		} else {
			h.Completed()
		}
	}()
}
1120545
func (conn *Conn) Handle(name string, h Handler) Remover {
	return conn.fgHandlers.add(name, h)
}
954417
func (f HandlerFunc) Handle(s Sender, m *irc.Message) {
	f(s, m)
}
308464
func (eh webhooksUpdateEventHandler) Handle(s *Session, i interface{}) {
	if t, ok := i.(*WebhooksUpdate); ok {
		eh(s, t)
	}
}