A lightweight database connection pool manager for Go that works with any database driver supporting the standard database/sql interface (PostgreSQL, MySQL, SQLite, etc.) and warms up connections.
🚀 Warms up the database connections
⚙️ Configurable connection limits
⏱️ Controls connection lifetimes
🔄 Returns standard *sql.DB objects
🧩 Database agnostic - works with any SQL driver
go get github.com/barahouei/godbpooloptions := godbpool.Options{
MinConnections: 10,
MaxConnections: 100,
MaxIdleTime: time.Minute * 5,
MaxOpenLifeTime: time.Minute * 30,
}
pool, err := godbpool.GetPool(db, options)| Option | Description |
|---|---|
| MinConnections | Minimum connections to pre-warm |
| MaxConnections | Maximum open connections |
| MaxIdleTime | Maximum idle time for connections |
| MaxOpenLifeTime | Maximum lifetime of connections |