MCPcopy
hub / github.com/jackc/pgx / Timeout

Function Timeout

pgconn/errors.go:24–27  ·  view source on GitHub ↗

Timeout checks if err was caused by a timeout. To be specific, it is true if err was caused within pgconn by a context.DeadlineExceeded or an implementer of net.Error where Timeout() is true.

(err error)

Source from the content-addressed store, hash-verified

22// Timeout checks if err was caused by a timeout. To be specific, it is true if err was caused within pgconn by a
23// context.DeadlineExceeded or an implementer of net.Error where Timeout() is true.
24func Timeout(err error) bool {
25 var timeoutErr *errTimeout
26 return errors.As(err, &timeoutErr)
27}
28
29// PgError represents an error reported by the PostgreSQL server. See
30// http://www.postgresql.org/docs/current/static/protocol-error-fields.html for

Calls

no outgoing calls