Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultPingTimeout is the default timeout for database ping operations DefaultPingTimeout = 5 * time.Second // MinArgsLength represents the minimum number of arguments needed for a query MinArgsLength = 2 // ConnectionPoolWarningThreshold is the percentage of max connections that triggers a warning ConnectionPoolWarningThreshold = 0.8 // ConnectionPoolPercentageMultiplier is used to convert ratio to percentage ConnectionPoolPercentageMultiplier = 100 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GormDB ¶ added in v0.1.5
GormDB wraps the GORM database connection
func (*GormDB) MonitorConnectionPool ¶ added in v0.1.5
MonitorConnectionPool periodically checks the database connection pool status
type GormLogWriter ¶ added in v0.1.5
type GormLogWriter struct {
// contains filtered or unexported fields
}
GormLogWriter implements io.Writer for GORM logger
func (*GormLogWriter) Error ¶ added in v0.1.5
func (w *GormLogWriter) Error(msg string, err error)
Error implements logger.Writer interface
func (*GormLogWriter) Printf ¶ added in v0.1.5
func (w *GormLogWriter) Printf(format string, args ...any)
Printf implements logger.Writer interface
Click to show internal directories.
Click to hide internal directories.