dbp

package
v0.1.54 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DaemonTypeDBP boot.DaemonType = "dbp"
View Source
const (
	DefaultEnableExportMetrics = true
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cfg

type Cfg struct {
	Pools               []*PoolCfg `yaml:"pools"`
	EnableExportMetrics bool       `` /* 162-byte string literal not displayed */
}

func NewCfg

func NewCfg() *Cfg

type DBP

type DBP interface {
	boot.Daemon
	Get(string) *sql.DB
}
var (
	D DBP = New()
)

func New

func New() DBP

type PoolCfg

type PoolCfg struct {
	Name        string        `yaml:"name"`
	Type        string        `yaml:"type"`
	DSN         string        `yaml:"dsn"`
	MaxIdle     int           `yaml:"maxIdle"`
	MaxOpen     int           `yaml:"maxOpen"`
	MaxLifeTime time.Duration `yaml:"maxLifeTime"`
	MaxIdleTime time.Duration `yaml:"maxIdleTime"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL