22 lines
592 B
Go
22 lines
592 B
Go
|
|
package mysql
|
||
|
|
|
||
|
|
import (
|
||
|
|
"database/sql"
|
||
|
|
|
||
|
|
"code.nochebuena.dev/einherjar/contracts/lifecycle"
|
||
|
|
"code.nochebuena.dev/einherjar/contracts/observability"
|
||
|
|
)
|
||
|
|
|
||
|
|
// Component bundles the full MySQL capability: lifecycle management,
|
||
|
|
// health reporting, and the database [Provider] interface.
|
||
|
|
// Register with launcher and health before starting.
|
||
|
|
type Component interface {
|
||
|
|
lifecycle.Component
|
||
|
|
observability.Checkable
|
||
|
|
observability.Identifiable
|
||
|
|
Provider
|
||
|
|
// Stats returns connection pool statistics. Returns a zero-value stat
|
||
|
|
// when the pool has not been initialized yet.
|
||
|
|
Stats() sql.DBStats
|
||
|
|
}
|