db

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DriverMysql = "mysql"
	DriverNone  = ""
)
View Source
const (
	RemovedPassword = "[removed]"
)

Variables

This section is empty.

Functions

func ErrIsDuplicateEntryError added in v1.1.0

func ErrIsDuplicateEntryError(err error) bool

func SanitizedDSN

func SanitizedDSN(cfg *cfg.DB) (string, string, error)

Types

type Conn added in v1.1.0

type Conn struct {
	// contains filtered or unexported fields
}

Conn is a wrapper around a dbr connection and a health stream

func New

func New(stream *health.Stream, conf cfg.DB, ro bool) (*Conn, error)

New creates a new DB for the given config

func (*Conn) Close added in v1.1.0

func (c *Conn) Close(context.Context) error

func (*Conn) NewSession added in v1.1.0

func (c *Conn) NewSession(name string, timeout time.Duration) (*dbr.Session, error)

func (*Conn) NewSessionForEventReceiver added in v1.1.0

func (c *Conn) NewSessionForEventReceiver(er health.EventReceiver) *dbr.Session

Jump to

Keyboard shortcuts

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