database

package
v0.0.0-...-beb4b11 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(cfg *DBConfig) error

func Close

func Close()

func GetConnection

func GetConnection(name string) *dbr.Connection

func GetDefaultSession

func GetDefaultSession() *dbr.Session

func GetSession

func GetSession(name string) *dbr.Session

func Remove

func Remove(name string) error

Types

type DBConfig

type DBConfig struct {
	Driver string
	// username:password@tcp(host:port)/dbname
	Dsn            string
	ConnectionName string
	MaxOpenConns   int
	MaxIdleConns   int
	LifeTime       time.Duration
	Stream         *health.Stream
}

Jump to

Keyboard shortcuts

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