// UseAfterRequest the middleware after request processing
514928
func (app *App) UseAfterRequest(middleware interface{}) error {
	if middleware == nil {
		return ErrEmptyMiddleware
	}

	processor, err := app.middlewareProcessor(middleware)
	app.middlewaresAfterRequestMu.Lock()
	if err == nil {
		app.middlewaresAfterRequest = append(app.middlewaresAfterRequest, processor)
	}
	app.middlewaresAfterRequestMu.Unlock()

	return nil
}
1257701
func (w *WebHookPayload) GetAfter() string {
	if w == nil || w.After == nil {
		return ""
	}
	return *w.After
}
1327842
func (authy *Authy) WaitForApprovalRequest(uuid string, maxDuration time.Duration, params url.Values) (OneTouchStatus, error) {
	for maxDuration > 0 {
		request, err := authy.FindApprovalRequest(uuid, url.Values{})
		if err != nil {
			return OneTouchStatusPending, err
		}

		if request.Status != OneTouchStatusPending {
			return request.Status, nil
		}

		maxDuration -= longPollingDelay
		time.Sleep(longPollingDelay)
	}

	return OneTouchStatusExpired, nil
}
829196
func (e *Echo) Use(middleware ...interface{}) {
	for _, m := range middleware {
		e.ValidMiddleware(m)
		e.middleware = append(e.middleware, m)
		if e.MiddlewareDebug {
			e.logger.Debugf(`Middleware[Use](%p): [] -> %s `, m, HandlerName(m))
		}
	}
}
218549
func (dc *DeploymentController) enqueueAfter(deployment *apps.Deployment, after time.Duration) {
	key, err := controller.KeyFunc(deployment)
	if err != nil {
		utilruntime.HandleError(fmt.Errorf("Couldn't get key for object %#v: %v", deployment, err))
		return
	}

	dc.queue.AddAfter(key, after)
}
1023556
func (c *Client) Use(p plugin.Plugin) *Client {
	c.Middleware.Use(p)
	return c
}
105730
func (p *PushEvent) GetAfter() string {
	if p == nil || p.After == nil {
		return ""
	}
	return *p.After
}
392295
func (r *Request) UseRequest(fn context.HandlerFunc) *Request {
	r.Middleware.UseRequest(fn)
	return r
}
46962
func UseProxy(w http.ResponseWriter, response interface{}) {
	Respond(w, http.StatusUseProxy, response)
}
708833
func (brq *blockRetrievalQueue) FinalizeRequest(
	retrieval *blockRetrieval, block data.Block, cacheType DiskBlockCacheType,
	retrievalErr error) {
	brq.mtx.Lock()
	// This might have already been removed if the context has been canceled.
	// That's okay, because this will then be a no-op.
	bpLookup := blockPtrLookup{retrieval.blockPtr, reflect.TypeOf(block)}
	delete(brq.ptrs, bpLookup)
	brq.mtx.Unlock()
	brq.finalizeRequestAfterPtrDeletion(
		retrieval, block, cacheType, retrievalErr)
}
759477
func (c *Client) doRequest(payload interface{}, responseData interface{}) error {
	body, err := json.Marshal(payload)
	if err != nil {
		return err
	}

	req, err := http.NewRequest(http.MethodPost, c.BaseURL, bytes.NewReader(body))
	if err != nil {
		return err
	}

	req.Close = true
	req.Header.Set("content-type", "application/json")

	resp, err := c.HTTPClient.Do(req)
	if err != nil {
		return err
	}

	if err = checkResponse(resp); err != nil {
		return err
	}

	respMsg, err := decodeResponseMsg(resp)
	if err != nil {
		return err
	}

	if respMsg.Status != success {
		return respMsg
	}

	if responseData != nil {
		err = json.Unmarshal(respMsg.ResponseData, responseData)
		if err != nil {
			return fmt.Errorf("%v: unmarshaling %T error: %v: %s",
				respMsg, responseData, err, string(respMsg.ResponseData))
		}
	}

	return nil
}
986465
func (app *App) Use(handle Middleware) *App {
	app.mds = append(app.mds, handle)
	return app
}
807086
func (app *App) UsePre(middleware interface{}) error {
	if middleware == nil {
		return ErrEmptyMiddleware
	}
	processor, err := app.middlewareProcessor(middleware)
	app.preMiddlewaresMu.Lock()
	if err == nil {
		app.preMiddlewares = append(app.preMiddlewares, processor)
	}
	app.preMiddlewaresMu.Unlock()

	return err
}
1209735
func (t *Tango) UseHandler(handler http.Handler) {
	t.Use(WrapBefore(handler))
}
439682
func (_m *RouterGroup) Use(f func(http.Handler) http.Handler) {
	_m.Called(f)
}
844498
func (client *BaseClient) AddAfterFilterHandler(handler ...FilterHandler) Client {
	client.handlerManager.AddAfterFilterHandler(handler...)
	return client
}
96996
func (e *Echo) PreUse(middleware ...interface{}) {
	var middlewares []interface{}
	for _, m := range middleware {
		e.ValidMiddleware(m)
		middlewares = append(middlewares, m)
		if e.MiddlewareDebug {
			e.logger.Debugf(`Middleware[Pre](%p): [] -> %s`, m, HandlerName(m))
		}
	}
	e.middleware = append(middlewares, e.middleware...)
}