-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.go
More file actions
24 lines (18 loc) · 964 Bytes
/
errors.go
File metadata and controls
24 lines (18 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package connpool
import (
"errors"
)
var (
// ErrPoolClosed is returned when an operation is attempted on a closed pool.
ErrPoolClosed = errors.New("connpool: pool closed")
// ErrFactoryRequired is returned when initializing a pool with a nil Factory.
ErrFactoryRequired = errors.New("connpool: factory function is required")
// ErrCloseFuncRequired is returned when initializing a pool with a nil CloseFunc.
ErrCloseFuncRequired = errors.New("connpool: close function is required")
// ErrInvalidConnection is returned by Put or Discard if the provided connection
// is nil, does not belong to this pool, or is already closed.
ErrInvalidConnection = errors.New("connpool: invalid connection")
// ErrGetTimeout is returned by Get when the context times out waiting for a connection.
// Note: Currently, Get wraps context.DeadlineExceeded or context.Canceled instead.
ErrGetTimeout = errors.New("connpool: get timed out waiting for connection")
)