27 lines
552 B
Go
27 lines
552 B
Go
|
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
|
||
|
|
||
|
err error
|
||
|
}
|
||
|
|
||
|
func (e *ClientError) Error() string {
|
||
|
return e.err.Error()
|
||
|
}
|