database/sql.DB.maxLifetime (field)
12 uses
database/sql (current package)
sql.go#L429: maxLifetime time.Duration // maximum amount of time a connection may be reused
sql.go#L873: return db.maxLifetime
sql.go#L875: if db.maxLifetime <= 0 {
sql.go#L880: if min > db.maxLifetime {
sql.go#L881: min = db.maxLifetime
sql.go#L954: if d > 0 && d < db.maxLifetime && db.cleanerCh != nil {
sql.go#L960: db.maxLifetime = d
sql.go#L990: if (db.maxLifetime > 0 || db.maxIdleTime > 0) && db.numOpen > 0 && db.cleanerCh == nil {
sql.go#L1033: if db.maxLifetime > 0 {
sql.go#L1034: expiredSince := nowFunc().Add(-db.maxLifetime)
sql.go#L1209: lifetime := db.maxLifetime
sql.go#L1366: if err != driver.ErrBadConn && dc.expired(db.maxLifetime) {
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |