// WithClientMiddleware option of handle write timeout
975795
func WithClientMiddleware(middlewares ...Middleware) ClientOption {
	return func(opts *clientOptions) {
		opts.middlewares = append(opts.middlewares, middlewares...)
	}
}
446726
func WithRequestTimeout(d time.Duration) CallOption {
	return func(o *CallOptions) {
		o.RequestTimeout = d
	}
}
40575
func WithHTTPClient(c *http.Client) ClientOption {
	return func(client *Client) error {
		client.httpClient = c
		return nil
	}
}
383932
func WithHTTPClient(httpclient *http.Client) ClientOption {
	return func(client *Client) {
		client.httpClient = httpclient
	}
}
863833
func withClientFactory(c context.Context, fac pubsubClientFactory) context.Context {
	return context.WithValue(c, &pubsubClientFactoryKey, fac)
}
898627
func (e *Environment) InstallHandlersWithMiddleware(r *router.Router, base router.MiddlewareChain) {
	warmup.InstallHandlers(r, base)

	if e.ExtraHandlers != nil {
		e.ExtraHandlers(r, base)
	}
}
1072678
func (o *PatchEndpointIDConfigParams) WithTimeout(timeout time.Duration) *PatchEndpointIDConfigParams {
	o.SetTimeout(timeout)
	return o
}
701199
func WithHTTPClient(client *http.Client) Opt {
	return func(c *Client) error {
		if client != nil {
			c.client = client
		}
		return nil
	}
}
98465
func WithHijackClient(wrap func(tikv.Client) tikv.Client) MockTiKVStoreOption {
	return func(c *mockOptions) {
		c.clientHijack = wrap
	}
}
883238
func (o *Oauth2TokenParams) WithClientID(clientID *string) *Oauth2TokenParams {
	o.SetClientID(clientID)
	return o
}
283716
func WithClient(x *xray.XRay) Option {
	return func(o *Options) {
		o.Client = x
	}
}
1361364
func WithClient(client kinesisiface.KinesisAPI) Option {
	return func(c *Consumer) {
		c.client = client
	}
}
1275940
func WithTimeout(timeout time.Duration) ReqContextOptions {
	return func(ctx *requestContextOpts) {
		ctx.timeout = timeout
	}
}
512295
func WithWriteConcern(wc int) ClientOptionFunc {
	return func(c *Client) error {
		if wc > 0 {
			c.safety.W = wc
		}
		return nil
	}
}
1040928
func SendResponseWithClient(client interface {
	Do(*http.Request) (*http.Response, error)
}, req Request, response Response) error {
	c := ResponseClient{client}
	return c.SendResponse(req, response)
}
711699
func (c *Client) execWithKeyTimeout(urp bool, timeout int, cmd, key string, a ...interface{}) (interface{}, error) {
	srv, err := c.selector.PickServer(key)
	if err != nil {
		return nil, err
	}
	x := []interface{}{cmd, key}
	return c.execWithAddrTimeout(urp, srv, timeout, append(x, a...)...)
}
301700
func WrapMiddlewareFromHandler(h HandlerFunc) Middleware {
	return MiddlewareFunc(func(next Handler) Handler {
		return HandlerFunc(func(c Context) error {
			if err := h.Handle(c); err != nil {
				return err
			}
			return next.Handle(c)
		})
	})
}