//Timeout is an option that can be provided to the func client.New in order to set HTTP connection timeout.
964679
func Timeout(t time.Duration) metaOp {
	return func(c *Client) {
		c.http.Timeout = t
	}
}
778559
func (d *DNSProvider) Timeout() (timeout, interval time.Duration) {
	return d.config.PropagationTimeout, d.config.PollingInterval
}
1090256
func (e *OpError) Timeout() bool {
	if ne, ok := e.Err.(*os.SyscallError); ok {
		t, ok := ne.Err.(timeout)
		return ok && t.Timeout()
	}
	t, ok := e.Err.(timeout)
	return ok && t.Timeout()
}
151686
func (ri *ReindexRemoteInfo) SocketTimeout(timeout string) *ReindexRemoteInfo {
	ri.socketTimeout = timeout
	return ri
}
1256941
func (s *FunctionConfiguration) SetTimeout(v int64) *FunctionConfiguration {
	s.Timeout = &v
	return s
}
724499
func (pool *Pool) Timeout(timeout time.Duration) *Pool {
	pool.conf.Timeout = timeout
	return &Pool{redis: pool.redis, conf: pool.conf}
}
854844
func (r *Request) Timeout(d time.Duration) *Request {
	if r.err != nil {
		return r
	}
	r.timeout = d
	return r
}
179978
func SessionTimeout(t time.Duration) Option {
	return func(c *clientConfig) error {
		if t.Seconds() < 1 {
			return errors.New("invalid session timeout (minimum value is 1 second)")
		}
		c.sessionTimeout = t
		return nil
	}
}
939387
func (s *IndicesDeleteService) Timeout(timeout string) *IndicesDeleteService {
	s.timeout = timeout
	return s
}
1275818
func (s *IndicesUnfreezeService) Timeout(timeout string) *IndicesUnfreezeService {
	s.timeout = timeout
	return s
}
392787
func (c *Client) SetTimeout(timeout time.Duration) *Client {
	c.httpClient.Timeout = timeout
	return c
}
1010575
func WithTimeout(d time.Duration) ClientOpt {
	return func(c *clientOpts) error {
		c.timeout = d
		return nil
	}
}
412860
func (c *MockConfig) Timeout(arg fab.TimeoutType) time.Duration {
	return time.Second * 10
}
646915
func FunctionTimeout(fn func() error, timeout time.Duration) error {
	c := make(chan error, 1)
	go func() {
		c <- fn()
	}()
	select {
	case err := <-c:
		return err
	case <-time.After(timeout):
		return errors.New("timeout")
	}
}
874547
func (s *ClusterHealthService) Timeout(timeout string) *ClusterHealthService {
	s.timeout = timeout
	return s
}
472782
func DialTimeout(addr string, timeout time.Duration) (*ServerConn, error) {
	return Dial(addr, DialWithTimeout(timeout))
}
1026123
func DialTimeout(network, addr string, timeout time.Duration) (*Client, error) {
	conn, err := net.DialTimeout(network, addr, timeout)
	if err != nil {
		return nil, err
	}
	return New(conn), nil
}