// Timeout reads timeouts for the given timeout type, if type is not found in the config
// then default is set as per the const value above for the corresponding type
484345
func (c *EndpointConfig) Timeout(tType fab.TimeoutType) time.Duration {
	return c.getTimeout(tType)
}
647360
func (f *MockFunction) Timeout(d time.Duration) *MockFunction {
	f.timeout = d
	return f
}
361477
func (s *CloseIndexService) Timeout(timeout string) *CloseIndexService {
	s.timeout = timeout
	return s
}
1303000
func (s *ActivityTaskTimedOutEventAttributes) SetTimeoutType(v string) *ActivityTaskTimedOutEventAttributes {
	s.TimeoutType = &v
	return s
}
167641
func (s *SnapshotCreateRepositoryService) Timeout(timeout string) *SnapshotCreateRepositoryService {
	s.timeout = timeout
	return s
}
975413
func (c *Client) SetTimeout(duration time.Duration) {
	c.Driver.Timeout = duration
}
392787
func (c *Client) SetTimeout(timeout time.Duration) *Client {
	c.httpClient.Timeout = timeout
	return c
}
600399
func (b *UpdateService) Timeout(timeout string) *UpdateService {
	b.timeout = timeout
	return b
}
614789
func (s *ClusterRerouteService) Timeout(timeout string) *ClusterRerouteService {
	s.timeout = timeout
	return s
}
392568
func (ae ArangoError) Timeout() bool {
	return ae.HasError && (ae.Code == http.StatusRequestTimeout || ae.Code == http.StatusGatewayTimeout)
}
1204070
func (s *Action) SetTimeout(v int64) *Action {
	s.Timeout = &v
	return s
}
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")
	}
}
966299
func (c *Client) SetTimeout(t time.Duration) {
	if c.HTTPClient != nil {
		c.HTTPClient.Timeout = t
	}
}
163908
func (s *IndicesRolloverService) Timeout(timeout string) *IndicesRolloverService {
	s.timeout = timeout
	return s
}
412860
func (c *MockConfig) Timeout(arg fab.TimeoutType) time.Duration {
	return time.Second * 10
}
1102200
func (s *IngestPutPipelineService) Timeout(timeout string) *IngestPutPipelineService {
	s.timeout = timeout
	return s
}
129937
func (e ErrorNode) Timeout() bool {
	type timeout interface {
		Timeout() bool
	}

	for err := e.cause; err != nil; {
		if t, ok := err.(timeout); ok {
			return t.Timeout()
		}

		if cause, ok := err.(causer); ok {
			err = cause.Cause()
		} else {
			err = nil
		}
	}
	return false
}