2017-10-31 09:25:44 +00:00
|
|
|
package client
|
|
|
|
|
|
|
|
// ClientError is an error Client methods can return.
|
|
|
|
type ClientError struct {
|
|
|
|
// Set if the error is timeout-related.
|
|
|
|
Timeout bool
|
|
|
|
|
|
|
|
// Set if the error is connection-related.
|
|
|
|
Connection bool
|
|
|
|
|
|
|
|
// Set if the error is server-related.
|
|
|
|
Server bool
|
|
|
|
|
|
|
|
// Set if the error is related to internal resources' overflow.
|
|
|
|
// Increase PendingRequests if you see a lot of such errors.
|
|
|
|
Overflow bool
|
|
|
|
|
|
|
|
// May be set if AsyncResult.Cancel is called.
|
|
|
|
Canceled bool
|
|
|
|
|
2017-11-22 11:55:10 +00:00
|
|
|
Err error
|
2017-10-31 09:25:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (e *ClientError) Error() string {
|
2017-11-22 11:55:10 +00:00
|
|
|
return e.Err.Error()
|
2017-10-31 09:25:44 +00:00
|
|
|
}
|