mysql

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Resolver added in v0.9.16

func Resolver() *dbresolver.DBResolver

func ResolverConfig added in v0.9.16

func ResolverConfig(item ResolverItem) dbresolver.Config

Types

type Config added in v0.9.13

type Config struct {
	// 最大空闲连接数
	MaxIdleConnections int

	// 最大打开连接数
	MaxOpenConnections int

	// 最长活跃时间
	MaxLifeTime int

	// dsn
	Dsn string
}

Config 配置

type Database added in v1.0.0

type Database interface {
	GetInstance() *gorm.DB
}

func Connect added in v1.0.0

func Connect(conf *Config) (Database, error)

type ResolverItem added in v0.9.16

type ResolverItem struct {
	Sources  []string //
	Replicas []string //
	Tables   []string //
}

ResolverItem

Jump to

Keyboard shortcuts

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