package sqlhealth
import "gocloud.dev/server/health/sqlhealth"
Package sqlhealth provides a health check for a SQL database connection.
Index ¶
Types ¶
type Checker ¶
type Checker struct {
// contains filtered or unexported fields
}
Checker checks the health of a SQL database.
func New ¶
New starts a new asynchronous ping of the SQL database. Pings will be sent until one succeeds or Stop is called, whichever comes first.
func (*Checker) CheckHealth ¶
CheckHealth returns nil iff the ping started by New has returned success.
func (*Checker) Stop ¶
func (c *Checker) Stop()
Stop stops any ongoing ping of the database.
Source Files ¶
sqlhealth.go
- Version
- v0.41.0
- Published
- Mar 30, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 32 minutes ago –
Tools for package owners.