Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 788 Bytes

README.md

File metadata and controls

13 lines (8 loc) · 788 Bytes

Production-Ready MySQL Connection Pool

This package provides a production-ready MySQL connection pool for Go 1.9. It is a thin but useful wrapper around database/sql.DB that emphasizes sql.Conn and error handling. Specifically, this package has three features which are necessary in well-design production systems:

  1. Connector interface
  2. Human-friendly error handling
  3. Stats for metrics and monitoring

More on all this later once this repo has an official release.

Testing

Requires MySQL Sandbox. Install and export MYSQL_SANDBOX_DIR env var. For example: MYSQL_SANDBOX_DIR=/Users/daniel/sandboxes/msb_5_7_21/ on a Mac. Tests take ~15s because the MySQL sandbox is restarted several times. Current test coverage: 100%.